Bug 3518 - disable event LID blocks SLPB and vice versa on wakeup from S3
Summary: disable event LID blocks SLPB and vice versa on wakeup from S3
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: i386 Linux
: P2 blocking
Assignee: Shaohua
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-07 06:39 UTC by Pawel Maziarz
Modified: 2005-01-26 23:08 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.9-rc3, 2.6.9-rc3-bk6, 2.6.9-rc3-mm2
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
acpidmp (65.60 KB, text/plain)
2004-10-07 23:10 UTC, Pawel Maziarz
Details
proposed patch (1.28 KB, patch)
2004-10-08 00:02 UTC, Shaohua
Details | Diff
patch to warnning user (1.13 KB, patch)
2004-11-10 21:37 UTC, Shaohua
Details | Diff
patch to warnning user (1.12 KB, patch)
2004-11-10 21:50 UTC, Shaohua
Details | Diff

Description Pawel Maziarz 2004-10-07 06:39:34 UTC
Distribution: Slackware 10
Hardware Environment: Notebook Aristo 2500, CPU Celeron 2.40Ghz
Problem Description:

When i go into S3 mode (echo mem >/sys/power/state), i can wakeup
by pressing SLPB (Fn+ESC on my laptop) or opening LID.
When i do that on a working system, kernel sends events
"button/sleep SLPB 00000080 00000000x" when i'm pressing Fn+ESC
and "button/lid LID 000000080 00000000x" when i'm openning or
closing LID.
But, when i disable LID (echo LID >/proc/acpi/wakeup) *or*
SLPB (echo SLPB >/proc/acpi/wakeup), i do cat /proc/acpi/wakeup
and i see that LID or SLPB is disabled, i can't go back
from S3 state.

Steps to reproduce:
echo LID >/proc/acpi/wakeup or echo SLPB >/proc/acpi/wakeup
and echo mem >/sys/power/state
Comment 1 Shaohua 2004-10-07 19:45:07 UTC
What is the problem? does disabling LID also make SLPB disabled and vice 
versa? If yes, please attach your acpidmp.
Comment 2 Pawel Maziarz 2004-10-07 23:10:50 UTC
Created attachment 3781 [details]
acpidmp

yes, disabling LID also make SLPB disabled and vice versa.
Comment 3 Shaohua 2004-10-08 00:02:53 UTC
Created attachment 3782 [details]
proposed patch

The LID and SLPB have the same wake GPE. Disabling one might also disable
another. The attached patch tries to resolve the issue. Please try.
Comment 4 Pawel Maziarz 2004-10-08 00:52:39 UTC
unfortunately with this patch, when LID or SLPB are disabled, both can wake up system.
Comment 5 Shaohua 2004-10-08 01:11:01 UTC
It's expected behavior. As I said, the LID and SLPB have the same wake GPE, 
you can't enable one but disable the other (it's the hardware design, software 
can't change it). I think both work is better than both failed.
Comment 6 Len Brown 2004-11-10 18:57:03 UTC
patch needs a warning so that user knows why
disabling sleep button didn't work
and that he also needs to disable LID button
to disable sleep button...
Comment 7 Shaohua 2004-11-10 21:37:40 UTC
Created attachment 4008 [details]
patch to warnning user

Ok, a new patch. It warnning user if the problem occurs, and disable/enable all
devices with same GPE, and let user to select.
Such as if BAT0 and BAT1 has the same GPE 1,
echo 'BAT0' >/proc/acpi/wakeup, an warnning reported and both BAT0 and BAT1 are
enabled, so user can choose how to do next step.
Comment 8 Shaohua 2004-11-10 21:50:51 UTC
Created attachment 4009 [details]
patch to warnning user

Oh, possibly more than two devices have the same GPE, the patch considers the
situation.
Comment 9 Len Brown 2004-12-05 20:38:39 UTC
patch in comment #8 applied (w/ printk syntax update) to acpi-test tree 
Comment 10 Len Brown 2005-01-26 23:08:20 UTC
shipped in linux-2.6.11-rc1 -- closing. 

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