GNOME Bugzilla – Bug 681969
Lock screen (screensaver activation) does not work with suspend button
Last modified: 2017-06-20 09:37: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.
*** Bug 685562 has been marked as a duplicate of this bug. ***
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.
You're right, will reopen.
Pretty sure this works in GNOME 3.8. Will test and close if that's the case.
I've just tested this in Fedora 19 (GNOME 3.8.2) and it still doesn't work. Changing version to 3.8.x.
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".
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.
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 ***