Ubuntu – How to enable the power button on the server

acpihardwareservershutdown

The power button on my headless 11.10 server appears to do nothing unless I hold it in for 5 seconds or so, in which case it switches the machine off instantly.

What I'd like it to do if I press it briefly is a normal shutdown (shutdown -P now). How can I allow this?

I have seen this question but it is for desktop installations.

Best Answer

I believe you might need acpi-support. Check out the links below for more info on how to manipulate the power button press event.

http://blog.metalight.dk/2010/07/ubuntu-lucid-custom-power-button-event/

http://test.z13media.com/2010/03/disable-power-button-on-ubuntu-server.html