Updating sddm kills currently running session

So I just stumbled upon what seems like a massively serious issue with how sddm updates are handled. I was watching a video while a zypper dup was running in the background, when suddenly, with absolutely zero warning at all, my entire desktop session just stopped and restarted. I was only watching a video, but I could have been working on something more important.

I dug around and this is what I found in the logs:


Feb 13 00:28:38 anirudh-laptop [RPM][30476]: Transaction ID 5c63d536 started
Feb 13 00:28:39 anirudh-laptop [RPM][30476]: erase sddm-0.18.0-5.1.x86_64: success
Feb 13 00:28:39 anirudh-laptop systemd[1]: Reloading.
Feb 13 00:28:39 anirudh-laptop [RPM][30476]: install sddm-0.18.0-5.2.x86_64: success
Feb 13 00:28:39 anirudh-laptop systemd[1]: Reloading.
Feb 13 00:28:40 anirudh-laptop systemd[1]: Stopping Simple Desktop Display Manager...
Feb 13 00:28:40 anirudh-laptop sddm[27054]: Signal received: SIGTERM
Feb 13 00:28:41 anirudh-laptop sddm[27054]: Socket server stopping...
Feb 13 00:28:41 anirudh-laptop sddm[27054]: Socket server stopped.
Feb 13 00:28:41 anirudh-laptop sddm[27054]: Display server stopping...
Feb 13 00:28:41 anirudh-laptop kdeinit5[27525]: kdeinit5: Fatal IO error: client killed
Feb 13 00:28:41 anirudh-laptop kdeinit5[27525]: kdeinit5: sending SIGHUP to children.
Feb 13 00:28:41 anirudh-laptop kdeinit5[27525]: kdeinit5: sending SIGTERM to children.
Feb 13 00:28:41 anirudh-laptop kdeinit5[27525]: kdeinit5: Exit.
Feb 13 00:28:41 anirudh-laptop kdeinit5[27529]: The X11 connection broke (error 1). Did the X11 server die?
...]
Feb 13 00:28:52 anirudh-laptop sddm[27054]: Display server stopped.
Feb 13 00:28:52 anirudh-laptop sddm[27054]: Running display stop script  "/usr/share/sddm/scripts/Xstop"
...]
Feb 13 00:29:02 anirudh-laptop systemd[1]: Stopped Simple Desktop Display Manager.
Feb 13 00:29:02 anirudh-laptop systemd[1]: Starting Simple Desktop Display Manager...
Feb 13 00:29:02 anirudh-laptop systemd[1]: Started Simple Desktop Display Manager.
...]
Feb 13 00:29:03 anirudh-laptop sddm[30590]: Display server starting...
Feb 13 00:29:03 anirudh-laptop sddm[30590]: Running: /usr/bin/X -nolisten tcp -auth /run/sddm/{a7c6c29b-0d14-4e58-b2ca-0b1229b5dbb4} -background none -noreset -displayfd 17 -seat seat0 vt7
...]
Feb 13 00:29:02 anirudh-laptop [RPM][30476]: erase sddm-0.18.0-5.1.x86_64: success
Feb 13 00:29:02 anirudh-laptop [RPM][30476]: install sddm-0.18.0-5.2.x86_64: success
Feb 13 00:29:02 anirudh-laptop [RPM][30476]: Transaction ID 5c63d536 finished: 0

Based on this, it looks like one of the packages upgraded was sddm. And for some reason, the package was configured to stop and restart sddm.service after installing the update… which of course brings down Xorg and my entire desktop session in the process.

I dug around the sddm rpm file and saw that it looked at DISABLE_RESTART_ON_UPDATE in /etc/sysconfig/services, which is by default set to ‘no’. This makes sense for most services, like packagekit, smb, mysql, etc. but is not reasonable for something like sddm. To me this seems like a monumentally unacceptable issue with the sddm update logic. I will file a bug, but I first wanted to see if anyone else has had this issue at all, or if I have something configured wrong. I find it hard to believe I was the only one to run into this issue, but from googling around I couldn’t find anything else.

I don’t think this happened to me.

I’m using GDM on most systems, and I did have that restart on only one. But I’m pretty sure that SDDM did not restart on the systems where I am using that.

In any case, this is Tumbleweed. You should expect software to be restarted. That’s why the recommendation is to switch to a virtual console, and run “zypper dup” from there.

Yes, I run “zypper dup” inside my desktop. But I first start a “screen” session to run it, so that if the desktop crashes, “screen” keeps running and the update keeps going.

It’s probably best to postpone the update until after you have finished watching the movie or other video.