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 681969 - Lock screen (screensaver activation) does not work with suspend button
Lock screen (screensaver activation) does not work with suspend button
Status: RESOLVED DUPLICATE of bug 670579
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
3.10
Depends on:
Blocks:
 
 
Reported: 2012-08-16 07:53 UTC by Petr Kočandrle
Modified: 2017-06-20 09:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Petr Kočandrle 2012-08-16 07:53:07 UTC
In keyboard shortcuts I've set the lock screen button (org.gnome.settings-daemon.plugins.media-keys.screensaver) to suspend button (XF86Sleep). Also I've set 'nothing' in org.gnome.settings-daemon.plugins.power.button-suspend to prevent suspending by pressing suspend button. But nothing happens if I press suspend button.

I use GNOME 3.4.2 in Fedora 17. It worked fine in Fedora 15/16 (GNOME 3.0.x/3.2.x).

There are 2 possible solutions for me. Add 'lock screen' as an option to org.gnome.settings-daemon.plugins.power.button-suspend or manage it to work again with this configuration.
Comment 1 Bastien Nocera 2012-10-08 09:36:44 UTC
*** Bug 685562 has been marked as a duplicate of this bug. ***
Comment 2 Petr Kočandrle 2012-10-08 09:42:02 UTC
I don't think bug 685562 is duplicate of this bug. This is about not locking screen without suspending, the mentioned bug is about not locking screen while suspended by power button.
Comment 3 Bastien Nocera 2012-10-08 17:19:18 UTC
You're right, will reopen.
Comment 4 Bastien Nocera 2013-04-18 08:24:44 UTC
Pretty sure this works in GNOME 3.8. Will test and close if that's the case.
Comment 5 Petr Kočandrle 2013-07-11 07:51:10 UTC
I've just tested this in Fedora 19 (GNOME 3.8.2) and it still doesn't work. Changing version to 3.8.x.
Comment 6 Benjamin Berg 2017-06-13 11:23:52 UTC
The current design is that this should *not* be working. Looking at:
 * The sleep button being hardcoded to XF86Sleep
   https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/media-keys/shortcuts-list.h?h=gnome-3-24#n103
 * The hardcoded list of button pre-empting any user defined key
   https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/media-keys/gsd-media-keys-manager.c#n758

So looks to me like this is the expected behaviour. Considering that this is probably a rare use case (feel free to suggest otherwise), I would suggest considering this issue to be "not a bug".
Comment 7 Petr Kočandrle 2017-06-14 08:44:27 UTC
Well, I used this setup because I didn't have any lock screen button on my keybopard and I never used suspend button to actually suspend the computer, because it can be done by closing the laptop lid, while I had no simple way how to lock the screen by a single key, which is what I was doing multiple times a day.

In the meantime I got a new laptop with no suspend button and with lock screen button, so it's not an issue for me anymore, while I can imagine it can be an issue for others.

Anyway, now in Gnome 3.22.2 (Fedora 25) the setting key org.gnome.settings-daemon.plugins.power.button-suspend was removed, which makes sense if the suspend action is hardcoded to the button.

Regarding the setting of lock screen action to XF86Sleep - I was just able to set the lock screen action to a "Wake" button by pressing the suspend button on another laptop (not sure if that's ok or if it catches a different key code), but during the configuration the computer got suspended. Also when trying to lock screen with this configured it suspended again. So I think there should not be an option to set this keyboard shortcut if the key is hardcoded to a different action. Or does it make sense to have mapped multiple actions to a single media key? When configuring an action to a key combination that is already used, it removes the original mapping, so I would expect something like "Cannot use this key" when trying to use a key with a hardcoded action.

But the suggestion is just polishing of current state, not a fix for my (former) use case. I understand Gnome tries to be as simple and dumb-proof as possible, so it removes a lot of configuration options, but this is useful when you have almost none media keys and you want to map a frequently used action to a single key instead of an unused original action.
Comment 8 Bastien Nocera 2017-06-20 09:37:07 UTC
This is a UI problem in that the Keyboard panel shouldn't allow you to create this binding in the first place. See duplicate bug.

Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 670579 ***