Kernel Bug Tracker – Bug 12091
ACPI AC driver doesn't work on Toshiba Portege R500 (bisected)
Last modified: 2008-11-30 15:15:46 UTC
Subject : ACPI AC driver doesn't work on Toshiba Portege R500 (bisected)
Submitter : "Rafael J. Wysocki" <firstname.lastname@example.org>
Date : 2008-11-23 23:37
References : http://marc.info/?l=linux-kernel&m=122748347622592&w=4
Notify-Also : Zhao Yakui <email@example.com>
This entry is being used for tracking a regression from 2.6.27. Please don't
close it until the problem is fixed in the mainline.
Author: Zhang Rui <firstname.lastname@example.org>
Date: Fri Sep 12 11:12:25 2008 +0800
ACPI: don't enable control method power button as wakeup device when Fixed Power button is used
don't enable control method power button as wakeup device
when Fixed Power button is used.
Tested-by: email@example.com <firstname.lastname@example.org>
Signed-off-by: Zhang Rui <email@example.com>
Signed-off-by: Len Brown <firstname.lastname@example.org>
First-Bad-Commit : faee816b1502385dc9bc5abf2960d1cc645844d1
Created attachment 18993 [details]
dmesg log from the affected box
It contains boot messages and a suspend/resume cycle.
Created attachment 18994 [details]
lspci -vxxx from the affected box
Created attachment 18995 [details]
Output of acpidump from the affected box
1. kill acpid and run "cat /proc/acpi/event"
2. suspend and resume
3. attach the output of /proc/acpi/event
please do this test in both 18.104.22.168 and 2.6.28-rc1
okay, seems that the problem is clear now.
In bug #10503, power button share the GPE with PNP0A03. we don't want to enable the PNP0A03 events(PME) when suspend to ram, thus we set the Power button GPE as a WAKE GPE which is usually disabled during suspend/resume.
And in this bug, power button share the GPE with AC adapter. If the patch for bug #10503 is applied, GPE 0x08 is never enabled at runtime, thus we can not get the AC adapter events.
look at this section in ACPI spec,
"Events that wake may not be intermixed with non-wake (runtime) events on the same GPE input. The only exception to this rule is made for the special devices below. Only the following devices are allowed to utilize a single GPE for both wake and runtime events:
1) Button Devices
• PNP0C0C — Power Button Device
• PNP0C0D — Lid Device
• PNP0C0E — Sleep Button Device
2) PCI Bus Wakeup Event Reporting (PME)
• PNP0A03 — PCI Host Bridge
the ideal solution should be:
1. revert faee816b1502385dc9bc5abf2960d1cc645844d1 to fix this regression.
2. set Both button devices and PCI host bridge as RUN_WAKE devices according to ACPI spec.
3. As the PNP0A03 GPE is a RUN_WAKE GPE then, it's always enabled during suspend/resume. Then it's the PCI device's responsibility to determine when PMEs should be issued, done by commit 49db139955d3392c6c4facf987905d0a9afed581.
But in order to prove this, first of all we should make sure bug #10503 can't be reproduced in the latest kernel after faee816b1502385dc9bc5abf2960d1cc645844d1 is reverted.
what do you think?
Zhang, I can try whatever kernel you direct me to if this helps. Would 2.6.27.x work or do I have to go with a 2.6.28 RC ?
(Posting here because bug 10503 was about one of my boxes)
Created attachment 18997 [details]
patch: PCI root bridge always enable wakeup
it seems that we should always enable the PCI root bridge GPE.
and PCI device drivers issue the PME if necessary.
But I'm not sure if there are some devices/drivers with PME bit enabled during S3 by default. if yes, this patch may brings another regression (system resumes soon after suspends).
walken, please try this patch
and attach the content of /proc/acpi/wakeup.
Seems to work too !
% cat /proc/acpi/wakeup
Device S-state Status Sysfs node
PWRB S5 *enabled
PCI0 S4 *enabled no-bus:pci0000:00
USB0 S4 disabled pci:0000:00:04.2
USB1 S4 disabled pci:0000:00:04.3
Handled-By : Zhang Rui <email@example.com>
Notify-Also : walken <firstname.lastname@example.org>
It seems the info has been provided.
okay, problem is clear.
And Rafael, please revert faee816b1502385dc9bc5abf2960d1cc645844d1 as a solution.
I prefer to enable PCI root bright GPE at both runtime at wakeup, but it's another problem, and I think its target is 2.6.29. :)
Rafael, please close it when the commit is reverted.
revert checked into acpi tree:
Author: Len Brown <email@example.com>
Date: Wed Nov 26 17:55:15 2008 -0500
Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used"
This reverts commit faee816b1502385dc9bc5abf2960d1cc645844d1.
Fixed by: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3bdca1b863c1ebcb2244fc0cb683876d7330e62b