SUMMARY Trying to logout sometimes - not always!! - doesn't work. If it doesn't work, you can see this error in system log: Dec 28 08:36:37 lhost dbus-daemon[5204]: [session uid=1000 pid=5204] Activating service name='org.kde.LogoutPrompt' requested by ':1.18' (uid=1000 pid=5348 comm="/usr/bin/plasmashell --no-respawn ") Dec 28 08:36:37 lhost ksmserver-logout-greeter[23052]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. Dec 28 08:36:37 lhost ksmserver-logout-greeter[23052]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Dec 28 08:37:44 lhost dbus-daemon[5204]: [session uid=1000 pid=5204] Activating service name='org.kde.Shutdown' requested by ':1.63' (uid=1000 pid=23614 comm="/usr/lib/ksmserver-logout-greeter This only happened until now, if the user has been logged on for several hours. I tried to find a reason which could be responsible for the problem - but couldn't find any so far. I suspected switching between users or switching to console could trigger it - but that's not true (at least it isn't reproducible). My workaround is to start the logout screen manually in konsole like this: /usr/lib/ksmserver-logout-greeter - STEPS TO REPRODUCE 1. Start logout via kicker 2. 3. OBSERVED RESULT nothing happens EXPECTED RESULT Logout screen should be started SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.26.4 KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 ADDITIONAL INFORMATION I'm using sddm 0.19.0 and X11 if this should be relevant!
Given the workaround works, the only remaining explanation is the dbus activation environment has got out of sync and lost DISPLAY/XAUTHORITY env vars. A good test would be to compare: ``` qdbus org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Get org.freedesktop.systemd1.Manager Environment ``` and ``` env ``` Assuming DISPLAY / XAUTHORITY are different, we need to work out why, though all signs point away from Plasma
Thanks for your hint! Problem appeared again - and there was no difference in environment compared to before, as it was working.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
I now know what happens. I moved ksmserver-logout-greeter and added instead a small bash script which logs the environment to a log file. And voila, the culprit is: ... DISPLAY=localhost:10.0 SSH_CONNECTION=192.168.1.59 35858 192.168.1.6 22 ... What happened? Before that, I remotely logged in via ssh to this machine with ssh -XC 192.168.1.6 konsole This obviously completely breaks the environment! But why?
It's even more easy to reproduce it (assuming there is a ssh server running on localhost): just do a ssh -X localhost and the problem can be seen. Btw: if you do it like described above, there is a warning: dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments The actual workaround is to replace /usr/lib/ksmserver-logout-greeter with a script which explicitly sets DISPLAY to :0 and afterwards start the original ksmserver-logout-greeter.
The exactly same behavior can be seen running KDE under Wayland.
Further investigation showed: manually changing the activation-environment after the login has been performed on a local tty, things are working again, too: dbus-update-activation-environment DISPLAY XAUTHORITY Doing the same with a "broken" DISPLAY environment breaks the logout window again (not surprising). The question for me is: Why does a simple ssh -X - login changes the global environment - even for the local running user (at least for processes started by dbus)? This doesn't make any sense to me!
Ok, I found the problem: openSuSE 15.4 comes with /etc/profile.d/openssh-dbus.sh as part of openssh-server: if test -n "$SSH_CONNECTION" -a -n "$DISPLAY" then dbus-update-activation-environment --systemd --all fi Deactivating this file makes it working again.
OpenSuSE Bug 1206739 - Latest update to systemd causes "theft" of X's dbus session by ssh session for user with same UID https://bugzilla.opensuse.org/show_bug.cgi?id=1206739
Started to happen repeatedly in the last few days for me. Operating System: openSUSE Tumbleweed 20230307 KDE Plasma Version: 5.27.2 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.2.1-1-default (64-bit) Graphics Platform: X11
Created attachment 157126 [details] qdbus org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Get org.freedesktop.systemd1.Manager Environment > qdbus.txt
Created attachment 157127 [details] env > env.txt