Created attachment 531868 [details] emerge --info "rc-service xdm stop" sends SIGTERM to sddm, as evident on logfile. However, X does not shut down, and desktop keeps working normally. "rc-service xdm status" outputs "stopped" "rc-service xdm start" at this point generates an unusable state which requires hard shutdown.
Versions: sddm-0.17.0-r2 xorg-server-1.19.5-r2 xorg-drivers-1.19 sddm.log: [16:12:12.825] (II) DAEMON: Initializing... [16:12:12.834] (II) DAEMON: Starting... [16:12:12.835] (II) DAEMON: No session manager found [16:12:12.835] (II) DAEMON: Adding new display on vt 7 ... [16:12:12.841] (II) DAEMON: Loading theme configuration from "" [16:12:12.841] (II) DAEMON: Display server starting... [16:12:12.841] (II) DAEMON: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{b885a94d-4534-4e13-a89f-ba35e437db3f} -background none -noreset -displayfd 18 -seat seat0 vt7 [16:12:13.240] (II) DAEMON: Setting default cursor [16:12:13.250] (II) DAEMON: Running display setup script "/usr/share/sddm/scripts/Xsetup" [16:12:13.254] (II) DAEMON: Display server started. [16:12:13.254] (II) DAEMON: Socket server starting... [16:12:13.254] (II) DAEMON: Socket server started. [16:12:13.255] (II) DAEMON: Loading theme configuration from "/usr/share/sddm/themes/maldives/theme.conf" [16:12:13.256] (II) DAEMON: Greeter starting... [16:12:13.257] (II) DAEMON: Adding cookie to "/var/run/sddm/{b885a94d-4534-4e13-a89f-ba35e437db3f}" [16:12:13.271] (II) HELPER: [PAM] Starting... [16:12:13.271] (II) HELPER: [PAM] Authenticating... [16:12:13.271] (II) HELPER: [PAM] returning. [16:12:13.769] (II) DAEMON: Greeter session started successfully [16:12:13.999] (II) DAEMON: Message received from greeter: Connect [16:12:30.864] (II) DAEMON: Message received from greeter: Login [16:12:30.864] (II) DAEMON: Reading from "/usr/share/xsessions/plasma.desktop" [16:12:30.864] (II) DAEMON: Reading from "/usr/share/xsessions/plasma.desktop" [16:12:30.864] (II) DAEMON: Session "/usr/share/xsessions/plasma.desktop" selected, command: "/usr/bin/startkde" [16:12:30.903] (II) HELPER: [PAM] Starting... [16:12:30.903] (II) HELPER: [PAM] Authenticating... [16:12:30.908] (II) HELPER: [PAM] Preparing to converse... [16:12:30.908] (II) HELPER: [PAM] Conversation with 1 messages [16:12:31.082] (II) HELPER: [PAM] returning. [16:12:31.085] (II) DAEMON: Authenticated successfully [16:12:31.116] (II) HELPER: [PAM] Closing session [16:12:31.598] (II) HELPER: [PAM] Ended. [16:12:31.601] (II) DAEMON: Auth: sddm-helper exited successfully [16:12:31.601] (II) DAEMON: Greeter stopped. [16:12:31.656] (II) HELPER: Starting: "/usr/share/sddm/scripts/Xsession \"/usr/bin/startkde\"" [16:12:31.712] (II) HELPER: Adding cookie to "/home/mike/.Xauthority" [16:12:31.739] (II) DAEMON: Session started and, after rc-service xdm stop, this gets logged: [16:20:46.809] (WW) DAEMON: Signal received: SIGTERM
Downgraded to sddm-0.15.0 and the bug is not present. As an unaware user with sddm-0.17.0 can end up with a frozen system (by switching to console, shutting down xdm service because it isn't needed, not notice that actually X is still active and then restarting xdm service) I suggest sddm-0.17.0 be masked until the bug is fixed.
Opened issue on https://github.com/sddm/sddm/issues
The sigtermed process terminates. Therefore openrc signals successful stop. But X server as well as sddm-helper do not. Sending SIGTERM to sddm-helper helps. I think sddm does not forward SIGTERM to sddm-helper.
Same problem here, same versions: 0.17.0-r2 0.17.0-r3. I had to downgrade to 0.15.0 to have a version of sddm which gracefully stop X at /etc/init.d/xdm stop.
I'm pretty sure 0.17.0-r1 didn't show the problem. I've it installed now in at least two systems and "xdm stop" gracefully kill sddm and X.
If it's true that -r1 didn't have the bug, it should be an ebuild bug. diff *1.ebuild *2.ebuild 44a45,46 > # TODO: not yet upstream > "${FILESDIR}/${P}-switchtogreeter.patch" # bugs 644718, 649888 diff *1.ebuild *3.ebuild 44a45,47 > "${FILESDIR}/${P}-logind-race.patch" # bug 656286 > # TODO: not yet upstream > "${FILESDIR}/${P}-switchtogreeter.patch" # bugs 644718, 649888 I think the culprit should be in the switchtogreeter.patch
(In reply to Michele Alzetta from comment #7) > If it's true that -r1 didn't have the bug, it should be an ebuild bug. > > diff *1.ebuild *2.ebuild > 44a45,46 > > # TODO: not yet upstream > > "${FILESDIR}/${P}-switchtogreeter.patch" # bugs 644718, 649888 > > diff *1.ebuild *3.ebuild > 44a45,47 > > "${FILESDIR}/${P}-logind-race.patch" # bug 656286 > > # TODO: not yet upstream > > "${FILESDIR}/${P}-switchtogreeter.patch" # bugs 644718, 649888 > > I think the culprit should be in the switchtogreeter.patch Yep, here is the lion. I don't know what the "switchtogreeter.patch" try to fix, but for sure it breaks the sddm termination sequence. I've 0.17.0-r1 in my local portage now and r2/r3 masked. Without this patch sddm starts and stop correctly. I tested again the r1 from home and I'm definitely positive about the fact r1 stop nicely.
(In reply to Giuseppe Vitillaro from comment #8) > I don't know what the "switchtogreeter.patch" try to fix, but for sure it > breaks the sddm termination sequence. Bug numbers are right next to it.
It looks my english is too rough to express "irony" :-) Read "I don't know" as "I don't care" :-)
Looks like I accidentally dropped the parent constructor call in the switchtogreeter.patch. The line reading + explicit SeatManager(QObject *parent = 0) {} should obviously have been + explicit SeatManager(QObject *parent = 0) : QObject(parent) {} I don't know wheter that fixes the shutdown problems, but the patch needs to be updated accordingly. I'll make some tests later today.
Thanks Alexander for checking back. See also comments on https://github.com/sddm/sddm/pull/1010
Correcting this line in the patch fixed the problem on my system.
I had some time to test it and I can reproduce the problem with the first revision of the patch and confirm that the corrected patch fixes it again. > See also comments on https://github.com/sddm/sddm/pull/1010 So they already spotted the missing constuctor call. Too bad I didn't see that comment. (Regarding the other comment, I know 2 phase initialization is ugly, but the order is simply wrong otherwise. Redesigning the classes to avoid that is out of scope for the fix, that's a job for the maintainers.) Thanks Andreas for updating your PR with the corrected revision.
Created attachment 534728 [details, diff] user patch This user patch, applied to sddm-0.17.0-r3 works correctly in my environment. Thanks for the effort. Appreaciated!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12842ffb4b5a4ca1490724bb2d6646e49a4832d0 commit 12842ffb4b5a4ca1490724bb2d6646e49a4832d0 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-06-06 10:12:11 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-06-06 10:12:11 +0000 x11-misc/sddm: Fix switchtogreeter patch, add consolekit fix Bug: https://bugs.gentoo.org/647254 Bug: https://bugs.gentoo.org/655912 Package-Manager: Portage-2.3.40, Repoman-2.3.9 x11-misc/sddm/files/sddm-0.17.0-consolekit.patch | 22 ++++++ .../files/sddm-0.17.0-switchtogreeter-r1.patch | 54 ++++++++++++++ x11-misc/sddm/sddm-0.17.0-r4.ebuild | 84 ++++++++++++++++++++++ 3 files changed, 160 insertions(+)