I would like my Computer to just power off when I press the hardware Power Button. Instead I dialog with a countdown and Options (Cancel, Restart, Power Off) comes up. How to disable this dialog and power off immediately?

Or at least, how to set the countdown to much, much less then 60 seconds?

  • 1
    There is no easy way according to this – mikewhatever Jan 27 '18 at 13:14

Ubuntu 18.04

gsettings set org.gnome.SessionManager logout-prompt false

or you can also try

gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true

In Ubuntu 18.04 or any similar Linux variants with acpi (if not you can probably install), make a file called /etc/acpi/events/power with

sudo nano /etc/acpi/events/power

and put


inside the file, close it, then

sudo service acpid restart

This is probably the simplest solution that definitely works.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.