Bug 2321 - No ACPI button after sucessfull S3 resume on L3800C (nb not duplicate of 1409, 1661)
Summary: No ACPI button after sucessfull S3 resume on L3800C (nb not duplicate of 1409...
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Robert Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-17 05:04 UTC by Eric Valette
Modified: 2004-07-17 17:12 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.5-rc1-mm1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
My config file (28.98 KB, text/plain)
2004-03-17 05:05 UTC, Eric Valette
Details
my acpid sleep button handling script (325 bytes, text/plain)
2004-03-17 05:06 UTC, Eric Valette
Details
A patch to fix this issue (1.53 KB, patch)
2004-03-19 15:26 UTC, Karol Kozimor
Details | Diff
Updated patch for 2.6.6-rc3-mm1 (1.77 KB, patch)
2004-04-30 12:54 UTC, Eric Valette
Details | Diff

Description Eric Valette 2004-03-17 05:04:27 UTC
Distribution:Debian Sid
Hardware Environment: ASUS L3800C
Software Environment: gcc 3.3.3
Problem Description:
On this laptop, with this kernel version and passing acpi_sleep=s3_bios works
like a charm. I do not have to unload any module, or switch away from X. So I
would be perfectly happy if after resume, the ACPI buttons were still
functionning. I would like to publickly thank Karol Kosimor for that (as well as
for acpi4asus).

I had first to avoid to get a spurious PWR button event causing to shutdown
immediately after resume using a simple lockfile. But once I fixed this, I tried
to repush the Sleep button without luck. Using the script /etc/acpi/sleepbtn.sh
works however.

Steps to reproduce:
Push the sleep button, resume, try to push the sleep button again...

NB : the patch http://bugme.osdl.org/attachment.cgi?id=1208&action=view
suggested by Karol kosimor and that does the trick for him, does not work for
me. I've asked hime to compare his working .config with mine attached.

NB2 : I also  tested another patch to enable /proc/acpi/wakeup_devices and
enabled the sleep button there without luck.
Comment 1 Eric Valette 2004-03-17 05:05:11 UTC
Created attachment 2355 [details]
My config file
Comment 2 Eric Valette 2004-03-17 05:06:26 UTC
Created attachment 2356 [details]
my acpid sleep button handling script
Comment 3 Eric Valette 2004-03-17 05:24:27 UTC
I just noticed that the power button is still generating event but that it is
the only one. Did someone miss to reenable other buttons somewhere?
Comment 4 Karol Kozimor 2004-03-19 15:26:43 UTC
Created attachment 2370 [details]
A patch to fix this issue

Indeed, the patch from bug #1409 does not work with recent kernels (2.6.3 was
fine AFAIR). 

Anyway this patch, originally from Alexander Malysh <a.malysh@centrium.de> and
modified by me so it applies against 2.6.5-rc1-mm2 also fixes the problem,
though in a different way.
Comment 5 Eric Valette 2004-03-20 00:40:00 UTC
Thank you again Karol. It indeed fixes the bug. Could this be applied upstream
unless there are some known problem with this fix?
Comment 6 Eric Valette 2004-03-30 12:41:05 UTC
Just a few words to say that the proposed patche is broken on 2.6.5-rc3-mm1
because of the recent acpi_hw_enable_non_wakeup_gpes replacement by
acpi_hw_restore_gpes_on_wake ().

But what is sure is that 2.6.5-rc3-mm1 does not reenable ACPI controlled butons
after wakeup.
Comment 7 Eric Valette 2004-04-30 12:53:16 UTC
I have tried 2.6.6-rc3-mm1 that contains:

ACPI: Subsystem revision 20040326

The updated patch is indeed badly needed to fix this bug.

Now, as :

    1) this bug is open with several proposed patches for several kernel
versions for more than a month and a half,
    2) that I never heard anything serious by ACPI developpers about possible
issue of irq incorrectly restored because (at least on my ASUS L3800C) after
executing of _WAK irq's are enabled, so stored gpe bits (before suspend) will be
overwriten and not restored correctly while resume (bug analysis by Alexander
Malysh),

I would _really_ like to have someone _really_ analyse what happens (I can put
any trace in my kernel if you ask for it) and propose a better fix if this one
is not the best way to fix it.

I suspect the problem exist on other systems but as only _few_ do correctly
wakeup from S3, and even _less_ using dedicated ACPI buttons, they are just too
many other bugs masking the importance of this one...

But not correctly restoring interrupt status is generally a good way to crash a
system...
Comment 8 Eric Valette 2004-04-30 12:54:34 UTC
Created attachment 2763 [details]
Updated patch for 2.6.6-rc3-mm1
Comment 9 Len Brown 2004-05-11 21:53:54 UTC
The GPE re-write is almostm complete and should address this. 
Should be a grand new GPE patch in a few days -- stay tuned. 
 
thanks, 
-Len 
 
Comment 10 Eric Valette 2004-05-31 03:14:07 UTC
I'm tuned for about 3 weeks now and still haven't see any new code even in
2.6.7-rc1-mm1 :-(
Comment 11 Paul Ionescu 2004-06-14 09:44:34 UTC
Hi Eric,

Is the problem solved for you ?
Do you know in which version of kernel is the new GPE included.

Thank you.
Comment 12 Eric Valette 2004-06-24 07:43:46 UTC
I tested 2.6.7-mm2 with ACPI: Subsystem revision 20040615 and the bug is indeed
gone. Feel free to close this bug report once, this version of ACPI subsystem
enters the mainline (e. 2.6.8).

Thanks the intil people for the good work and Karol for the initial patches.

Note You need to log in before you can comment on or make changes to this bug.