How can I enable the power button on my server?

9,760

Solution 1

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

Solution 2

You just need to install acpid package (sudo apt-get install acpid), its just one package, nothing more and it will handle all powerbutton events (acpi-support contains more additional packages). Tested on ubuntu server 11.10

https://lists.ubuntu.com/archives/ubuntu-users/2011-November/253766.html

Share:
9,760

Related videos on Youtube

Kent Boogaart
Author by

Kent Boogaart

Microsoft MVP for Windows Platform Development 2009-2014 My blog is here Personal projects include: Workout Wotch KBCsv WPF Converters The Helper Trinity PCLMock Intuipic Kentis

Updated on September 18, 2022

Comments

  • Kent Boogaart
    Kent Boogaart almost 2 years

    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.

  • Kent Boogaart
    Kent Boogaart over 12 years
    I don't have an /etc/acpi/ directory, even after running sudo apt-get install acpi. Or am I supposed to just create it myself?
  • mikewhatever
    mikewhatever over 12 years
    That's because you need the 'acpi-support' package, as said above. Don't think any of the acpi related ones are included in the server edition.
  • Kent Boogaart
    Kent Boogaart over 12 years
    Perfect - thanks. Sorry, I misread your post initially.
  • mikewhatever
    mikewhatever over 12 years
    Glad I could help. :)
  • itsols
    itsols over 11 years
    @mikewhatever I presume you've implemented this power off feature. Does the server ask for user passwords or any such question or does it jsut shutdown directly?