Bug 41932
Summary: | Ideapad S10-3 hangs on resume from suspend-to-ram | ||
---|---|---|---|
Product: | Platform Specific/Hardware | Reporter: | Jonathan Nieder (jrnieder) |
Component: | x86-64 | Assignee: | platform_x86_64 (platform_x86_64) |
Status: | CLOSED UNREPRODUCIBLE | ||
Severity: | normal | CC: | alexandre.franke, andreas.wallberg, bugs, dave, e568b31a443d, feng.tang, gdamjan, lenb, tepoga |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.0-rc1 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 7216, 36912 | ||
Attachments: |
s10-3t kernel config for 3.4-af56e0aa3
s10_s2ram_debug patch new_s2ram.patch |
Description
Jonathan Nieder
2011-08-29 04:42:10 UTC
(In reply to comment #0) > This entry is being used for tracking a regression from 3.0. Apparently I can't spell. This is a regression from *2.6.39*. Could you post your .configs for both kernels? I just want to confirm the presence (or lack of) of intel_idle. This bug is still valid for 3.3, anyone going to fix it? (In reply to comment #3) > This bug is still valid for 3.3, anyone going to fix it? Maybe you will. Can you confirm Lars's bisection result by testing 983bbf1af06 and 983bbf1af06^ and describing the behavior of each? Yes, I can confirm that. Also: /boot/config-2.6.39-rc7+:# CONFIG_INTEL_IDLE is not set Yes, I can confirm that. Also: /boot/config-2.6.39-rc7+:# CONFIG_INTEL_IDLE is not set Description of the behaviour is that with 983bbf1af06 present, resume does not work, if it's not present, it works. I have this netbook and suffer from the bug as well. I'm on Arch Linux with a 3.3.3 i686 kernel. The last working kernel was the 2.6.39 series. I'd like to help out testing patches. What is the current status? The most recent discussion I've seen was referenced here: http://www.mentby.com/Group/linux-kernel/regression-ideapad-s10-3-does-not-wake-up-from-suspend.html There is a second bug for me which was introduced after that one in 2.6.39. Can you try waiting 600 seconds and check if your laptop resumes after that amount of time? If I remember correct "hpet=disable nohz=off" fixed it. It seems to be able to sleep at least an hour and resume correctly only if I add these flags: hpet=disable highres=off nohz=off (In reply to comment #10) > It seems to be able to sleep at least an hour and resume correctly only if I > add these flags: > > hpet=disable highres=off nohz=off What's your kernel version. I now check a S10-3t with Federo 15, with kernel Linux cats-testing.sh.intel.com 2.6.38.6-26.rc1.fc15.i686.PAE #1 SMP Mon May 9 20:36:50 UTC 2011 i686 i686 i386 GNU/Linux The s2ram and s2disk both work fine. Just tested with a new 3.4.0+ kernel, both s2ram and s2disk work fine too. kernel: 3.4.0+ #25 SMP Mon Jun 4 14:18:02 CST 2012 i686 i686 i386 GNU/Linux cmdline: ro root=UUID=b3f9f994-4d41-48b9-893f-88db07533b5d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb lspci: 00:00.0 Host bridge: Intel Corporation N10 Family DMI Bridge 00:02.0 VGA compatible controller: Intel Corporation N10 Family Integrated Graphics Controller 00:02.1 Display controller: Intel Corporation N10 Family Integrated Graphics Controller 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation N10/ICH7 Family SATA AHCI Controller (rev 02) 00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02) 05:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01) 07:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01) I've had a bunch of issues getting post-3.1 kernels to suspend and resume on this hardware: http://groups.google.com/group/linux.kernel/browse_thread/thread/3272041cb68ccb0d?pli=1 Here's the config I've been using: http://sr71.net/~dave/linux/netbook.config Feng, could you post your .config, please? Created attachment 73508 [details]
s10-3t kernel config for 3.4-af56e0aa3
This is for kernel 3.4-af56e0aa3
(In reply to comment #14) > Created an attachment (id=73508) [details] > s10-3t kernel config for 3.4-af56e0aa3 Ahh... All of the S10-* hardware is fairly different. IOW, I'm not sure results on the S10-3t apply to the S10-3. I will check to see if the hangs that intel_idle was causing are fixed, though. Dave, does "hpet=disable highres=off nohz=off" help in your setup? I was told to try the s2ram with AC adapter unplugged, so I started test the s2ram with close/open lid, there is no hang happen, just sometimes I did see a very long delay before the system could resume back from the S3 suspended state, the delay sometimes is ~120 seconds, sometimes ~150 seconds. I tried 2.6.37, 2.6.38.8, 3.4.0, 3.5-rc2 kernel, which all have this problem. Will check more Created attachment 74801 [details]
s10_s2ram_debug patch
Hi,
Could you try the attached debug patch, it works on my side. I know our HW are not the exactly same, and I can see the problem on 2.6.37 till 3.5-rc2, while you guys only see it as a regression for 2.6.39.
Thanks,
Feng
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index f113755..d2e0c90 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -439,6 +439,14 @@ again:
* in the event mask
*/
if (next_event.tv64 != KTIME_MAX) {
+ s64 delta;
+
+ delta = next_event.tv64 - now.tv64;
+ if (delta >= 10000000000) {
+ printk("%s(): The delta is big: %lld\n", __func__, delta);
+ next_event.tv64 = now.tv64 + 3000000000;
+ }
+
/*
* Rearm the broadcast device. If event expired,
* repeat the above
(In reply to comment #16) > Dave, does "hpet=disable highres=off nohz=off" help in your setup? This helped on my Ideapad S10-3 and now it resumes. Jul 17 09:47:46 foo kernel: [ 64.051308] PM: Syncing filesystems ... done. Jul 17 09:47:46 foo kernel: [ 64.052814] PM: Preparing system for mem sleep Jul 17 09:52:57 foo kernel: [ 64.076513] Freezing user space processes ... (elapsed 0.01 seconds) done. Jul 17 09:52:57 foo kernel: [ 64.092307] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done. Jul 17 09:52:57 foo kernel: [ 64.108265] PM: Entering mem sleep Jul 17 09:52:57 foo kernel: [ 64.108298] Suspending console(s) (use no_console_suspend to debug) Jul 17 09:52:57 foo kernel: [ 64.108722] sd 1:0:0:0: [sda] Synchronizing SCSI cache Jul 17 09:52:57 foo kernel: [ 64.113842] sd 1:0:0:0: [sda] Stopping disk Jul 17 09:52:57 foo kernel: [ 64.469231] ACPI handle has no context! Jul 17 09:52:57 foo kernel: [ 64.724102] PM: suspend of devices complete after 615.590 msecs Jul 17 09:52:57 foo kernel: [ 64.724368] PM: late suspend of devices complete after 0.258 msecs Jul 17 09:52:57 foo kernel: [ 64.740233] pcieport 0000:00:1c.0: wake-up capability enabled by ACPI Jul 17 09:52:57 foo kernel: [ 64.756438] PM: noirq suspend of devices complete after 32.059 msecs Jul 17 09:52:57 foo kernel: [ 64.756476] ACPI: Preparing to enter system sleep state S3 Jul 17 09:52:57 foo kernel: [ 64.840208] PM: Saving platform NVS memory Jul 17 09:52:57 foo kernel: [ 64.840250] Disabling non-boot CPUs ... Jul 17 09:52:57 foo kernel: [ 64.944036] CPU 1 is now offline Jul 17 09:52:57 foo kernel: [ 64.944784] Extended CMOS year: 2000 Jul 17 09:52:57 foo kernel: [ 64.944784] ACPI: Low-level resume complete Jul 17 09:52:57 foo kernel: [ 64.944784] PM: Restoring platform NVS memory Jul 17 09:52:57 foo kernel: [ 64.944784] CPU0: Thermal monitoring handled by SMI Jul 17 09:52:57 foo kernel: [ 64.944784] Extended CMOS year: 2000 Jul 17 09:52:57 foo kernel: [ 73.180349] Enabling non-boot CPUs ... Jul 17 09:52:57 foo kernel: [ 73.180543] Booting Node 0 Processor 1 APIC 0x1 Jul 17 09:52:57 foo kernel: [ 73.184006] [sched_delayed] sched: RT throttling activated Jul 17 09:52:57 foo kernel: [ 73.196105] CPU1 is up Jul 17 09:52:57 foo kernel: [ 73.196541] ACPI: Waking up from system sleep state S3 Jul 17 09:52:57 foo kernel: [ 365.237735] PM: noirq resume of devices complete after 1.435 msecs Jul 17 09:52:57 foo kernel: [ 365.237917] PM: early resume of devices complete after 0.134 msecs Jul 17 09:52:57 foo kernel: [ 365.238051] i915 0000:00:02.0: setting latency timer to 64 Jul 17 09:52:57 foo kernel: [ 365.238535] snd_hda_intel 0000:00:1b.0: irq 45 for MSI/MSI-X Jul 17 09:52:57 foo kernel: [ 365.239094] pci 0000:00:1e.0: setting latency timer to 64 Jul 17 09:52:57 foo kernel: [ 365.239247] ahci 0000:00:1f.2: setting latency timer to 64 Jul 17 09:52:57 foo kernel: [ 365.239392] pcieport 0000:00:1c.0: wake-up capability disabled by ACPI Jul 17 09:52:57 foo kernel: [ 365.560238] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Jul 17 09:52:57 foo kernel: [ 365.564163] ata1: SATA link down (SStatus 0 SControl 300) Jul 17 09:52:57 foo kernel: [ 365.825885] ata2.00: configured for UDMA/133 Jul 17 09:52:57 foo kernel: [ 365.840353] sd 1:0:0:0: [sda] Starting disk Jul 17 09:52:57 foo kernel: [ 366.035954] PM: resume of devices complete after 798.030 msecs Jul 17 09:52:57 foo kernel: [ 366.036218] PM: Finishing wakeup. This is 3.5.0-rc7 with s10_s2ram_debug, I see no effect. Laptop does wake up but it takes 5 Minutes to wake up completely. Cmdline includes intel_idle.max_cstate=0 pcie_aspm=force and CONFIG_CPU_IDLE=y. Hardware is S10-3. > > Dave, does "hpet=disable highres=off nohz=off" help in your setup? > This helped on my Ideapad S10-3 and now it resumes. Helps here too but it does drain the battery a lot. (In reply to comment #20) > 798.030 msecs > Jul 17 09:52:57 foo kernel: [ 366.036218] PM: Finishing wakeup. > > This is 3.5.0-rc7 with s10_s2ram_debug, I see no effect. > Laptop does wake up but it takes 5 Minutes to wake up completely. > Cmdline includes intel_idle.max_cstate=0 pcie_aspm=force and > CONFIG_CPU_IDLE=y. > Hardware is S10-3. > Thanks for the test, looks like the broadcast device didn't fire an interrupt during the wakeup. could you test the new attached patch "new_s2ram.patch". Created attachment 76071 [details]
new_s2ram.patch
(In reply to comment #22) > Created an attachment (id=76071) [details] > new_s2ram.patch The patch seems to lack a closing } in the if case. Otherwise, it seems to work. Now my S10-3 does resume. (In reply to comment #21) > Thanks for the test, looks like the broadcast device didn't fire an interrupt > during the wakeup. could you test the new attached patch "new_s2ram.patch". It works for me, thanks for your work. (In reply to comment #24) > It works for me, thanks for your work. I'm not sure weather it's related but my S10-3 froze while resuming, nothing in the logs. (In reply to comment #25) > (In reply to comment #24) > > > It works for me, thanks for your work. > > I'm not sure weather it's related but my S10-3 froze while resuming, nothing > in > the logs. I'm a little confused. Could you provide more detail? Did you mean with the patch, sometimes s10-3 resume ok, while sometimes it still can't resume? And you mentioned "froze while resuming", did it hang forever, or comeback after several minutes? (In reply to comment #26) > I'm a little confused. Could you provide more detail? Never mind, it did not happen again and was probably unrelated. What's the future of the patch in upstream? (In reply to comment #28) > What's the future of the patch in upstream? I've been thinking this for quiet a while. The patch is kind of a hack, and I don't think it will be easily accepted by Thomas (tglx) . The patch has 2 parts: 1. After resume, program the broadcast tick device to fire IRQ in 5 seconds. 2. In broadcast device's oneshot handler, if the interval to be programmed to be bigger than 10 seconds, cut it down to 3 seconds. 1st point is not that bad, the 2nd may hurt performance. One way may be to create a flag "system_in_suspend", we only do the 2nd when system_in_suspend == 1. Thomas, any comments on this? Thanks, Feng I think I'm experiencing the same problem with lenovo s10-3 (system freezes on resume, waiting for 5-10 minutes doesn't help). I'm not sure if it worth creating a new bug, so I'll just post what I have here. Original bugreport with a bunch of apport-collected dumps: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1065076 Kernels tested: 3.2.0-31 (ubuntu stock kernel) 3.6.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/ Suspend problem is present in both. Workarounds: anything that prevents CPU from entering C4 state. In particular, adding kernel parameter "hpet=disabled" (CPU never enters C1-C4) or adding "intel_idle.max_cstate=3" (CPU can enter C1-C2, but not C4). I have to note that these workarounds make not much sense: why try to save power by suspending at all if regular power consumption is increased? I also want to confirm that Feng Tang's patch from comment #22 is working. Applied it to the 3.6.1 kernel and now I can suspend/resume without problems. Thank you, Feng. The patch does have a missing closing bracket, had to add it manually. And of course.. is there any chance this will be fixed in upstream? My Lenovo S10-3 suspends and resumes fine. I've tested various kernels, 3.8 - 3.11-rc5 https://bugzilla.kernel.org/show_bug.cgi?id=21952#c66 Please re-open if you have an issue w/ yours. It may be that there is a failure on the S10-3t that is not present on the S10-3. |