Re: [Suspend2-devel] Cause of Suspend2 resume failures on Toshiba laptops

Bernard Blackham
2005-03-05T10:02:54Z

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

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).

Bernard.

--
Bernard Blackham <bernard at blackham dot com dot au>

[-- Attachment #2: toshiba-acpi-hack-2.diff --]
[-- Type: text/plain, Size: 376 bytes --]

--- linux-2.6.9-rc1/drivers/acpi/osl.c.orig 2005-03-05 17:44:13.000000000 +0800
+++ linux-2.6.9-rc1/drivers/acpi/osl.c 2005-03-05 17:44:16.000000000 +0800
@@ -87,7 +87,7 @@
return AE_NULL_ENTRY;
}
#endif
- kacpid_wq = create_singlethread_workqueue("kacpid", 0);
+ kacpid_wq = create_singlethread_workqueue("kacpid", PF_NOFREEZE);
BUG_ON(!kacpid_wq);

return AE_OK;