Bug 1415
Summary: | Lid switch can't wakeup machine from S3 | ||
---|---|---|---|
Product: | ACPI | Reporter: | Shaohua (shaohua.li) |
Component: | Power-Sleep-Wake | Assignee: | Shaohua (shaohua.li) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla, andrew.grover, aripollak, cpravn, daf, hhielscher, i_p_a_u_l, kotoml, linux, michich, mynarikj, poul_flindt, r40, roffermanns, ross, timo.warns |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.0-test7 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
patch for this error
A more reasonable fix patch with typos fixed Fixed version of patch patch 1: ACPI bus support for wakeup GPE patch 2: add user interface for wakeup GPE |
Description
Shaohua
2003-10-24 09:28:19 UTC
Created attachment 1171 [details] patch for this error this patch will create a proc entry called "/proc/acpi/wakeup_devices" >cat /proc/acpi/wakeup_devices will show all possible wake capable devices >echo devicename > /proc/acpi/wakeup_devices will enable the device to wakeup machine from sleeping state call >echo devicename > /proc/acpi/wakeup_devices again will disable the device's wakeup capablility. Created attachment 1231 [details]
A more reasonable fix
I'm not sure if this is the same problem, but it seems that after waking up from an S3 on my Thinkpad T41, nothing gets output anymore from /proc/acpi/event, preventing acpid from catching any more signals. Yep, in my T40 I encounter same problem like you. ACPI interrupt losts after resuming from S3. But This track doesn't address this error. It just enables wakecapable devices. Should I open a separate bug for that issue? Created attachment 1692 [details] patch with typos fixed I've tried Shaohua's patch from comment #2 (applied cleanly to 2.6.0-test11-bk12). It wouldn't compile. It had two typos and one missing variable declaration. I'm attaching a fixed patch. With this patch and 'echo "LID" > /proc/acpi/wakeup_devices' my IBM ThinkPad R40 is able to wakeup. (And I have the same problem as you. Is there a bug opened for it?) My patch is just a prototype, though it can work partly. Before it's merged, we must change much more. http://bugme.osdl.org/show_bug.cgi?id=1661 address power button interrupt lost after S3, but i'm not sure if it also address EC interrupt lost situation. But please try it. I tested this patch on a thinkpad t40p (2373 G1G), and you are right, it partly works. Opening up the lid resume the machine, BUT interrupts are lost (in my case INT9 acpi,ath0). Letting /proc/acpi/wakeup_devices untouched (LID disabled), I can resume the t40p with the power button (tried at least 3 times in a row). Just in case, booting with or without pci=noacpi do not change this behavior. tested kernel: 2.6.0 with acpi patch, with hwsleep.c and hwgpe.c patch, a corrected DSDT and updated BIOS and EMBEDDED CONTROLLER HTH to the quest of perfection Ben this half works for me (2.6.1-mm2, thinkpad R40). after echoing LID and SLPB to /proc/acpi/wakeup_devices I can now resume the laptop (I suspended by closing the lid and having an acpid script echoing 3 to /proc/acpi/sleep) However the next time I close the lid, acpid is not spotting anything (nothing in syslog). The backlight does go out but I can see Xwindows still running. Interestingly, /proc/acpi/button/lid/LID/state is being correctly set to open/closed as appropriate. No other patches were applied to the kernel. Re: comment #9, that would probably be related to the ACPI interrupt bug above. Indeed! I should read more (the fact the comment near the hwsleep.c patch has changed in 2.6.1 threw me a bit too). Using both patches together everything seems to work perfectly. I wonder if it might be worth adding LID and SLPB to the default enabled list - particularly since otherwise suspending means removing battery to get the machine to reboot! Thanks. for my R40e (2684HTG) this patch seems not to solve this thing. Applied it to an 2.6.1 kernel and tried it with and without echoing LID and SLPB to wakeup_devices.... but this doesnt help at all :-( I still have to pull out the battery to even get it shutdown. To me there seems to bo no reaction to my wakeup tries at all, not even backlight or harddisk. anything else i could try? This patch (typo fixed one) works for me. IBM Thinkpad R40 2681CDG. After applying I got the "no more acpi interrupts" problem, which in turn got fixed by applying patch in bug #1661. Thank you very much! :) <a href="http://bugzilla.kernel.org/attachment.cgi?id=1692&action=view">This patch</a>(Kernel 2.6.2) seems to work for my <a href="http://www.samsung.com/Products/NotebookPCs/SamsungPseries/NotebookPCs_SamsungPseries_NP10.htm"> Samsung P10 Notebook</a>. After enabling the power-button in /proc/acpi/wakeup_devices the Notebook resumes, but the LCD backlight stays off and all fans are running at full speed. I changed to the textconsole and pressed Ctrl-Alt-Del to reboot, which worked then. So the machine did resume but no backlight. I am using a custom DSDT for my notebook from acpi.sf.net. It's the only way to get information about temperature and battery-status. I know this isn't directly related to this - and some think bug 1661's patch fixes it, but my thinkpad t41 the interrupt for ACPI stops getting events after wake up. I tried applying this, and it works. But, after the first wakeup from this (ie, where the kernel WAS still getting ACPI events, and the power light is on), it works fine. The second time, when ACPI events are still not being received, it goes to "sleep" but is waken up right away. Just shows that somewhere that isn't getting cleared, not sure. Have not figured it out yet, but looking around. Created attachment 2325 [details]
Fixed version of patch
Previous fixed version of patch still had one typo. Refixed.
The patch doesn't help on IBM ThinkPad R40 (2681-BAG). Applied on 2.6.4 + acpi patch 200403011 or acpi patch 20040326. Still unable to resume from S3, simply no reaction (no disk spin etc). Did you enable the wakeup devices? The patch works well on my R40. > Did you enable the wakeup devices?
> The patch works well on my R40.
If you mean echoing LIDB etc. to wake_up devices, then no. I was in hurry
(before leaving office to catch a train) when dowloading all possible patches to
fix my problem. I'll try it and send result here.
Anyway, what's the official status of this patch? Will it be merged to official
ACPI patch anytime soon? Or is it a hack and must be implemented in more
standard way?
>> Did you enable the wakeup devices? >> The patch works well on my R40. > If you mean echoing LIDB etc. to wake_up devices, then no. Setting wake_up devices tried, works. Sorry for bothering and not reading all comments at first. the "fixed versino of patch" (2325) is identical to 1692 except for one line number - the actual code is unchanged - was this intended? > the "fixed versino of patch" (2325) is identical to 1692 except for one line
> number - the actual code is unchanged - was this intended?
Yep. Just one character really. But that change keeps the last line of the
patch from being left out. The previously missing line is just the boot-time
printing though, so the old version of the patch still works (but gives a warning).
I also am surprised that this patch hasn't been integrated yet. I guess the
intersection of ACPI, 2.6, and laptop users is pretty small.
IMHO lid and power button GPEs should be enabled unconditionally, and there should just be override capabilites in /proc/acpi/. Also, I'd say that this needs to be fixed _very soon_, as it seems a severe flaw to me that no wake GPEs are enabled when entering a sleep state. This patch works for me as well (Thinkpad R40, Kernel 2.6.4). However, after waking up the system (i.e. by using the power button), my system does a reboot instead of a resume. Joerg Kliewer wrote:
> This patch works for me as well (Thinkpad R40, Kernel 2.6.4). However, after
> waking up the system (i.e. by using the power button), my system does a reboot
> instead of a resume.
As mentioned ealier, the patch works on my R40 (with 2.6.4).
Does acpid daemon run on your system? Did you check its configuration? Perhaps
it causes the reboot.
Suspend does not work for me on my R40e Thinkpad. I'm using kernel 2.6.5, with the fixed patch applied. acpid is running, and the I've enabled wakeup devices in /proc/acpi/wakeup_devices. Entering S3 and S4 via /proc/acpi/sleep will suspend the machine, but it will not resume. It will not wake up until the power and battery have been removed. I use linux-2.6.4 with the patch included in this bug report here on a SAMSUNG X10 laptop and still do not get the machine waking up from ACPI S3 mode. # cat /proc/acpi/wakeup_devices Device Speep state Status LID0 3 disabled PWRB 4 disabled LANC 4 disabled MODM 4 disabled # echo LID0 >/proc/acpi/wakeup_devices # cat /proc/acpi/wakeup_devices Device Speep state Status LID0 3 enabled PWRB 4 disabled LANC 4 disabled MODM 4 disabled Via acpid (using /etc/acpi/lid.sh) I echo the value 3 into /proc/acpi/sleep and the system enters suspend-to-ram mode fine, the LED starts blinking green. So all looks fine, but no matter what I can not wake it up anymore and have to cold reset the unit (AC offline, unplug battery). Here the messages I see from acpid just before the suspend and then you see the restart after bootup as resume doesn't work. [Tue Apr 20 20:06:06 2004] received event "button/lid LID0 00000080 00000003" [Tue Apr 20 20:06:06 2004] executing action "/etc/acpi/lid.sh" [Tue Apr 20 20:06:06 2004] BEGIN HANDLER MESSAGES [Tue Apr 20 20:08:03 2004] starting up [Tue Apr 20 20:08:03 2004] 2 rules loaded My system is running linux-2.6.4 using acpi-20040311 patch and the wakeup patch from this site. I use linux-2.6.6 and acpi version 20040326 with the wakeup_devices patch on a Toshiba Satellite Pro 6000. The machine enters suspend mode fine, when my acpi_handler.sh issues a echo -n "mem" > /sys/power/state on a Lid close event. It does not resume however when I open the lid again, but resumes fine again when I press the powerbutton once. Apparently, acpid does not even notice the Lid open event : my handler script does not log anything at all (as it is supposed to do), neither does acpid. cat /proc/acpi/wakeup_devices Device Speep state Status COM 3 disabled USB1 3 disabled ASND 3 disabled VIY0 3 disabled VIY1 3 disabled LAN 4 disabled MPC0 3 disabled MPC1 3 disabled LID 4 enabled I find it odd that the powerbutton is not even listed, certainly if it's the only button that wakes up the laptop ;) I can live with it, but it would nice if my laptop would resume by simply opening the lid again (as it did when I used APM). this patch actually works fine here on my thinkpad R40 with kernel 2.6.6. unfortunately my network device dies about a minute after the resume. sound works. kernel 2.6.7-rc2 fixes the network device freeze for me. patch number 2325 applies cleanly against 2.6.7-rc2 and I just get this message during kernel compilation: CC drivers/acpi/sleep/wakeup.o drivers/acpi/sleep/wakeup.c:144: warning: function declaration isn't a prototype but except this error message and the fact that I have to take the network device down before supend everything is working If you laptop can't receive ACPI interrupt after s3, please refer to Bug 2643. And please report your test result in Bug 2643. Thanks. Same results on Samsung X10 as Achim Steinmetz reported. Any news to the problem? Anything I can test? *** Bug 470 has been marked as a duplicate of this bug. *** Created attachment 3294 [details]
patch 1: ACPI bus support for wakeup GPE
This patch is against leatest ACPI test tree.
Created attachment 3295 [details]
patch 2: add user interface for wakeup GPE
Just another data point: Applied the 20040715 ACPI patch (which appears to contain some version of the patches attached) to 2.6.8.1 and my Compaq Evo N600c now powers up when pressing the sleep button after suspending to RAM (previously would switch off). (Unfortunately, after powerring on it fails to resume like in bug 2664) *** Bug 3297 has been marked as a duplicate of this bug. *** |