public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops
@ 2005-03-08  6:58 Li, Shaohua
  2005-03-08  9:47 ` Bernard Blackham
  0 siblings, 1 reply; 10+ messages in thread
From: Li, Shaohua @ 2005-03-08  6:58 UTC (permalink / raw)
  To: Bernard Blackham, Pavel Machek; +Cc: acpi-devel, suspend2-devel

>>
>> Perhaps you should fix that, too? It is going to cause ugly
>> perfrmance problems.
>
>Yep, been looking into it, and I think I've got it. The GPE in
>question is fired periodically, about every 5 seconds. It fires when
>suspending but kacpid is stopped, so the GPE is simply disabled and
>never serviced. However, the state of it being disabled is recorded
>in the atomic copy.
>
>Upon resume, after restoring the atomic copy, the code at the top of
>acpi_ev_disable_gpe believes that the GPE is already disabled (as it
>was when we suspended) even though it's not. Hardware state is out
>of sync with what the kernel thinks and badness ensues. The culprit
>difference between 2.6.8 and 2.6.9-rc1 is that 2.6.8 disabled the
>GPE unconditionally, 2.6.9-rc1 checks against its last known state
>which is incorrect upon resuming.
>
>Removing the check resolves this issue (patch attached). Is this an
>adequate fix?
Great analyzing! I guess Both S3, swsusp, and swsusp2 can't suffer from
this bug. Sure this patch hasn't any side effect. But I wonder if it's
the right fix. Maybe we should disable all GPEs which have been disabled
on very early of resume (that is to restore ACPI hardware's state). This
is very useful for suspend-to-disk. If you found a similar bug in S3, it
possibly it's BIOS bug (OS didn't enable GPE on resume for S3, but for
S4, we follow boot time code path, so we possibly enabled some).

Thanks,
Shaohua

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops
@ 2005-03-08  7:24 Li, Shaohua
  0 siblings, 0 replies; 10+ messages in thread
From: Li, Shaohua @ 2005-03-08  7:24 UTC (permalink / raw)
  To: Li, Shaohua, Bernard Blackham, Pavel Machek; +Cc: acpi-devel, suspend2-devel

>>Yep, been looking into it, and I think I've got it. The GPE in
>>question is fired periodically, about every 5 seconds. It fires when
>>suspending but kacpid is stopped, so the GPE is simply disabled and
>>never serviced. However, the state of it being disabled is recorded
>>in the atomic copy.
>>
>>Upon resume, after restoring the atomic copy, the code at the top of
>>acpi_ev_disable_gpe believes that the GPE is already disabled (as it
>>was when we suspended) even though it's not. Hardware state is out
>>of sync with what the kernel thinks and badness ensues. The culprit
>>difference between 2.6.8 and 2.6.9-rc1 is that 2.6.8 disabled the
>>GPE unconditionally, 2.6.9-rc1 checks against its last known state
>>which is incorrect upon resuming.
>>
>>Removing the check resolves this issue (patch attached). Is this an
>>adequate fix?
>Great analyzing! I guess Both S3, swsusp, and swsusp2 can't suffer from
>this bug. Sure this patch hasn't any side effect. But I wonder if it's
>the right fix. Maybe we should disable all GPEs which have been
disabled
>on very early of resume (that is to restore ACPI hardware's state).
This
>is very useful for suspend-to-disk. If you found a similar bug in S3,
it
>possibly it's BIOS bug (OS didn't enable GPE on resume for S3, but for
>S4, we follow boot time code path, so we possibly enabled some).
Oops, my bad. ACPI has done this, so 'platform' method should survive.
For S5 method, we should disable the disabled GPEs. Leaving the GPE on
will have other side effects. S5 method also has other side effect (Eg.
doesn't invoke _WAK), so I suggest always use 'platform' method.

Shaohua

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Re: [Suspend2-devel] Cause of Suspend2 resume failures on Toshiba laptops
@ 2005-03-08  3:25 Li, Shaohua
  2005-03-08  5:28 ` [ACPI] " Nigel Cunningham
  0 siblings, 1 reply; 10+ messages in thread
From: Li, Shaohua @ 2005-03-08  3:25 UTC (permalink / raw)
  To: Bernard Blackham, Dumitru Ciobarcianu
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	suspend2-devel-g/J2nbn7YhmWn91e4EydUaxOck334EZe

>
>On Sat, Mar 05, 2005 at 10:44:58AM +0200, Dumitru Ciobarcianu wrote:
>> ??n data de S??, 05-03-2005 la 01:50 +0800, Bernard Blackham a scris:
>> > The attached patch more or less reverts the change in 2.6.9-rc1
that
>> > began this all. If you have a Toshiba or other laptop that's
>> > affected by this, I ask you to see if it helps your problems. (It
>> > hacks around the problem rather than fixing it, but I'm not
entirely
>> > sure what functionality it disables).
>>
>> You are on the right track , it does the trick, I did serveral
>> suspend/resume cycles whitout problems.
>>
>> But (yes, it's a but :) it is functionally equivalent with using the
>> other workaround (booting at resume with acpi=off) meaning that I
lose
>> all the acpi events (AC events, LID events, etc). The system records
the
>> event (if I do an "watch cat /proc/acpi/ac_adapter/ADP1/state" it
shows
>> the current state correctly) but acpid does not receive the event,
and
>> thus can not act accordingly :(  (Toshiba Satellite Pro 6100)
>
>Ahh, d'oh. Try this patch instead.
>
>After more investigation, it seems that the issue is the GPE is
>fired but not serviced because kacpid is frozen. This in itself
>would be okay, however, the GPE isn't being disabled before the
>method executes (despite there being code there to do so), and hence
>fires continuously.
>
>The attached patch makes kacpid NOFREEZE so the GPE does get
>serviced (eventually), but probably still isn't the correct
>solution. (A better solution being making sure the GPE gets disabled
>in the first place ... still looking into this).
Hi,
Did you guys try the suspend method 'platform'? In this case, ACPI will
disable all non-wakeup GPEs.

Thanks,
Shaohua


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <20050304175058.GA4042@blackham.com.au>]

end of thread, other threads:[~2005-03-08 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-08  6:58 [ACPI] Re: Cause of Suspend2 resume failures on Toshiba laptops Li, Shaohua
2005-03-08  9:47 ` Bernard Blackham
     [not found]   ` <20050308094711.GC20154-4vSAtV5O1nc0n/F98K4Iww@public.gmane.org>
2005-03-08 10:02     ` Re: [Suspend2-devel] " Sebastian Kügler
  -- strict thread matches above, loose matches on Subject: below --
2005-03-08  7:24 [ACPI] " Li, Shaohua
2005-03-08  3:25 Re: [Suspend2-devel] " Li, Shaohua
2005-03-08  5:28 ` [ACPI] " Nigel Cunningham
2005-03-08  6:12   ` Li Shaohua
2005-03-08  6:55     ` Nigel Cunningham
     [not found] <20050304175058.GA4042@blackham.com.au>
     [not found] ` <1110012298.6028.10.camel@DustPuppy.LNX.RO>
     [not found]   ` <20050305100254.GH4042@blackham.com.au>
2005-03-05 17:56     ` Re: [Suspend2-devel] " Pavel Machek
2005-03-05 20:35       ` [ACPI] " Bernard Blackham
2005-03-06 12:33         ` Pavel Machek
2005-03-07 16:48         ` Re: [Suspend2-devel] " John M Flinchbaugh
2005-03-07 16:54           ` [ACPI] " Bernard Blackham

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