GNOME Bugzilla – Bug 725960
Allow suspend from the lock screen
Last modified: 2016-05-27 15:07:05 UTC
Unless a system is configured to suspend on lid close (which includes some but not all laptops and does not include machines that have no lids), there appears to be no way to suspend from the lock screen. On my Lenovo x220, the suspend button has no effect when pressed on the lock screen. (It works fine when unlocked.) The top-right menu does not offer the option to suspend (or, for that matter, to shutdown, restart, etc. [1]). Please fix this. I don't want to have to type my password to suspend, unless I've specifically configured the system like that. [1] Yes, I realize that the lack of power off from the lock screen is intentional. I disagree with that decision, but it's a separate issue from this bug.
This would be fixed once bug 711682 is fixed (we require that the action don't require a password to be entered). Not sure whether we want to add this in the menus anyway. Reassigning to the system-status component, which includes the top-right menu.
Created attachment 299773 [details] [review] system: Do not disable suspend action when locked gnome-settings-daemon now allows the corresponding keybinding, so for consistency it makes sense to show the button as well.
I'll leave it to the designers whether we actually want the button there ...
In the past we've disallowed any action that could be destructive while the device is locked. I've come to think that that's maybe a bit over cautious though - you see these kinds of actions in other operating systems, and it's probably futile to try and prevent such actions. The lock is mostly there to stop someone getting at your stuff, rather than stopping them from turning off the device.
(In reply to Florian Müllner from comment #2) > Created attachment 299773 [details] [review] [review] > system: Do not disable suspend action when locked > > gnome-settings-daemon now allows the corresponding keybinding, so > for consistency it makes sense to show the button as well. It doesn't check whether a password would be needed though. We'd need to know if we could suspend without interaction (a password) before showing the UI bits.
Created attachment 328599 [details] [review] loginManager: Extend canSuspend() callback The underlying logind API does not only indicate whether suspend is available, but also whether the user is eligible for executing the operation without further authentication. This information can be relevant, so pass it to the callback.
Created attachment 328600 [details] [review] system: Do not disable suspend action when locked
(In reply to Florian Müllner from comment #6) > Created attachment 328599 [details] [review] [review] > loginManager: Extend canSuspend() callback I don't think multiple boolean parameters make great API, so I'm a bit torn between changing the parameter to the string result from logind and keeping existing code working. I'm afraid I don't have any idea how much this is used by extensions ...
Review of attachment 328599 [details] [review]: I agree with the booleans aren't great API argument but mostly for published public APIs like gtk+. For this I think it's ok
Review of attachment 328600 [details] [review]: lgtm
Attachment 328599 [details] pushed as 1cb6445 - loginManager: Extend canSuspend() callback Attachment 328600 [details] pushed as 2425b11 - system: Do not disable suspend action when locked