# Where are all those power buttons ?

## javeree

I am using acpid to react on a push of the power button and fo a fast shutdown (or, since yestarday a hibernate-ram).

Thsi PC has a single power button on the front. A short press activated the button/power event. A long press cuts the power.

When I look at dmesg, I see the following:

 *Quote:*   

> input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1
> 
> ACPI: Power Button [PWRB]
> 
> input: Sleep Button as /devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input2
> ...

 

So that is three buttons detected. How would these buttons be related to actual buttons (e.g. could I also intercept a long-press with acpid, if so, with which event ?).

If one of the acpi inputs above would represent the long press, what could possibly represent the third one ? My guess is it is just an option on the motherboard, but not connected to an actual button. What are your thought ?Last edited by javeree on Fri Oct 14, 2011 7:37 pm; edited 1 time in total

----------

## eccerr0r

The long press tends to be a motherboard/hardware nonmaskable power off for emergency situations.  This is the "delay 4 seconds" option in bios, the quick tap sends an event through ACPI... now that there's no way to turn the machine off, the solution to hold down the button to "really" turn off the machine...

The sleep button is weird, actually for laptops, sometimes the sleep button is mapped to a keyboard event.  I suspect the 'other' power button is another event input that may or may not be hooked up.  This is all completely dependent on how the motherboard is designed, some have an input for a sleep button for the panel.  Some use the 'win98' power/sleep button to trigger an ACPI power/sleep event...

(oh, please fix your title, your posting title sounds like you're insulting some buttons :))

----------

## javeree

I believe that indeed the most probable explanation is that the motherboard has support for that sleep button, but that the case doesn't have one.

I guess it makes little sense to try to relate the keyboards power button to the ACPI event, and that it is much easier to use keyboard handling events to use that one.

I've edited my title and humbly apologise to all non-poser buttons  :Smile: 

----------

