Starting my Gentoo-Laptop logging in kde-plasma I can shutdown as always. If I don't log in and want to shutdown/restart immediately these buttons are greyed out. If I log in and after work just log out these buttons are greyed out. (only in sddm) Reproducible: always. Solution found on debian bugtracker, arch forum and on github of sddm. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866865 https://bbs.archlinux.org/viewtopic.php?id=234450 https://github.com/sddm/sddm/issues/978 In /lib/systemd/system/sddm.service in the line "After=..." add systemd-logind.service at last. Workaround always works. Seems to be a race condition as Chris on debian suggested. Could this be patched in gentoo so I have no need to manually edit files in /lib? My system is a 3 years fast gaming Laptop with an ssd. x11-misc/sddm-0.17.0-r2 sys-apps/systemd-238-r6 sys-apps/dbus-1.10.24
This is apparently not systemd specific. The suspend, reboot and shutdown buttons on the initial login screen as well as through ctrl+alt+del are also not showing when using openrc as well.
This fixed the problem for me: https://forum.voidlinux.eu/t/sddm-and-consolekit-quick-fix/4264
Quoted from the url I just posted: "Going straight to the point: after a fresh void linux install, sddm WILL have problems with consolekit, because it fails to start an active consolekit session. This indeed leads to a number of problems, like No shutdown / hibernate / restart […] icon Can’t mount any filesystem Can’t edit NetworkManager or Sddm settings (from the applet or from systemsettings5) The only fix needed is to remove nox11 from /etc/pam.d/system-login (should be on the pam_ck_connector line) I’m too busy procrastinating and my brain is too small to somehow implement this in the xbps kde thingy github, i’ll just leave this here and thanks for reading that through! Void is the coolest distro i’ve ever tried."
@Matthew: Thanks, but your consolekit tricks are completely useless to a systemd user. Take a second to understand the problem before entering a comment.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc186212892ef0c9872c16b73f55f79a96f0198e commit dc186212892ef0c9872c16b73f55f79a96f0198e Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-05-27 20:26:08 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-05-27 21:34:11 +0000 x11-misc/sddm: Upstream adj. to sddm.service to fix logind race cond. Closes: https://bugs.gentoo.org/656286 Package-Manager: Portage-2.3.40, Repoman-2.3.9 x11-misc/sddm/files/sddm-0.17.0-logind-race.patch | 26 +++++++ x11-misc/sddm/sddm-0.17.0-r3.ebuild | 83 +++++++++++++++++++++++ 2 files changed, 109 insertions(+)
(In reply to Andreas Sturmlechner from comment #4) > @Matthew: Thanks, but your consolekit tricks are completely useless to a > systemd user. Take a second to understand the problem before entering a > comment. hmm, if you delay systemd startup to fix this problem, maybe one could do the same for openrc users?
Thank you for the fast solution. sddm-0.17.0-r3 fixes it on my systemd machine. @openrc: might be the same symptom, but the same issue? (might need another solution in the forum or a deeper/different bugreport, considering your workaround url) I can't reproduce it on another openrc machine.
Created attachment 533842 [details, diff] Ensure shutdown buttons are available without systemd This patch used to be applied in Gentoo ebuild, but dropped later for unknown reason. It fixes the availability of shutdown icons with OpenRC. I have OpenRC and sddm built with only pam use flag. Ebuild requires sys-power/upower to be installed on OpenRC systems. That's because sddm falls back to upowerd for discovering and performing a shutdown. The code this patch edits erroneously uses upowerd only if it's already been running. But that's not guaranteed because /etc/init.d/xdm does not declare a dependency on upowerd. The patch unconditionally calls upowerd and letting D-Bus to start it automatically if not yet running.