$ gsettings get org.gnome.settings-daemon.plugins.power power-button-action
'suspend'
and yet when I press the power button on the laptop, the shutdown dialog appears.
I looked in the tweak tool and cannot find a setting for this. This thread shows there used to be a âshellâ section, but itâs not there for me. Here is what I see:
Hi, you can change power button behavior under the Power settings in the normal (not Tweaks) control center.
There is quite some logic to determine possible options, and it may be that the âsuspendâ option wonât be one of them in this case. This depends on the capabilitities of your system. But you can suspend from the Shell menu normally?
Also I noticed that suspending from the menu does not do anything other than the following message appearing in the log:
lip 03 15:56:36 tinkpad2 gnome-shell[6657]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:192:20
suspend@resource:///org/gnome/shell/misc/loginManager.js:215:21
activateSuspend@resource:///org/gnome/shell/misc/systemActions.js:465:28
_init/<@resource:///org/gnome/shell/ui/status/system.js:177:33
addAction/<@resource:///org/gnome/shell/ui/popupMenu.js:753:21
activate@resource:///org/gnome/shell/ui/popupMenu.js:193:14
_init/<@resource:///org/gnome/shell/ui/popupMenu.js:110:24
@resource:///org/gnome/shell/ui/init.js:21:20
However the system suspends as expected when I simply close the lid.
The gnome-control-center section Matthijs tell you about only appears if any of CanSuspend or CanHibernate methods returned âyesâ, so it seems both fail for you, you can confirm this by running them from terminal: