- Blog Code
- Open source
- Quasi-philosophic ramblings
- Site news
Xenial upgrade issues
Back in February, I finally got around to updating my personal laptop to Ubuntu 16.04 (Xenial). I ran into two main problems, that I'm only now resolving:
- I use XMonad+GNOME, and GNOME wouldn't start up when I did that. Moreover, if I didn't manually run gnome-flashback, my session would be terminated.
- Occasionally, after resuming from suspend, my fonts would be screwed up -- many characters wouldn't show up at all (though scaling up or down the terminal would usually eventually find some that would)
I've tried off and on to resolve both of these, but only recently figured out what was going on, at least with the first.
In the case of the XMonad problem, it seems to have been twofold. First, I snap my pointer to the middle of the window when I change focused windows. However, the mechanism for doing this (updatePointer) changed since Trusty, which caused my xmonad.hs to fail to compile. I'm not sure whether I got an error about that and just ignored it, or it was silent, but in any case I didn't fix it, so my XMonad was still using an old config. This caused further problems: window managers (perhaps new as of Xenial?) need to tell GNOME when they finish starting up. If they don't, GNOME exits. XMonad's GNOME module shells out to dbus-send to do this, but used incorrect syntax, which in Trusty I think was ignored, but causes dbus-send to bail in Xenial. This was fixed in XMonad upstream in 2014 and in Debian in 2015 (in time for Xenial). This all would have been fine -- XMonad in Trusty would do the wrong thing, and dbus-send would ignore it, and XMonad in Xenial would do the right thing -- except that my config was failing to compile, so I was still using the Trusty XMonad library in Xenial, which didn't work.Finding all this, naturally, didn't go in this order. I found some syslog lines that seemed pretty suspicious after some hunting:
Aug 31 21:48:29 semmering gnome-session: invalid value (=string) of "--print-reply" Aug 31 21:48:29 semmering gnome-session: Usage: dbus-send [--help] [--system | --session | --bus=ADDRESS | --peer=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply[=literal]] [--reply-timeout=MSEC]
[contents ...] Aug 31 21:48:39 semmering puppet-agent: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Temporary failure in name resolution) Aug 31 21:48:48 semmering bluetoothd: Endpoint unregistered: sender=:1.12651 path=/MediaEndpoint/A2DPSource Aug 31 21:48:48 semmering bluetoothd: Endpoint unregistered: sender=:1.12651 path=/MediaEndpoint/A2DPSink Aug 31 21:49:59 semmering gnome-session: gnome-session-binary: WARNING: Application 'xmonad.desktop' failed to register before timeout Aug 31 21:49:59 semmering gnome-session-binary: WARNING: Application 'xmonad.desktop' failed to register before timeout Aug 31 21:49:59 semmering gnome-session-binary: Unrecoverable failure in required component xmonad.desktop Aug 31 21:49:59 semmering gnome-session: gnome-session-binary: CRITICAL: We failed, but the fail whale is dead. Sorry.... Aug 31 21:49:59 semmering gnome-session-binary: CRITICAL: We failed, but the fail whale is dead. Sorry.... Aug 31 21:49:59 semmering bluetoothd: Endpoint unregistered: sender=:1.10267 path=/MediaEndpoint/A2DPSource Aug 31 21:49:59 semmering bluetoothd: Endpoint unregistered: sender=:1.10267 path=/MediaEndpoint/A2DPSink Aug 31 21:49:59 semmering gnome-session: XIO: fatal IO error 4 (Interrupted system call) on X server ":0" Aug 31 21:49:59 semmering gnome-session: after 323 requests (323 known processed) with 0 events remaining. Aug 31 21:49:59 semmering lightdm: ** (lightdm:2627): CRITICAL **: session_get_login1_session_id: assertion 'session != NULL' failed Aug 31 21:50:00 semmering acpid: client 9819[0:0] has disconnected Aug 31 21:50:00 semmering acpid: client connected from 10334[0:0] Aug 31 21:50:00 semmering acpid: 1 client rule loaded Aug 31 21:50:00 semmering systemd: Started Session c30 of user lightdm.
The "failed to register" bit seemed suspicious, and Googling that found some errors other people had due to not calling the gnomeRegister startupHook. I seemed to be using gnomeConfig and leaving it with its default hook, so that seemed unlikely, but grabbing the source package and looking at XMonad/Config/Gnome.hs found that registering involves using dbus-send. (Observant readers might note the dbus-send error in the logs. I'd seen that and grepped around for the bad usage, but hadn't found it -- in part probably because the text files with the bad form had been changed since then. I also didn't realize until later that "string" and "literal" were both actual literal arguments.) I tried running the command by hand, and it seemed fine, so I decided to try deleting the compiled files, in case those were wrong somehow. That gave me the error about updatePointer, which I Googled and found the change in syntax. After fixing that syntax error, everything (with XMonad) was fine again. Yay!
The font error, on the other hand, I pretty quickly found other mystified people with the problem months ago, but a distinct lack of folks with a good solution. There's some rumors that switching to Linux 4.8 helped, but there seemed to be mixed success and (I think) last I'd checked it wasn't easy to, so I hadn't bothered. Somewhat more recent reports suggest it's now in apt as the hardware enablement kernel and some folks have gone months without issues, so I guess I'll give that a shot soon and see if it helps.
If it does, and I don't have any more issues in the next couple weeks, probably I'll update my personal desktop too.
- Open source