I would like my Ubuntu 14.04 to shut down (shutdown -h now) when I press the physical power button on the PC, regardless of whether it is locked or not. Works great on every windows machine, why doesn't this work on Ubuntu?

It has been suggested to "shortcircuit" /etc/acpi/powerbtn.sh by adding the command before if pidof x $PMS > /dev/nullso it always initiates shutdown when pressed but I haven't gotten this working either.

1 Answer 1


It only works for me if I short circuit the /etc/acpi/powerbtn.sh completely by inserting

shutdown -h now

at the very beginning. It's still a hack but now it works every time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .