After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725960 - Allow suspend from the lock screen
Allow suspend from the lock screen
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: system-status
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-08 23:53 UTC by Andy Lutomirski
Modified: 2016-05-27 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
system: Do not disable suspend action when locked (1.09 KB, patch)
2015-03-19 00:33 UTC, Florian Müllner
none Details | Review
loginManager: Extend canSuspend() callback (1.63 KB, patch)
2016-05-26 20:54 UTC, Florian Müllner
committed Details | Review
system: Do not disable suspend action when locked (1.58 KB, patch)
2016-05-26 20:54 UTC, Florian Müllner
committed Details | Review

Description Andy Lutomirski 2014-03-08 23:53:10 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.
Comment 1 Bastien Nocera 2014-11-09 20:10:51 UTC
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.
Comment 2 Florian Müllner 2015-03-19 00:33:15 UTC
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.
Comment 3 Florian Müllner 2015-03-19 00:34:22 UTC
I'll leave it to the designers whether we actually want the button there ...
Comment 4 Allan Day 2016-05-26 14:51:58 UTC
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.
Comment 5 Bastien Nocera 2016-05-26 15:01:06 UTC
(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.
Comment 6 Florian Müllner 2016-05-26 20:54:30 UTC
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.
Comment 7 Florian Müllner 2016-05-26 20:54:50 UTC
Created attachment 328600 [details] [review]
system: Do not disable suspend action when locked
Comment 8 Florian Müllner 2016-05-26 21:03:39 UTC
(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 ...
Comment 9 Rui Matos 2016-05-27 14:40:09 UTC
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
Comment 10 Rui Matos 2016-05-27 14:41:26 UTC
Review of attachment 328600 [details] [review]:

lgtm
Comment 11 Florian Müllner 2016-05-27 15:06:57 UTC
Attachment 328599 [details] pushed as 1cb6445 - loginManager: Extend canSuspend() callback
Attachment 328600 [details] pushed as 2425b11 - system: Do not disable suspend action when locked