Bug 339453 - Unable to shut down from screen locker
Summary: Unable to shut down from screen locker
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-27 11:49 UTC by Eike Hein
Modified: 2014-11-03 08:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Hein 2014-09-27 11:49:27 UTC
Shutting down from the screen locker doesn't work for me. It appears to get stuck asking the session for confirmation - I heard a notification sound that I assume was a "Do you want to save this doc?" dialog box inside the session. When the countdown expires it will simply go to negative values then, i.e. "Shutdown in -7 seconds".

Reproducible: Always
Comment 1 Eike Hein 2014-09-27 11:49:52 UTC
Apologies if this is the wrong assignee - please relay it if you know who is clueful.
Comment 2 Bhushan Shah 2014-09-27 12:00:57 UTC
I can confirm this bug, it happens sometimes that countdown goes to negative value if done from the screenlocker
Comment 3 Eike Hein 2014-09-27 12:05:32 UTC
Test project /home/sho/devel/build/kde/workspace/plasma-workspace/ksmserver/screenlocker                                                                                                                                                                                
    Start 1: ksmserver-authenticatorTest                                                                                                                                                                                                                                
1/4 Test #1: ksmserver-authenticatorTest ......   Passed    2.86 sec                                                                                                                                                                                                    
    Start 2: ksmserver-logindTest                                                                                                                                                                                                                                       
2/4 Test #2: ksmserver-logindTest .............   Passed    0.22 sec                                                                                                                                                                                                    
    Start 3: ksmserver-ksldTest                                                                                                                                                                                                                                         
3/4 Test #3: ksmserver-ksldTest ...............   Passed    2.50 sec                                                                                                                                                                                                    
    Start 4: ksmserver-lockWindowTest                                                                                                                                                                                                                                   
4/4 Test #4: ksmserver-lockWindowTest .........   Passed    3.79 sec                                                                                                                                                                                                    

100% tests passed, 0 tests failed out of 4

Total Test time (real) =   9.38 sec
Comment 4 Eike Hein 2014-09-27 12:06:03 UTC
Sorry re comment #3, wrong ticket :(.
Comment 5 Martin Flöser 2014-10-06 08:19:46 UTC
I'm not the correct assignee for this and I don't know who it is, but I have explained to quite a lot of developers that shutting down from the screen locker is *impossible* to work. This just needs to be removed and should never have been added. I do not know who added it and why and I don't know where the code is. Some of that code got merged in without a proper review of the screenlocker maintainers (which I consider myself to be part of).
Comment 6 Martin Flöser 2014-11-03 08:59:03 UTC
Git commit ab190c149b67a8441fd901f8d554ef8fa4f56bdb by Martin Gräßlin.
Committed on 14/10/2014 at 05:32.
Pushed by graesslin into branch 'Plasma/5.1'.

Remove shutdown option from screen locker

Logging out from the locked screen is impossible. Logging out means
interaction with the session due to the session manager. The session
manager asks all applications to quit and applications are allowed to
ask for example saving changes. The session manager stopps the
logout in this case and asks the window manager to focus this window
and the session manager will only continue the logout once the
application resolved the situation. At any time in this process the
user is still able to abort the logout!

Switching to the application which needs interaction is impossible,
though as the screen is still locked. The result is a seemingly
frozen system as the logout cannot continue and there is no indication
what is going on.

Of course the lock screen cannot unlock the session for the logout as
that would circumvent the security. If the lock screen would unlock
one would just have to click the button and abort the logout really
fast to have the system unlocked. So this is clearly not an option.

The result is: we cannot implement this functionality in a working
and secure manner, so it's better to remove it.

REVIEW: 120577
FIXED-IN: 5.1.1

M  +0    -24   ksmserver/screenlocker/greeter/greeterapp.cpp
M  +0    -1    ksmserver/screenlocker/greeter/greeterapp.h
M  +0    -34   lookandfeel/contents/lockscreen/LockScreen.qml

http://commits.kde.org/plasma-workspace/ab190c149b67a8441fd901f8d554ef8fa4f56bdb