Bug 277774 - Hibernate with power button doesn't work when session locked
Summary: Hibernate with power button doesn't work when session locked
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 17:21 UTC by Philip
Modified: 2011-09-30 14:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip 2011-07-14 17:21:29 UTC
Version:           unspecified (using KDE 4.6.3) 
OS:                Linux

The power button, which is set to hibernate the system, doesn't do anything when the session is locked (Ctrl + Alt + L). Works fine otherwise.

I don't know if it's a bug or a feature, but it should be at least possible to configure the power button to hibernate the system even if the session is locked. I don't see any security advantage the way it is, because a person pressing the button could also hold it for a few secs until the system is brutally shut off and data loss may have occured.

Reproducible: Always

Steps to Reproduce:
1. Set power button to hibernate system (Power Management).
2. Lock session (Ctrl + Alt + L).
3. Press power button.

Actual Results:  
Nothing

Expected Results:  
Hibernate
Comment 1 Dario Freddi 2011-09-18 13:58:36 UTC
It is a feature, as when the session is locked the power manager denies any action (including this one). Although, it might make sense for hw actions such as suspend/shutdown/hibernate to be run even in this case. What do you think?
Comment 2 Philip 2011-09-18 14:47:48 UTC
I think that one should be able to hibernate the system in such a scenario (user logged on and session locked), but not shutdown (unless no user logged on) per default.
It probably should be up the user to decide if he wants to be able to shutdown the system even if someone is logged on, or completely disable the power button when the session is locked (like it is now).

There are cases when you just want to hibernate your computer without logging on. I don't see a security issue here, because no data are lost. And somebody who is willing to cause data loss by forcefully shutting off the computer could just hold the button or unplug the power cord, so this unresponsive power button isn't any security feature.
Comment 3 Dario Freddi 2011-09-18 14:51:43 UTC
I agree with you. Will change this behavior, thanks for your time.
Comment 4 Dario Freddi 2011-09-18 15:00:11 UTC
Git commit 2606ff0045470d360a2ad4ad8aeb2819f653676f by Dario Freddi.
Committed on 18/09/2011 at 16:57.
Pushed by dafre into branch 'master'.

Override ck check if the last active user requested to shutdown the session.

BUG: 277774

M  +1    -1    powerdevil/daemon/powerdevilpolicyagent.cpp

http://commits.kde.org/kde-workspace/2606ff0045470d360a2ad4ad8aeb2819f653676f
Comment 5 Dario Freddi 2011-09-30 14:12:54 UTC
Git commit 5dcd4fe8f6a4b5d0e84d9f3360dc2caa29f0b4a4 by Dario Freddi.
Committed on 18/09/2011 at 16:57.
Pushed by dafre into branch 'KDE/4.7'.

Override ck check if the last active user requested to shutdown the session.

BUG: 277774
FIXED-IN: 4.7.2

M  +1    -1    powerdevil/daemon/powerdevilpolicyagent.cpp

http://commits.kde.org/kde-workspace/5dcd4fe8f6a4b5d0e84d9f3360dc2caa29f0b4a4