Bug 338360

Summary: Cannot log out
Product: [Plasma] plasmashell Reporter: Aleix Pol <aleixpol>
Component: generalAssignee: Sebastian Kügler <sebas>
Status: RESOLVED FIXED    
Severity: major CC: 0f3d254b, afiestas, bhush94, cordlandwehr, dan, demm, jan_braun, jpwhiting, kde, mgraesslin, mklapetek, vladi, yuking_net
Priority: VHI    
Version: 5.0.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Aleix Pol 2014-08-18 17:27:01 UTC
Since some time, I can't log out, I'm getting this output in .xsession-errors, I have no idea of what's going on... ideas?

kwin(8887)/(default) KWin::Workspace::updateClientArea: screens:  2 desktops:  2
kwin(8887)/(default) KWin::Workspace::updateClientArea: Done.
kwin(8887)/(default) KWin::Workspace::updateClientArea: screens:  2 desktops:  2
kwin(8887)/(default) KWin::Workspace::updateClientArea: Done.
plasmashell(8939)/(default) PlasmaQuick::Dialog::focusOutEvent: DIALOG:  hiding dialog.
kded5(6545)/(kded5) PowerDevil::PolicyAgent::AddInhibition: DBus service  ":1.7"  is requesting inhibition
kded5(6545)/(kded5) PowerDevil::PolicyAgent::AddInhibition: Added inhibition with cookie  3  from  "ksmserver"  with  ""
kded5(6545)/(kded5) PowerDevil::PolicyAgent::addInhibitionTypeHelper: Added interrupt session
ksmserver(6552)/(ksmserver) KSMServer::performLegacySessionSave: Saving legacy session apps
ksmserver(6552)/(ksmserver) KSMServer::performLegacySessionSave: Done saving  2  legacy session apps
ksmserver(6552)/(ksmserver) KSMServer::cancelShutdown: 7
ksmserver(6552)/(ksmserver) KSMServer::cancelShutdown: Client  "/home/kde-devel/kde5/bin/plasmashell"  ( 10148148cae2000140837591500000065520025 ) canceled shutdown.
kded5(6545)/(kded5) PowerDevil::PolicyAgent::ReleaseInhibition: Released inhibition with cookie  3
Comment 1 Martin Flöser 2014-08-18 18:10:57 UTC
I observed the same problem on my notebook. It doesn't work if I try to logout through Kickoff, though when using KRunner it worked.

What I observed when using Kickoff is that the KWin logout effect kicks in, but no UI is shown.
Comment 2 Alex Fiestas 2014-08-20 17:57:18 UTC
Same here :/
Comment 3 Aleix Pol 2014-09-18 02:25:05 UTC
Right, so I've been investigating a bit and the actual reason is the call to:
void KSMServer::cancelShutdown( KSMClient* c )

I thought the cause would be the PowerDevil::PolicyAgent::AddInhibition() call, but now I'm not so sure anymore. Also I have no idea how to trace who is calling the cancelShutdown thing. Anybody knows what plasmashell should be calling to cancel the shutdown?
Comment 4 Bhushan Shah 2014-10-18 03:48:49 UTC
Something like this? https://bugs.kde.org/show_bug.cgi?id=339187
Comment 5 Jeremy Whiting 2014-10-18 03:54:40 UTC
Aleix, I had the same issue, Konversation was preventing the logout. It was using a deprecated call to check if the session was closing, which was returning false, so it was preventing shutdown. Rebuild konversation and you should be able to logout fine again.
Comment 6 Andreas Cord-Landwehr 2014-10-18 08:46:55 UTC
@Jeremy: out of curiosity, can you be a little bit more verbose which deprecated call could cause this? (or the commit where it was fixed for Konversation?)
Comment 7 Bhushan Shah 2014-10-18 10:54:14 UTC
@Andreas : See bug report I mentioned.. Comment #4
Comment 8 Dan O. 2014-10-21 02:42:44 UTC
This is still affecting me in version 5.1.0.1

If I run "kquitapp plasmashell" then "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1" from a terminal I opened previously, I can obviously log out just fine. This is definitely suboptimal though.
Comment 9 Martin Klapetek 2014-10-23 11:46:40 UTC
Dan - what apps do you have opened while trying to logout? Can you confirm that manually closing all apps first before logging out does not help?
Comment 10 Dan O. 2014-10-23 16:13:39 UTC
(In reply to Martin Klapetek from comment #9)
> Dan - what apps do you have opened while trying to logout? Can you confirm
> that manually closing all apps first before logging out does not help?

I can confirm that. If I close every app, barring things like the network manager and klipper, I still can't log out. The error that I get in .xsession-errors is
"ksmserver: Client  "/usr/bin/plasmashell"  ( 10b3e0ed69000141386712800000007390004 ) canceled shutdown."
Comment 11 Aleix Pol 2014-10-23 16:52:29 UTC
I can confirm that too.

In fact, if you close plasmashell and trigger the logout call it works. Last time I looked into it it was clear to me that it was plasmashell blocking it somewhere.
Comment 12 Yuking 2014-10-29 14:48:27 UTC
The same problem:
ksmserver: Saving legacy session apps
ksmserver: Done saving  2  legacy session apps
clients should be empty,  false
completeShutdownOrCheckpoint called
completeShutdownOrCheckpoint called
completeShutdownOrCheckpoint called
completeShutdownOrCheckpoint called
ksmserver: 7
ksmserver: Client  "/kde/kde5/bin/plasmashell"  ( 
1059754572000141429876700000028590004 ) canceled shutdown.
Comment 13 Vladi 2014-11-04 19:12:59 UTC
same issue here running gentoo + sddm + systemd with the kde live plasma ebuilds
Comment 14 David Edmundson 2014-11-05 17:21:23 UTC
Git commit 8851c1b2e6f98797c218289152ac34d7af0313bb by David Edmundson.
Committed on 05/11/2014 at 16:47.
Pushed by davidedmundson into branch 'Plasma/5.1'.

Remove uneeded code to stop alt+f4 killing the window

This fixes ksmserver not being able to logout or shutdown correctly as
it was unable to kill Plasma.

Tests showed that pressing alt+f4 no longer kills the window anyway
(possibly a change in kwin?)
REVIEW: 121004

M  +1    -9    shell/desktopview.cpp

http://commits.kde.org/plasma-workspace/8851c1b2e6f98797c218289152ac34d7af0313bb