GNOME Bugzilla – Bug 790128
Make it possible to shut down the computer the instant the power button is pressed
Last modified: 2019-03-20 11:50:32 UTC
I would like to shut down my computer by pressing the power button. Currently this is not possible. I understand that this is deliberate choice (and discussed in Bug 781108[0]), but I still believe it should be possible for the user to configure Gnome to make the computer shut down immediately when the power button is pressed. These are the main reasons I would personally prefer the power button to immediately shut down the computer: 1. When I turn off my desktop to reboot into Windows to play games, it's less effort to just click the power button, wait until it's off, and then click it again, than to go through a dialogue to reboot the computer, and it's nice to have a consistent way of rebooting into the other OS whether I'm going from Linux to Windows or from Windows to Linux. 2. When I turn off my desktop to leave it off for a while, I like to switch off the power strip my desktop is connected to, which means I wait until the computer is turned off. That means waiting for the 60 second timeout is obviously not feasible. 3. My desktop is also such that it's incredibly unlikely that anything will ever accidentally touch it, and I believe that's the case for a lot of desktop computers. 4. I have a computer connected to a TV, which acts more like an appliance than a personal computer. It has no keyboard or mouse connected, and is instead controlled via a web interface I wrote, where you can tell it to stream video/audio from a URL, or use a remote desktop feature to open netflix, etc. That web interface has a shutdown button, but sometimes it's just easier to press the power button instead of bringing up a phone and go to the web interface. That computer is currently running XFCE, but Gnome would also have worked really well for it, had it not been for the power button issue. I believe the situation is similar for a lot of potential appliance-like Linux systems. Now, I'm not arguing that there should be an easily accessible setting in gnome-control-center. I wouldn't mind it, but I don't care a lot about it. I just think there should be _some_ way to get Gnome to immediately shut down when the power button is pressed. A setting in dconf-editor would do just fine. [0]: https://bugzilla.gnome.org/show_bug.cgi?id=781108
I'm pretty sure that's what the "When the Power Button is pressed" option "Power Off" is supposed to do. It's implemented in gnome-settings-daemon in any case, not in gnome-session.
(In reply to Bastien Nocera from comment #1) > I'm pretty sure that's what the "When the Power Button is pressed" option > "Power Off" is supposed to do. It's implemented in gnome-settings-daemon in > any case, not in gnome-session. No, that's not how the "When the Power Button is pressed" option works. When it's set to Power Off, it'll just display the dialogue when the button is pressed (even though setting it to Suspend makes the computer suspend immediately when the button is pressed). This is the case for Gnome on both Ubuntu 17.10 and on Arch Linux (version 3.26.2 on the Arch Linux machine, 3.26.something on the Ubuntu one). I was discussing with someone in #gnome@freenode before creating this issue, and they thought it didn't fit in the gnome-session-daemon bug tracker because even if it wanted, G-S-D had no way to tell gnome-session to immediately shut down or something, so that's why I put it in gnome-session. If you think it fits better in gnome-session-daemon's bug tracker anyways, that's fine by me.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/369.