Why the power button didn’t shut off my Linux server

Linux logo - sit3-shine.7 Short answer:
In my case, the /user/share/acpi-support directories were missing.  I didn’t know that until I learnt how to debug the power function.  For that, I had to look at the ACPI Daemon.
Note: I’m talking about Ubuntu 9.10/10.4 releases here.  Your Linux may be different.

Longer answer:
The ACPID is what processes any power events.  But it wasn’t, and I couldn’t find out why.  In the words of Paul Thurrott, if you don’t have what it takes to make Linux work, then you don’t deserve to run it.

And I really wanted to get Linux running, so I persevered.

This is what should happen when the power button is pressed:

  1. ACPID parses the config file /etc/acpi/events/powerbtn
  2. ACPID then looks at /usr/share/acpi-support/power-funcs
  3. ACIPD calls the /etc/acpi/powerbtn.sh
  4. powerbtn.sh calls shutdown –now
  5. Linux server powers off.

For me, it failed at step 2.

But to find that out, I had to run this command:
acpid –d

which errored with:
acpi error - Can't open /usr/share/acpi-support/power-funcs
( Can’t open /usr/share/acpi-support/power-funcs)

My fix?
apt-get --reinstall install acpi acpi-support acpid

In conclusion, Linux reminds me of the Planning Department in Hitchhiker’s Guide To The Galaxy.  The information is out there, but it’s so frikking hard to find.

Yes,” said Arthur, “yes I did. It [the planning notice] was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard’.”

Bookmark and Share