Bug 15260 - Thermal, lid events do not fire after resume from S3 or S5
Summary: Thermal, lid events do not fire after resume from S3 or S5
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Alexey Starikovskiy
URL:
Keywords:
Depends on:
Blocks: 7216
  Show dependency tree
 
Reported: 2010-02-09 03:44 UTC by Nathaniel Nelson
Modified: 2010-06-30 06:12 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.32.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Toshiba Satellite A505 dmidecode output (11.21 KB, text/plain)
2010-02-09 03:44 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 ACPI dump (217.79 KB, text/plain)
2010-02-09 06:07 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg first boot (40.76 KB, text/plain)
2010-02-09 06:08 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg suspending to ram (157.84 KB, text/plain)
2010-02-09 06:11 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg resuming from S3 (7.10 KB, text/plain)
2010-02-09 06:12 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 Interrupt List Before Suspend (1.45 KB, text/plain)
2010-02-09 18:01 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 Interrupt List After Resume (1.46 KB, text/plain)
2010-02-09 18:08 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg suspending to ram with more debugging (78.29 KB, text/plain)
2010-02-28 07:56 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg resuming from S3 with more debugging (91.18 KB, text/plain)
2010-02-28 07:57 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 lspci before suspending to ram (56.12 KB, text/plain)
2010-02-28 07:59 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 lspci after resuming from S3 (56.12 KB, text/plain)
2010-02-28 08:00 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg suspending to ram with acpi_osi="Linux" (88.02 KB, text/plain)
2010-03-06 01:05 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg first resume from S3 with acpi_osi="Linux" (144.35 KB, text/plain)
2010-03-06 01:06 UTC, Nathaniel Nelson
Details
Toshiba Satellite A505 dmesg second resume from S3 with acpi_osi="Linux" (26.53 KB, text/plain)
2010-03-06 01:07 UTC, Nathaniel Nelson
Details

Description Nathaniel Nelson 2010-02-09 03:44:51 UTC
Created attachment 24962 [details]
Toshiba Satellite A505 dmidecode output

When I first boot this laptop, all of the ACPI buttons, bells and whistles work perfectly.   It suspends to ram or disk with no problem. All hell breaks loose though when I resume from suspend, whether it is triggered from pm-suspend or /sys/power/state. My biggest concern is that the CPU fan does not come back on, and so the CPU temp will climb to unsafe levels. I've tried all sorts of trickery with the /proc/acpi/fan and /proc/acpi/thermal_zone IOs, as well as module unloading/reloading, to try and trigger the fan to come back on but I eventually just have to reboot. But in addition to the missing 'thermal' events, the 'lid' events stop firing after returning from standby, as well as events from my touchpad enable/disable button and lcd contrast buttons. Additional environment/hardware info follows:

Additional info:
Toshiba Satellite A505

lspci
==============
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8172 (rev 10)
04:00.0 SD Host controller: Ricoh Co Ltd Device e822 (rev 01)
04:00.1 System peripheral: Ricoh Co Ltd Device e230 (rev 01)
04:00.2 System peripheral: Ricoh Co Ltd Device e852 (rev 01)

I will attach some acpi debugging output before/after suspend shortly.
Comment 1 Nathaniel Nelson 2010-02-09 06:07:31 UTC
Created attachment 24963 [details]
Toshiba Satellite A505 ACPI dump
Comment 2 Nathaniel Nelson 2010-02-09 06:08:39 UTC
Created attachment 24964 [details]
Toshiba Satellite A505 dmesg first boot

ACPI debugging and EC debugging enabled
Comment 3 Nathaniel Nelson 2010-02-09 06:11:21 UTC
Created attachment 24965 [details]
Toshiba Satellite A505 dmesg suspending to ram

ACPI debugging and EC debugging enabled
Comment 4 Nathaniel Nelson 2010-02-09 06:12:40 UTC
Created attachment 24966 [details]
Toshiba Satellite A505 dmesg resuming from S3

ACPI debugging and EC debugging enabled
Comment 5 Rafael J. Wysocki 2010-02-09 12:35:37 UTC
Well, there doesn't seem to be any EC activity during suspend and resume.

Please check the number of ACPI interrupts (in /proc/interrupts) before suspend and after resume.  Are there any ACPI interrupts coming after resume at all?
Comment 6 Nathaniel Nelson 2010-02-09 18:01:47 UTC
Created attachment 24973 [details]
Toshiba Satellite A505 Interrupt List Before Suspend

I don't seem to get any thermal interrupts listed here, even though I put the CPU under heavy load to get the fans to kick on.
Comment 7 Nathaniel Nelson 2010-02-09 18:08:56 UTC
Created attachment 24974 [details]
Toshiba Satellite A505 Interrupt List After Resume

I seem to stop receiving interrupts for CPU1 after resume, except at 30.
Comment 8 Rafael J. Wysocki 2010-02-09 20:13:41 UTC
Yes, it looks like the ACPI interrupt (SCI) doesn't work after resume.
Comment 9 Nathaniel Nelson 2010-02-21 04:34:02 UTC
If I add my dmi info to acpisleep_dmi_table[] and set the callback to init_set_sci_on_resume, ACPI events fire correctly after the first resume from S3, however /proc/interrupts still shows no activity on CPU1.  ACPI events no longer fire after subsequent resumes from S3.  If anyone has any ideas about what to try next, please let me know.  Thanks.
Comment 10 Zhang Rui 2010-02-25 06:32:19 UTC
(In reply to comment #9)
> If I add my dmi info to acpisleep_dmi_table[] and set the callback to
> init_set_sci_on_resume, ACPI events fire correctly after the first resume
> from
> S3, however /proc/interrupts still shows no activity on CPU1.  ACPI events no
> longer fire after subsequent resumes from S3.  If anyone has any ideas about
> what to try next, please let me know.  Thanks.

please attach the lspci -vvxxx output
1. before the first resume.
2. after the first resume while ACPI events fire correctly.
3. after the second resume.

it would be great if you can run the test again in a kernel with CONFIG_ACPI_DEBUG set.
i.e. rebuild your kernel and reboot with boot option "acpi.debug_layer=0x04 acpi.debug_level=0x04".
And then attach the dmesg output after the test in comment #9.
Comment 11 Nathaniel Nelson 2010-02-28 07:56:04 UTC
Created attachment 25265 [details]
Toshiba Satellite A505 dmesg suspending to ram with more debugging
Comment 12 Nathaniel Nelson 2010-02-28 07:57:25 UTC
Created attachment 25266 [details]
Toshiba Satellite A505 dmesg resuming from S3 with more debugging
Comment 13 Nathaniel Nelson 2010-02-28 07:59:50 UTC
Created attachment 25267 [details]
Toshiba Satellite A505 lspci before suspending to ram
Comment 14 Nathaniel Nelson 2010-02-28 08:00:48 UTC
Created attachment 25268 [details]
Toshiba Satellite A505 lspci after resuming from S3
Comment 15 Zhang Rui 2010-03-01 06:12:26 UTC
it seems that EC is not working any more. And the thermal and lid events are routed to EC.
Reassign this to Alexey.
Comment 16 Alexey Starikovskiy 2010-03-01 10:01:04 UTC
Nathaniel,
Rafael have improved behavior of EC across suspend/resume in 2.6.33. Could you please try it to check if the problem is resolved?
Comment 17 Rafael J. Wysocki 2010-03-01 20:07:42 UTC
Not really.  The patch

http://patchwork.kernel.org/patch/82732/

hasn't been merged yet, but Nathaniel tested one of the previous versions of it and it didn't help.

I'm not really sure that's an EC issue, however.  It looks like ACPI interrupts are not generated _at_ _all_ after resume, so it might be an IO-APIC issue just as well.
Comment 18 Nathaniel Nelson 2010-03-03 04:31:56 UTC
Hi Alexey, I just tried the same tests in stable 2.6.33 and got the exact same behavior.  I re-applied Rafael's new patch in Comment #17 and it didn't help me.  I also tried various combinations of adding init_old_suspend_ordering and init_set_sci_en_on_resume callbacks in the acpisleep_dmi_table and it makes no difference.  I honestly don't know how I was able to get the fan to kick back on after the first suspend as I mentioned earlier, because I can't get it to do that any more.  Anyways, if you need some more debugging info of any kind please let me know.
Comment 19 Nathaniel Nelson 2010-03-06 01:04:03 UTC
As requested, here is the dmesg output before suspend, after the first suspend (fan/lid, etc still work), and after second suspend (fan/lid, etc) no longer work.  No interrupts shown for CPU1 in /proc/interrupts after first or second suspend.  I had to add acpi_osi="Linux" to get this behavior.
Comment 20 Nathaniel Nelson 2010-03-06 01:05:08 UTC
Created attachment 25376 [details]
Toshiba Satellite A505 dmesg suspending to ram with acpi_osi="Linux"
Comment 21 Nathaniel Nelson 2010-03-06 01:06:32 UTC
Created attachment 25377 [details]
Toshiba Satellite A505 dmesg first resume from S3 with acpi_osi="Linux"
Comment 22 Nathaniel Nelson 2010-03-06 01:07:12 UTC
Created attachment 25378 [details]
Toshiba Satellite A505 dmesg second resume from S3 with acpi_osi="Linux"
Comment 23 Zhang Rui 2010-06-09 05:55:43 UTC
can you please apply the patches
https://patchwork.kernel.org/patch/103587/
https://patchwork.kernel.org/patch/103588/
on top of the latest upstream kernel and see if they help?
Comment 24 Zhang Rui 2010-06-22 07:08:36 UTC
ping...
Comment 25 Zhang Rui 2010-06-30 06:12:49 UTC
close this bug as there is no response from the bug reporter.

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