Skip to contentSkip to conversation

ACPI; S5 state; powerbutton->clean shutdown

DISCUSSION Wilkinson, Alex 2 participants 6 messages Jan 7, 2005 – Jan 10, 2005 3 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hi all,

Can some please recommend to me the correct method in Linux to confirm whether or not pressing the power-button on an ATX box triggers an ACPI state S5 (for both 2.6 and 2.4 kernels).

In the FreeBSD world I would do something like:

#sysctl hw.acpi.power_button_state
hw.acpi.power_button_state: S5

#grep acpi_button /var/run/dmesg.boot
acpi_button0: <Power Button> on acpi0

Distributions are Redhat 9.0, Fedora Core 3, and SuSE Enterprise 9.2.

Cheers

-aW

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

A message that is not in the archive (sent off-list or not yet received): 20050107005652.GA17647-670g5dPm81kHVWjHP2o3SMhQixhbPYnYEK66K81epY8@public.gmane.org

#2 lore raw
Quoted 3 lines · Alex

Can some please recommend to me the correct method in Linux to confirm whether or not pressing the power-button on an ATX box triggers an ACPI state S5 (for both 2.6 and 2.4 kernels).

Linux has no in-kernel policy for acpi events. The userspace acpid (SuSE have something with a different name) receives the events and can be configured to do anything in response.

Signature · 8 lines
Matthew Garrett | [email protected]



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
#3 lore raw

0n Fri, Jan 07, 2005 at 01:24:16AM +0000, Matthew Garrett wrote:

>On Fri, 2005-01-07 at 11:26 +1030, Wilkinson, Alex wrote:
>
>> Can some please recommend to me the correct method in Linux to confirm >> whether or not pressing the power-button on an ATX box triggers an ACPI >> state S5 (for both 2.6 and 2.4 kernels).
>
>Linux has no in-kernel policy for acpi events. The userspace acpid (SuSE >have something with a different name) receives the events and can be >configured to do anything in response.

man page ?
Tool to disassemble DSDT into ASL ?

- aW

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

A message that is not in the archive (sent off-list or not yet received): 20050107013051.GF17647-670g5dPm81kHVWjHP2o3SMhQixhbPYnYEK66K81epY8@public.gmane.org

#5 lore raw
Quoted 8 lines · Alex

0n Fri, Jan 07, 2005 at 01:24:16AM +0000, Matthew Garrett wrote:

>Linux has no in-kernel policy for acpi events. The userspace acpid (SuSE >have something with a different name) receives the events and can be >configured to do anything in response.

man page ?
Tool to disassemble DSDT into ASL ?

I'm not quite sure what you're asking. You can check if the power button will generate an ACPI event by checking whether it's present in /proc/acpi/buttons/ - you shouldn't need to touch the DSDT. acpid seems to have a manpage. Intel's ACPI compiler includes a disassemble option.

Signature · 8 lines
Matthew Garrett | [email protected]



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
#6 lore raw

0n Fri, Jan 07, 2005 at 12:46:33PM +0000, Matthew Garrett wrote:

>On Fri, 2005-01-07 at 12:00 +1030, Wilkinson, Alex wrote:
>> 0n Fri, Jan 07, 2005 at 01:24:16AM +0000, Matthew Garrett wrote:
>
>> >Linux has no in-kernel policy for acpi events. The userspace acpid (SuSE
>> >have something with a different name) receives the events and can be
>> >configured to do anything in response.
>>
>> man page ?
>> Tool to disassemble DSDT into ASL ?
>
>I'm not quite sure what you're asking. You can check if the power button >will generate an ACPI event by checking whether it's present >in /proc/acpi/buttons/ - you shouldn't need to touch the DSDT. acpid >seems to have a manpage. Intel's ACPI compiler includes a disassemble >option.

Ok, thanks. I have a RH 9.0 (2.4.20-8smp) that does not have ACPI support. Do 2.4 kernels support ACPI ?

If not, is it possible to configure a 2.4 system to do a clean shutdown upon a power button press ?

Cheers

- aW

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

A message that is not in the archive (sent off-list or not yet received): 20050110031008.GD24291-670g5dPm81kHVWjHP2o3SMhQixhbPYnYEK66K81epY8@public.gmane.org

#8 lore raw
Quoted 2 lines · Alex

Ok, thanks. I have a RH 9.0 (2.4.20-8smp) that does not have ACPI support. Do 2.4 kernels support ACPI ?

Yup. It's a compile option, though, so it's possible that it was disabled in your kernel.

Signature · 8 lines
Matthew Garrett | [email protected]



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt