public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Power-button event after resume from S3
@ 2006-04-11  1:11 Yu, Luming
  2006-04-11  2:35 ` Sanjoy Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Yu, Luming @ 2006-04-11  1:11 UTC (permalink / raw)
  To: Felix Kuehling; +Cc: linux-acpi, Matthew Tippett, Chang-Hwa Lee, Samuel Li

>Before working on a patch I'd like to be sure that there is a general
>consensus that this is indeed The Right Way (TM) to fix the problem.
>Whose blessing would a patch need before being accepted?

I think this is the simplest and right way to fix this problem.
And, it should be accepted. :-)

>> Probably, you need to hack acpi_button_notify.
>> like:
>> 
>> if (acpi_in_suspend)
>> 	don't generate event.

More precisely,  it should be:
acpi_button_notify:
	if(acpi_during_suspend_resume)
		don't generate power button event to confuse user space
daemon,



^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Power-button event after resume from S3
@ 2006-04-07  2:49 Yu, Luming
  2006-04-10 20:47 ` Felix Kuehling
  0 siblings, 1 reply; 10+ messages in thread
From: Yu, Luming @ 2006-04-07  2:49 UTC (permalink / raw)
  To: Felix Kuehling, linux-acpi; +Cc: Matthew Tippett, Chang-Hwa Lee

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

We need a  patch to handle the wakeup power-button event.
Do you want to hack a patch for this?

Probably, you need to hack acpi_button_notify.
like:

if (acpi_in_suspend)
	don't generate event.

--Luming

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Power-button event after resume from S3
@ 2006-04-06 20:12 Felix Kuehling
  2006-04-06 22:15 ` Sanjoy Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Felix Kuehling @ 2006-04-06 20:12 UTC (permalink / raw)
  To: linux-acpi; +Cc: Matthew Tippett, Chang-Hwa Lee

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.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-04-14  9:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11  1:11 Power-button event after resume from S3 Yu, Luming
2006-04-11  2:35 ` Sanjoy Mahajan
2006-04-11  4:14   ` Nigel Cunningham
2006-04-13 14:28     ` Felix Kuehling
2006-04-14  5:33       ` Nigel Cunningham
2006-04-14  9:29         ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2006-04-07  2:49 Yu, Luming
2006-04-10 20:47 ` Felix Kuehling
2006-04-06 20:12 Felix Kuehling
2006-04-06 22:15 ` Sanjoy Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox