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 707095 - lock screen (without lock) inhibits suspend by power button
lock screen (without lock) inhibits suspend by power button
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-29 23:31 UTC by Jonathan
Modified: 2013-11-08 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
media-keys: Allow the power key in more places (7.63 KB, patch)
2013-11-06 16:57 UTC, Bastien Nocera
committed Details | Review

Description Jonathan 2013-08-29 23:31:58 UTC
the screen shield inhibits suspending by the physical power button. 
I have to unlock / unshield the screen before I can suspend the desktop with the power button. This does not feel intuitive nor desired to me.
Comment 1 Giovanni Campagna 2013-08-31 17:01:41 UTC
I'm not sure it's intuitive or not, but anyway it's up to gnome-settings-daemon to request a different behavior.
Comment 2 Florian Müllner 2013-08-31 17:28:35 UTC
If we want this, we will need some patches on the gnome-shell side as well I think - as far as I can see, screen shield uses the 'lock-screen' session mode regardless of whether the screen will actually be locked or not ...
Comment 3 Bastien Nocera 2013-09-04 20:05:59 UTC
(In reply to comment #2)
> If we want this, we will need some patches on the gnome-shell side as well I
> think - as far as I can see, screen shield uses the 'lock-screen' session mode
> regardless of whether the screen will actually be locked or not ...

I don't understand why it would need gnome-shell changes.

And while I agree that being able to press the power button to suspend is nice, the problem is that the power button is (still!) configurable, so you could potentially use it to shutdown the machine (with all the sort of warning dialogues that you don't want to see in a lock screen).

Can we remove the configuration for those darn buttons instead?
Comment 4 Florian Müllner 2013-09-04 20:23:09 UTC
(In reply to comment #3)
> I don't understand why it would need gnome-shell changes.

Because the report asks for the power button to work when the screen shield is showing while not being locked (e.g. lock is disabled).
Comment 5 Bastien Nocera 2013-09-04 20:31:31 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I don't understand why it would need gnome-shell changes.
> 
> Because the report asks for the power button to work when the screen shield is
> showing while not being locked (e.g. lock is disabled).

I still don't understand how that makes a difference... Because gnome-shell should transition to a locked screen shield when suspending? This should already be a transition it handles (eg. it's already a code path that could be taken if we ask the g-s-d power plugin to suspend on low battery, or when unused).
Comment 6 Florian Müllner 2013-09-04 20:39:03 UTC
(In reply to comment #5)
> > Because the report asks for the power button to work when the screen shield is
> > showing while not being locked (e.g. lock is disabled).
> 
> I still don't understand how that makes a difference... Because gnome-shell
> should transition to a locked screen shield when suspending?

No, because both the locked and unlocked shield use SHELL_KEYBINDING_MODE_LOCK_SCREEN. I guess you can set up the power button to work on the lock screen and check in the handler if the screen is actually locked and don't perform any action in that case - sounds ugly to me, but in that case you could indeed do without any changes on the shell side :-)
Comment 7 Bastien Nocera 2013-09-05 17:37:11 UTC
That is, if we wanted to be able to stop suspending using the power button when the screen lock was on. I don't see a reason to do that. If the person was in front of the computer, they could already hold that button to switch it off.
Comment 8 Florian Müllner 2013-09-05 18:03:02 UTC
(In reply to comment #7)
> If the person was in front of the computer, they could already hold 
> that button to switch it off.

Oh, true - I rest my case then :-)
Comment 9 Bastien Nocera 2013-11-06 16:57:59 UTC
Created attachment 259099 [details] [review]
media-keys: Allow the power key in more places

We allow using the power key pretty much everywhere now, but
we also ensure that we never show interactive dialogues on the
lock screen (something that was possible with other suspend/power
buttons already if more than more than one user was logged in,
or an interactive shutdown was configured).

See https://bugzilla.redhat.com/show_bug.cgi?id=980692
Comment 10 Florian Müllner 2013-11-06 17:12:08 UTC
Review of attachment 259099 [details] [review]:

LGTM
Comment 11 Bastien Nocera 2013-11-07 16:19:40 UTC
Attachment 259099 [details] pushed as b7827c1 - media-keys: Allow the power key in more places
Comment 12 Bastien Nocera 2013-11-08 13:33:29 UTC
This doesn't currently work due to some limitations in gnome-shell, see bug 711682