Skip to contentSkip to conversation

Power-button event after resume from S3

DISCUSSION Felix Kuehling 2 participants 2 messages Apr 6, 2006 ACPI

lore
Share & tools
lore
#0 lore raw

Hi,

I am investigating a problem where acpid receives a power-button event immediately after resuming from S3. I looked at the mailing list archives and found that this problem is not entirely uncommon. The advice users got so far all looked like workarounds for the real problem. The same goes for
http://bugzilla.kernel.org/show_bug.cgi?id=3525, which further declares it as a bug in acpid. However, I'm not sure it is really a bug in acpid.

This is my understanding:

The only ways for acpid to distinguish power-up and power-down are hacks that somehow remember that the system is going into suspend and to ignore the next power button event. However, there is no guarantee that there will be such an event after resuming, so you need some kind of a time-out. All that doesn't feel very robust to me and that's why I'm calling it a hack.

The kernel on the other hand has more information. It could reliably distinguish power-up and power-down events. The first SCI interrupt after resume always seems to be the power-up event, no time-out required. Thus it could generate different events for power-up and power-down in /proc/acpi/event. That would make it much easier and cleaner for acpid to distinguish them and take the appropriate action.

Finally my assumption is that it is correct behaviour for the ACPI hardware to report the power-button to the OS on resuming from S3. I came to that conclusion after reading parts of the ACPI 2.0 spec. Please confirm.

Are there plans for a real fix for this problem, either in the kernel or in acpid?

Thanks,
Felix

P.S.: Please include the CC-list on replies.

#1 lore raw
Quoted 3 lines

I am investigating a problem where acpid receives a power-button event immediately after resuming from S3. I looked at the mailing list archives and found that this problem is not entirely uncommon.

Yes, I noticed this problem once I turned on acpi_serialize and told ACPI to pretend I'm running "Microsoft Windows". Then the Fn key no longer resumed from S3, and I had to slide the power switch, which generated wakeup and powerbutton events -- so it woke up and then shut down. [this is with a TP 600X]

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
--Bertrand Russell, _War Crimes in Vietnam_, chapter 1.