Power button prompts for confirmation!

Preface

Gnome devs about that decision (Sounds sane).

$ systemd-inhibit

WHO                            UID  USER PID  COMM            WHAT                                                     WHY                                                         MODE 
ModemManager                   0    root 884  ModemManager    sleep                                                    ModemManager needs to reset devices                         delay
NetworkManager                 0    root 979  NetworkManager  sleep                                                    NetworkManager needs to turn off networks                   delay
UPower                         0    root 1378 upowerd         sleep                                                    Pause device polling                                        delay
gnome-tweak-tool-lid-inhibitor 1000 vits 1578 gnome-tweak-too handle-lid-switch                                        user preference                                             block
vits                           1000 vits 1534 gsd-power       handle-lid-switch                                        External monitor attached or configuration changed recently block
vits                           1000 vits 1533 gsd-media-keys  handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block
vits                           1000 vits 1533 gsd-media-keys  sleep                                                    GNOME handling keypresses                                   delay
vits                           1000 vits 1534 gsd-power       sleep                                                    GNOME needs to lock the screen                              delay

8 inhibitors listed.

First

c78e19b51bd0e68869da28db394b3ee9880440e1.png


Then

Set InhibitorsMax=0 in /etc/systemd/logind.conf.
  • HandlePowerKey=poweroff is default

  • Setting PowerKeyIgnoreInhibited=yes instead of above is not working...
    ( 🤪️ man logind.conf: "Low level inhibitor locks ("handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch"), are always honored, irrespective of this setting.")


Finally

Pressing power button causes shutdown -- without confirmation.

PS: Now, obvious question: Where is i am exhibit idiotic and dangerous behavior?


Disclaimer: If i were your, i'm rather use a custom shortcut!

1 Like