Bug 12731

Summary: laptop can't resume after suspend to memory - LG ED500 laptop
Product: ACPI Reporter: George Maizel (gmaizel)
Component: Power-Sleep-WakeAssignee: Zhang Rui (rui.zhang)
Status: CLOSED DUPLICATE    
Severity: normal CC: acpi-bugzilla, lenb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.26 - 2.6.29 Subsystem:
Regression: No Bisected commit-id:
Attachments: output of acpidump -b
output of lspci -v -v -v
output of dmidecode
output of sh /usr/src/linux/scripts/ver_linux
kernel config
output of acpidump (without arguments)
output of lspci -vxxx
patch: use the RTC Cmos area(0x60-0x64) to track where suspend/resume hangs
dmesg output after cmos experiment (comment #15)
dmesg after echo core>/sys/power/pm_test; echo mem>/sys/power/state
patch: don't re-enable ACPI during resume
patch: introduce acpi_sleep=s3_sci_enable

Description George Maizel 2009-02-17 14:46:29 UTC
Latest working kernel version: ???
Earliest failing kernel version: 2.6.26 (didn't test with earlier versions)
reproduced in all major releases (up to 2.6.29-rc5)
Distribution: Debian/unstable + vanilla kernel
Hardware Environment: LG ED500 laptop
Problem Description: After suspend to memory, laptop is unable to resume.

Steps to reproduce:
there are 2 ways to reproduce:
1. as root:
    # echo mem > /sys/power/state
wait few seconds while laptop enters sleep mode
press any key to wake it up

2. boot kernel with "test_suspend=mem" commandline parameter
kernel will suspend during boot
press any key, or just wait for timer event that will wake up the computer  

Actual result:
in both cases screen remains blank (off), power and HDD leds light for about two seconds, then computer just turns off completely.

Notes:
1. suspend/resume works fine with Windows XP
2. enabling resume tacing (echo 1>/sys/power/pm_trace) has no effect (no magic number found in dmesg output on next boot after resume failure)
Comment 1 George Maizel 2009-02-17 14:50:15 UTC
Created attachment 20283 [details]
output of acpidump -b
Comment 2 George Maizel 2009-02-17 14:51:41 UTC
Created attachment 20284 [details]
output of lspci -v -v -v
Comment 3 George Maizel 2009-02-17 14:53:43 UTC
Created attachment 20285 [details]
output of dmidecode
Comment 4 George Maizel 2009-02-17 14:56:57 UTC
Created attachment 20286 [details]
output of sh /usr/src/linux/scripts/ver_linux
Comment 5 George Maizel 2009-02-17 14:57:48 UTC
Created attachment 20287 [details]
kernel config
Comment 6 George Maizel 2009-02-17 15:02:33 UTC
Note: suspend to disk works fine
Comment 7 ykzhao 2009-02-17 17:09:43 UTC
Hi, George
    Will you please do the following test on the latest kernel?
    a. add the boot option of "acpi_sleep=s3_beep"
    b. kill the process which is using /proc/acpi/event
    c. echo mem> /sys/power/state; dmesg >dmesg_after; sync; reboot;
    d. press the power button and see whether beep voice can be heard
   
    If there is no beep and the box can't be resumed, please reboot the box and see whether there exists the file of dmesg_after.
   
    Will you please also attach the output of acpidump, lspci -vxxx?(Not the output of "acpidump -b")

    It will be great if you can add the boot option of "acpi_sleep=old_ordering" and repeat the step b/c/d.
    Thanks.
   
Comment 8 Zhang Rui 2009-02-17 18:23:05 UTC
(In reply to comment #1)
> Created an attachment (id=20283) [details]
> output of acpidump -b 
> 
please attach the output of acpidump, without any parameters.
Comment 9 George Maizel 2009-02-18 10:25:25 UTC
Created attachment 20300 [details]
output of acpidump (without arguments)
Comment 10 George Maizel 2009-02-18 10:26:42 UTC
Created attachment 20301 [details]
output of lspci -vxxx
Comment 11 George Maizel 2009-02-18 10:27:26 UTC
(in reply to comment #7)
Hi!
I tried a/b/c/d with 2.6.29-rc5 (kernel .config attached)
Laptop did not resume, there was no beep, and dmesg_after was not created. 
I tried b/c/d also with acpi_sleep=old_ordering as you suggested, but behavior was the same - no resume and no file created. :(
Comment 12 Zhang Rui 2009-02-25 00:38:17 UTC
please set CONFIG_PM_DEBUG and rebuild
in the new kernel,
please run echo {freezer/devices/platforms/processors/core} > /sys/power/pm_test;
and then run "echo mem > /sys/power/state"
can the laptop come back after about 10s?
Comment 13 George Maizel 2009-02-25 12:37:39 UTC
> please set CONFIG_PM_DEBUG and rebuild in the new kernel,
> please run echo {freezer/devices/platform/processors/core} >
> /sys/power/pm_test
> and then run "echo mem > /sys/power/state"
> can the laptop come back after about 10s?

It successfully resumed after all tests.
Comment 14 Zhang Rui 2009-02-25 16:45:08 UTC
please attach the dmesg after resume when pm_test==core.
Comment 15 ykzhao 2009-02-25 21:17:29 UTC
Created attachment 20370 [details]
patch: use the RTC Cmos area(0x60-0x64) to track where suspend/resume hangs

Will you please use the debug patch on the latest kernel and do the following test?
   a.echo 25 > /proc/cmos ; echo mem > /sys/power/state so that the box enters the suspend state
   b. press the power button. If the box can't be resumed, please reboot the system.
   c. after the system is rebooted, please cat /proc/cmos and attach the output of dmesg.
   
    It will be great if you can do the following test on your box.
    a. put the box into hibernate state(echo disk > /sys/power/state)
    b. press the power button and resume it to the normal state
    c. echo mem > /sys/power/state; dmesg >dmesg_after;
    d. press the power button and see whether the box can be resumed. 
    e. if it can't be resumed, please reboot the box and check whether there exists the file of dmesg_after.
    
    Thanks.
Comment 16 George Maizel 2009-02-27 01:52:11 UTC
Created attachment 20378 [details]
dmesg output after cmos experiment (comment #15)

Results for test 1:
after suspending, box did not resume, so I rebooted it.
BIOS complained on damaged cmos (checksum mismatch), but I think I found a way to boot without cmos being overwritten. 
After reboot:
# cat /proc/cmos  
mcount=162, time=9700

dmesg output attached

Results for test 2:
after step (d) system did not resume, and dmesg_after was not created
Comment 17 Zhang Rui 2009-03-01 17:59:46 UTC
please attach the dmesg output required in comment #14. :)
Comment 18 George Maizel 2009-03-02 14:01:16 UTC
Created attachment 20409 [details]
dmesg after echo core>/sys/power/pm_test; echo mem>/sys/power/state
Comment 19 ykzhao 2009-03-08 20:47:06 UTC
Hi, George
    From the comment #18 it seems that it can be resumed very well if the BIOS is skipped.
    >When echo core > /sys/power/pm_test, it won't write the S3 SLP_TYPE into the PM1A control register. Of course the bios is skipped.
  
    Maybe it is related with BIOS. But it is strange that the windows XP can work well on this box.
   
    Will you please add the boot option of acpi_osi="!Windows 2006" and see whether the behaviour is different?
    Thanks.
Comment 20 George Maizel 2009-03-09 11:45:26 UTC
Hi!
I tried to boot with acpi_osi="!Windows 2006" and got exactly same behavior as before (comp shut down and didn't resume).
Comment 21 Zhang Rui 2009-03-11 00:35:50 UTC
it seems that the laptop hangs in BIOS, George, will you please check if there is any new BIOS available, and retry after upgrading your BIOS?
Comment 22 George Maizel 2009-03-11 03:38:04 UTC
Hi!
I checked for bios updates on LG site, but latest version they have is A1637IL1 version 1.63, while my laptop is running version 1.66.
Should I try and downgrade?
Comment 23 Zhang Rui 2009-03-11 20:34:46 UTC
(In reply to comment #22)
> Hi!
> I checked for bios updates on LG site, but latest version they have is
> A1637IL1
> version 1.63,
this is for your laptop? I think you are using a LG ED500.

> while my laptop is running version 1.66.
> Should I try and downgrade?
> 
To be honest, I don't know neither. it's hard to debug such kind of problems if the system hangs in BIOS. A BIOS upgrade helps some times but I don't know if it works for your case.

BTW, does boot option "acpi=rsdt" help?
Comment 24 Zhang Rui 2009-03-17 01:18:18 UTC
(In reply to comment #23)
> 
> BTW, does boot option "acpi=rsdt" help?
> 
no, this doesn't help. sigh.
Comment 25 ykzhao 2009-03-17 02:43:43 UTC
Hi, George
     Thanks for confirm that the issue still exists after using the latest BIOS version.
     Several LG laptops can't be resumed from S3(for example: the box in 11255). It seems that they hang in BIOS. In such case we can do nothing and we don't know how can the ACPI object be handled on windows XP.
     Thanks.
Comment 26 Zhang Rui 2009-03-23 01:14:40 UTC
Created attachment 20632 [details]
patch: don't re-enable ACPI during resume

please try this debug patch with 2.6.29-rc8 kernel and see if it helps.
Comment 27 Zhang Rui 2009-03-23 01:48:43 UTC
Created attachment 20634 [details]
patch: introduce acpi_sleep=s3_sci_enable

please ignore comment #26.
apply this patch on top of 2.6.29-rc8, reboot with boot option "acpi_sleep=s3_sci_enable" and see if there is any difference.
Comment 28 George Maizel 2009-03-24 13:08:33 UTC
Thanks for still trying to solve this :)
 
I tried patch and command line argument from comment #27 with released 2.6.29 kernel and got exactly same result as before - it did not resume but shut down instead.
Comment 29 Shaohua 2009-03-24 19:48:00 UTC
how about load the i915 drm driver?
Comment 30 George Maizel 2009-03-29 19:03:37 UTC
it's loaded:
~$ lsmod |egrep 'Module|i915'
Module                  Size  Used by
i915                  149672  3 
drm                   151008  4 i915
Comment 31 Zhang Rui 2009-03-30 07:25:24 UTC
IMO, suspend hangs in BIOS and I don't know what to do next.
Anyway, this is a duplicate of bug #11255.

*** This bug has been marked as a duplicate of bug 11255 ***