Q: When does it occur? A: When I connect to specific Wi-Fi. Apparently the transient hostname gets set to "unknown" + some random string. ~/w/a git:(master) ✗ hostnamectl Static hostname: rok-laptop Transient hostname: unknownc417fe03cb97 Icon name: computer-laptop Chassis: laptop Q: What does it cause? 1. GNOME does sometimes crash. No logs anywhere, the graphical environment just crashes, dropping you to the virtual terminal. I am positive this is the cause of this, because this has happened over 100 times, everytime with that Wi-Fi. 2. Java starts reporting UnknownHostException. java.net.UnknownHostException: unknownc417fe03cb97: unknownc417fe03cb97: unknown error at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at scala.tools.nsc.io.Socket$.localhost(Socket.scala:28) at scala.tools.nsc.CompileSocket.getsock$1(CompileSocket.scala:175) at scala.tools.nsc.CompileSocket.getOrCreateSocket(CompileSocket.scala:190) Q: Does anybody have any idea?
Yeah, changing the hostname is known to cause issues with X11. You can set UseHostname=false in your networkd config to prevent that from happening.
Sadly, I have done that months ago, the sitiation is exactly the same: # cat /etc/systemd/network/50-dhcp.network [Match] Name=en* [Network] DHCP=yes UseHostname=false UseDomains=false Even if it worked, it should be by default set to false.
I have finally realised that match should be wl* not en*. Thanks. But anyways, I think this should be off by default, given the harsh consequences, therefore I will just leave this open. Thanks again.
That's a battle to be fought with systemd upstream.
Gentoo can provide more sensible default config files. X11 crashes are not OK.
As far as I can tell, the only way to configure networkd is via *.network files in /etc/systemd/network. Gentoo does not ship any network files by default, and it would be inappropriate to do so. Anyway, I suspect your crashes are occurring due to entries in ~/.Xauthority which are tied to your hostname. I have not found any reasonable solution we could implement as a Linux distro. http://stackoverflow.com/questions/20611783/after-changing-hostname-gedit-not-open