Summary: | Reboot and shutdown result in logout | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Arkadi Statsenko <arkadistatsenko> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | axel.braun, basjetimmer, bingmybong, bugseforuns, demm, grihad, hamelg, me, melkevizth, nate, pip.kde, plasma-bugs |
Priority: | VHI | Keywords: | regression |
Version: | 5.19.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.19.2 | |
Sentry Crash Report: | |||
Attachments: |
Logout output form dbus-monitor
dbus log when powering off journal-follow log |
Description
Arkadi Statsenko
2020-06-12 13:12:20 UTC
*** Bug 422834 has been marked as a duplicate of this bug. *** Cannot reproduce FWIW. But we are getting multiple reports of it in the wild (including bug-report-by-social-media... https://www.reddit.com/r/kde/comments/h7kw4p/cant_easily_shut_down_anymore/). duplicate of bug 422853 Related, but not quite the same: that one says it only happens with network users, not local users. Can someone run dbus-monitor > someLog and logout then attach someLog here. Created attachment 129307 [details]
Logout output form dbus-monitor
I got prompted to say dbus-monitor was running during the logout which i just cancelled
(In reply to BingMyBong from comment #6) > Created attachment 129307 [details] > Logout output form dbus-monitor > > I got prompted to say dbus-monitor was running during the logout which i > just cancelled my config: opensuse:tumbleweed:20200611 Qt: 5.15.0 KDE Frameworks: 5.70.0 - KDE Plasma: 5.19.0 - kwin 5.19.0 kmail2 5.14.1 (20.04.0) - akonadiserver 5.14.1 (20.04.0) - Kernel: 5.6.14-1-default - xf86-video-nouveau: 1.0.16 method call time=1592048032.192546 sender=:1.71 -> destination=org.kde.ksmserver serial=46 path=/KSMServer; interface=org.kde.KSMServerInterface; member=logout int32 0 int32 0 int32 -1 is a legacy call. How are you triggering the logout? method call time=1592048032.199337 sender=:1.14 -> destination=org.kde.Shutdown serial=69 path=/Shutdown; interface=org.kde.Shutdown; member=logout The modern code is explicitly telling it to logout not reboot. (In reply to Nate Graham from comment #2) > Cannot reproduce FWIW. But we are getting multiple reports of it in the wild > (including bug-report-by-social-media... > https://www.reddit.com/r/kde/comments/h7kw4p/cant_easily_shut_down_anymore/). Well, that's me. So, my symptoms appear the same except I have so far only tried it with shutting down as opposed to rebooting. One more interesting thing: if, after trying to shut down and being dropped in the sddm login screen, if I log in quickly enough (within say 10 seconds) the poweroff actually completes! So I log in, and then suddenly the machine turns off.... Anyway, I have a dbus-monitor log of running 'qdbus org.kde.ksmserver /KSMServer logout 0 2 2' attached (behavior is the same as choosing 'power/session'->'shut down' from the main kmenu. Thanks! Created attachment 129310 [details]
dbus log when powering off
What does: qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown do? (In reply to David Edmundson from comment #11) > What does: > > qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown > > do? On two openSUSE Tumbleweed systems, (for which it needs to be qdbus-qt5 ...), that command results in a logout and return to the SDDM login screen, no shutdown. I confirm same issue both when trying to poweroff or reboot. X or wayland? Is everyone here on SuSE? --- Can someone run the following: log in run qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown (qdbus or qdbus-qt5 whatever is appropriate) then when they get locked out: go to a real VT (control+alt+f5) login cp ~/.local/share/sddm/xorg-session.log ~/LogForDave.txt then go back to the login screen (control+alt+f1) and upload the log in your home folder. Using X, not wayland. openSUSE: Operating System: openSUSE Tumbleweed 20200614 KDE Plasma Version: 5.19.0 KDE Frameworks Version: 5.70.0 Qt Version: 5.15.0 Kernel Version: 5.7.1-1-default OS Type: 64-bit Processors: 2 × AMD Athlon(tm) 64 X2 Dual Core Processor 5600+ Memory: 3.8 GiB of RAM Graphics Processor: NV84 Cold boot Log in From konsole issued "qdbus-qt5 org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown" Resulted in log out and return to SDDM log in screen Switched to virtual console Log in as normal user and executed "cp ~/.local/share/sddm/xorg-session.log ~/LogForDave.txt" Exit from virtual console and log in via SDDM log in screen and this is the LogForDave: gpg-connect-agent: no gpg-agent running in this session gpg-connect-agent: no gpg-agent running in this session QML debugging is enabled. Only use this in a safe environment. klauncher: Exiting on signal 15 klauncher: Exiting on signal 1 startkde: Starting up... startkde: Shutting down... startkde: Done. XIO: fatal IO error 0 (Success) on X server ":0" after 2114 requests (2114 known processed) with 0 events remaining. XIO: fatal IO error 0 (Success) on X server ":0" after 2114 requests (2114 known processed) with 0 events remaining. Application::crashHandler() called with signal 11; recent crashes: 1 malloc_consolidate(): invalid chunk size KCrash: Application 'kwin_x11' crashing... KCrash: Attempting to start /usr/lib64/libexec/drkonqi and that's all there was... That doesn't sound like enough content :/ Was the tiemstamp on ~/.local/share/sddm/xorg-session.log correct? Some distros seem to like moving it around. I'm on Arch, also with X not Wayland. Linux 5.7.2 KDE Plasma: 5.19.0 KDE Frameworks: 5.71.0 Qt Version: 5.15.0 And the ~/.local/share/sddm/xorg-session.log kdeinit5: preparing to launch '/usr/lib/kf5/klauncher' kdeinit5: Launched KLauncher, pid = 1345, result = 0 kdeinit5: opened connection to :0 kdeinit5: Got SETENV 'GTK_RC_FILES=/etc/gtk/gtkrc:/home/iyan/.gtkrc:/home/iyan/.config/gtkrc' from launcher. kdeinit5: Got SETENV 'GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/iyan/.gtkrc-2.0:/home/iyan/.config/gtkrc-2.0' from launcher. kdeinit5: Got SETENV 'XCURSOR_THEME=breeze_cursors' from launcher. kdeinit5: Got SETENV 'XCURSOR_SIZE=24' from launcher. kdeinit5: Got SETENV 'SESSION_MANAGER=local/master:@/tmp/.ICE-unix/1374,unix/master:/tmp/.ICE-unix/1374' from launcher. QML debugging is enabled. Only use this in a safe environment. kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/http.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/http.so' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so' kdeinit5: Got EXT_EXEC '/usr/bin/kwalletmanager5' from launcher. kdeinit5: preparing to launch '/usr/bin/kwalletmanager5' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/http.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/http.so' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/http.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/http.so' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/http.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/http.so' kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher. kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so' kdeinit5: PID 2137 terminated. kdeinit5: PID 1973 terminated. kdeinit5: PID 1968 terminated. kdeinit5: terminate KDE. klauncher: Exiting on signal 15 klauncher: Exiting on signal 1 startkde: Starting up... startkde: Shutting down... startkde: Done. Application::crashHandler() called with signal 11; recent crashes: 1 malloc_consolidate(): invalid chunk size XIO: fatal IO error 39 (Directory not empty) on X server ":0" after 1907 requests (1907 known processed) with 0 events remaining. KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kwin_x11 path = /usr/bin pid = 1361 KCrash: Arguments: /usr/bin/kwin_x11 KCrash: Attempting to start /usr/lib/drkonqi KCrash: Attempting to start /usr/bin/plasmashell KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = plasmashell path = /usr/bin pid = 1401 KCrash: Arguments: /usr/bin/plasmashell KCrash: Attempting to start /usr/lib/drkonqi Warning: socket path is too long QML debugging is enabled. Only use this in a safe environment. (In reply to David Edmundson from comment #16) > That doesn't sound like enough content :/ > > Was the tiemstamp on ~/.local/share/sddm/xorg-session.log correct? > > Some distros seem to like moving it around. Just repeated it... Time stamp correct -rw------- 1 paul users 608 Jun 16 14:05 xorg-session.log and again a very short, but slightly different log gpg-connect-agent: no gpg-agent running in this session gpg-connect-agent: no gpg-agent running in this session QML debugging is enabled. Only use this in a safe environment. klauncher: Exiting on signal 1 startkde: Starting up... startkde: Shutting down... startkde: Done. XIO: fatal IO error 2 (No such file or directory) on X server ":0" after 2044 requests (2044 known processed) with 0 events remaining. Application::crashHandler() called with signal 11; recent crashes: 1 malloc_consolidate(): invalid chunk size KCrash: Application 'kwin_x11' crashing... KCrash: Attempting to start /usr/lib64/libexec/drkonqi and to confirm some more things what is the output of qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanReboot qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot paul@Orion-15:~$ qdbus-qt5 --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanReboot yes paul@Orion-15:~$ qdbus-qt5 --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot Error: org.freedesktop.DBus.Error.InvalidArgs Invalid arguments '' to call org.freedesktop.login1.Manager.Reboot(), expecting 'b'. (In reply to Paul from comment #20) > paul@Orion-15:~$ qdbus-qt5 --system org.freedesktop.login1 > /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot > Error: org.freedesktop.DBus.Error.InvalidArgs > Invalid arguments '' to call org.freedesktop.login1.Manager.Reboot(), > expecting 'b'. Follow up. If I append boolean:true the system reboots qdbus-qt5 --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:true That puts the problem definitely in KDE code somewhere. Probably my code. Though I'm still not really sure what. Exactly same output as @Paul for both commands. So @David Edmundson, you cannot replicate this behavior on your system? Does it work for you? (In reply to David Edmundson from comment #22) > That puts the problem definitely in KDE code somewhere. Probably my code. > > Though I'm still not really sure what. OK... As mentioned in the duplicate Bug 422834 This only manifested itself after the update to Plasma 5.19.0, prior to that both Shutdown and Restart worked as expected. Yes, it works for me on, and on a clean VM and for everyone I've asked. It's not broken in the common case, just some edge cases In a fresh KDE Neon VM I don't have that problem. But still the command you asked us before to try also doesn't work.: qdbus --system org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot I realized that KDE Neon uses Qt 5.14.2 but BingMyBong, Paul and I have Qt 5.15.0. What QT are you using in your VM? Okay, this is very weird. After updating KDE Neon, now sometimes it works and sometimes it doesn't, and it logs out as in my Arch host system. After several tries, my guess is that time matters. If I start the VM, log in, and then immediately turn it off, it works. If, however, I wait a bit or use the VM for a while, shutdown fails and I get a log out. Hopefully you can replicate this behavior. I suspect ksmserver is crashing on session save, it'd cause what we see here. But if that's the case, shouldn't it be avoidable if I use "Start with an empty session" on preferences? Or does ksmserver always save the session? It always runs something in order for apps to do the "you have unsaved changes" prompts. I've just tested with new users on both my openSUSE Tumbleweed machines. Both still exhibit the erroneous behaviour, so I guess that rules out anything in the users (KDE) configuration. Unlike &Iyán Méndez Veiga (comment 27) I'm seeing this consistently, nor can I replicate the works correctly if I "log in, and then immediately turn it off". Here, When I select "Leave..." in the standard menu on desktop, the behavior is correct : it matched my current setup in "Startup and Shutdown" >> "Desktop Session" >> "Default Leave Option" on "End current session". But when pressing button "Leave..." on widget Lock/logout, the default action is incorrect : it shutdowns my machine. >But when pressing button "Leave..." on widget Lock/logout, the default action is incorrect : it shutdowns my machine.
Ok, maybe this report is mixing up two bugs which would explain some things.
Some random widget using the old API and that not being mapped correctly would match the original logs. But in that case "qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown" would work correctly.
(In reply to David Edmundson from comment #33) > >But when pressing button "Leave..." on widget Lock/logout, the default action is incorrect : it shutdowns my machine. > > Ok, maybe this report is mixing up two bugs which would explain some things. > > Some random widget using the old API and that not being mapped correctly > would match the original logs. But in that case "qdbus org.kde.Shutdown > /Shutdown org.kde.Shutdown.logoutAndShutdown" would work correctly. I think it is only hamelg (comment #32) who is describing a different bug. All others here are just using the normal kmenu "power/session" entries or the dbus commands mentioned in this bug report. Also, the problem with everyone is that they can only get logged out and dropped in the sddm login screen, whereas hamelg actually (inadvertently) manages to shut down. For me both dbus commands ('qdbus org.kde.ksmserver /KSMServer logout 0 2 2' and 'qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown') as well as a graphical shut down from the kmenu, result in just getting logged out. The same thing happens on both my desktop and my laptop (since 5.19.0). Yes, as @basjetimmer wrote, and just to clarify my own case: From a KDE session neither: Menu -> Power/Session -> Reboot (or) Shutdown Desktop Context Menu -> Leave -> Reboot (or) Shutdown will result in a Reboot or Shutdown, but a return to the SDDM login screen, from there Reboot or Shutdown work as expected. *** Bug 423198 has been marked as a duplicate of this bug. *** Commenting on Paul clarification (comment #35) - On PCLinuxOS DarkStar I have the similar symptons with the difference being: With SDDM - after display of the login, I can only continue on to reboot or shutdown only by hitting the reboot or shutdown icon in the upper right corner With GDM - after display of the login, reboot or shutdown continues probably due to a 1 sec login retry security setting in gdmsetup I know this is a cop-out, but if someone can find/make me a live CD ISO that I can run in virtualbox which will reproduce this out of the box they will be my hero. Also can I have someone's ~/.config/ksmserverrc (In reply to David Edmundson from comment #39) > Also can I have someone's ~/.config/ksmserverrc [$Version] update_info=ksmserver_update_loginMode_value.upd:ksmserver_update_loginMode_value_default_enum [General] excludeApps= loginMode=emptySession shutdownType=2 (In reply to David Edmundson from comment #39) > Also can I have someone's ~/.config/ksmserverrc [$Version] update_info=ksmserver_update_loginMode_value.upd:ksmserver_update_loginMode_value_default_enum [General] confirmLogout=false excludeApps= loginMode=emptySession offerShutdown=true screenCount=1 shutdownType=0 [LegacySession: saved at previous logout] count=0 [Session: saved at previous logout] clientId1=10d2d37374000148864348700000005170003 clientId2=10d2d37374000148864348700000005170006 clientId3=10d2d37374000148864348800000005170007 clientId4=10d2d37374000148864348900000005170008 clientId5=10d2d37374000148864361000000005170011 count=5 discardCommand1[$e]=rm,$HOME/.config/session/kwin_10d2d37374000148864348700000005170003_1488643666_320774 discardCommand5[$e]=rm,$HOME/.config/session/kontact_10d2d37374000148864361000000005170011_1488643611_854393 program1=kwin_x11 program2=/usr/lib/org_kde_powerdevil program3=/usr/bin/korgac program4=pulseaudio program5=/usr/bin/kontact restartCommand1=kwin_x11,-session,10d2d37374000148864348700000005170003_1488643666_320774 restartCommand2=/usr/lib/org_kde_powerdevil,-session,10d2d37374000148864348700000005170006_1488643651_973618 restartCommand3=/usr/bin/korgac,-session,10d2d37374000148864348800000005170007_1488643651_973550 restartCommand4= restartCommand5=/usr/bin/kontact,-session,10d2d37374000148864361000000005170011_1488643611_854393 restartStyleHint1=0 restartStyleHint2=0 restartStyleHint3=0 restartStyleHint4=0 restartStyleHint5=0 userId1=iyan userId2=iyan userId3=iyan userId4=iyan userId5=iyan wasWm1=true wasWm2=false wasWm3=false wasWm4=false wasWm5=false [SubSession: c5cf22fb-d99b-4c4e-8768-3ccf01d73d81] count=0 (In reply to David Edmundson from comment #39) > Also can I have someone's ~/.config/ksmserverrc [$Version] update_info=ksmserver_update_loginMode_value.upd:ksmserver_update_loginMode_value_default_enum [General] confirmLogout=false excludeApps= loginMode=emptySession screenCount=1 (In reply to David Edmundson from comment #38) > I know this is a cop-out, but if someone can find/make me a live CD ISO that > I can run in virtualbox which will reproduce this out of the box they will > be my hero. OK... This is very strange :( Both of my openSUSE Tumblweed installs exhibit this bug, they are currently running "Snapshot" 20200618. I've just downloaded that snapshot as a Live Image... http://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20200618-Media.iso http://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20200618-Media.iso.sha256 used "dd" to write to a USB stick, and booted (same hardware as the installed version). I don't see the problem, both Shutdown and Reboot work as expected. Repeated the boot from Live USB for the second machine, ditto. Does journalctl tell us anything? Created attachment 129544 [details]
journal-follow log
Following log obtained by:
Regular user (paul) logged in to a kde session.
Switch to VT and log in as root.
root issues "journalctl --follow > /home/paul/journal-follow.log"
Switch back to kde session.
From desktop context menu -> Leave -> Shutdown
(returned to SDDM login screen, no shutdown)
Switch back to root user and terminate journalctl --follow
root logout and return to SDDM login screen, login as normal user and retrieve log file.
I also cannot replicate the issue in a VM with archlinux. Just a crazy thought: maybe intel microcode is the edge case that @David Edmundson is looking for? I have received a few updates on that lately. I will investigate a bit more. (In reply to Iyán Méndez Veiga from comment #46) > I also cannot replicate the issue in a VM with archlinux. Just a crazy > thought: maybe intel microcode is the edge case that @David Edmundson is > looking for? I have received a few updates on that lately. I will > investigate a bit more. Both my machines are AMD based, I don't even have ucode-intel (ucode-intel-20200609-1.1) installed... Got it :/ There's a one character typo which then exposes a race condition on whether plasma-shutdown processes ksmserver before startkde does. Thanks for all your help. *processes ksmserver quitting A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/101 Wow... just a missing capital letter. Thanks for fixing it! I confirm that the tiny little patch fixes the problem :D > Git commit aaed0138ca8feebb9d45b9c4a2dfd5df651ad972 by David Edmundson. > Committed on 21/06/2020 at 12:03. > Pushed by davidedmundson into branch 'Plasma/5.19'. > > Fix case of monitored service in startplasma's shutdown > > Startplasma monitors ksmserver and tears down the session if it goes > away, to match previous behaviour and as some lockscreen bypass > protection. > > When we teardown our new binary plasma-shutdown appears, runs scripts > and makes the final shutdown call. ksmserver could gracefully quit in > the meantime, so startplasma guarded this case and waited till both > names exited. However it contains a really stupid typo. > > M +1 -1 startkde/startplasma.cpp *** Bug 423477 has been marked as a duplicate of this bug. *** > I confirm that the tiny little patch fixes the problem :D
What patch?
Same problem on Debian Buster 10.13
Please upgrade; you're using ancient software that's missing years of bugfixes. Debian Buster is actually an LTS release until the end of June 2024. One of Debian stable release drawbacks is that unless a package has a security vulnerability it will almost never get fixed during the lifetime of that release. And this "log out instead of shutting down" problem is more of a UX issue than anything else. But point taken, I will upgrade!) Thanks. |