Power Button on Linux

Post Reply
cabal95
Posts: 2
Joined: Mon May 17, 2010 10:46 pm

Power Button on Linux

Post by cabal95 »

I am using Fedora 12 on my new fit-pc2i. Everything (so far) seems to work fine, network, usb, etc. except the power button. I get an error in the kernel log about not being able to register the power button event. When I press the power button the machine turns on. If I hold the power button down for 5 seconds the machine hard turns off. If I press the power button to request an OS shutdown, nothing happens.

Does the power button work properly on Ubuntu? And if so is there a patch I can apply to the vanilla kernel to get the power button to work? We are trying to deploy this as a "plug and play" server. They plug it in, it turns off. When they are done they hit a single button and wait for the power light to turn off.

I would prefer not to have to buy a usb panic button that triggers a shutdown, while it would be funny it would give the wrong impression to the user. :)

UPDATE: It seems the power button kind of works. It does not trigger at all in console mode (which is should), but if I am logged in to X-Windows pushing the power button twice will bring up the "shutdown your computer?" dialog. So it seems to "mostly work", just not as a standalone way to shut down the computer.

prj
Posts: 90
Joined: Tue May 12, 2009 9:13 am

Re: Power Button on Linux

Post by prj »

The error message can probably be ignored. I get them as well but my power button works correctly. Check if you have /proc/acpi/button/power/PWRB.

In Ubuntu you have /etc/acpi/events/powerbtn which maps the event to a script (/etc/acpi/powerbtn.sh in my case). This script decides what to do with the event.

Good luck

Post Reply

Return to “Linux on fit-PC2”