Lenovo Y530 can't switch to BIOS S3 state after suspend

Bug #587457 reported by Bartłomiej Żogała
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Lucid by Leann Ogasawara
Declined for Maverick by Leann Ogasawara

Bug Description

On normal kernel neither suspend nor hibernate work. Today I tried tuxonice kernel - it hibernates from KDE correctly - after resume sound, proprietary nvidia with desktop effects and wifi are working coreclty. But while changing /sys/power/tuxonice/power_method to 3, again everything is dumped but after the procedure fan, disk, and all leds are still on. If I hard reset at this moment, after boot the system resumes corectly so the problem is not with hibernate scripts, loaded modules etc but the communication with BIOS which tells computer to switch S3 state.
I'm not reporting problem with tuxonice, only used it to diagnose, the problem exists in ubuntu, tuxonice, and vanilla kernels.

 I have led multimedia keys on laptop on vista upon prepare to suspend, 3 diodes (hdd, caps and num) blinks for short moment. Then all multimedia ones(play, stop rew ,ff) , hdd and fans are powered down. On Ubuntu I see only this initial blink of 3 leds and nothing more happens.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-22-generic 2.6.32-22.33
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion:
 Advanced Linux Sound Architecture Driver Version 1.0.22.1.
 Compiled on Apr 29 2010 for kernel 2.6.32-22-generic (SMP).
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: nusch 4329 F.... kmix
                      nusch 4549 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xd3d00000 irq 30'
   Mixer name : 'Nvidia MCP78 HDMI'
   Components : 'HDA:10ec0888,17aa3d78,00100202 HDA:10573055,17aa3d7d,00100700 HDA:10de0006,10de0101,00100000'
   Controls : 44
   Simple ctrls : 25
Date: Sun May 30 12:00:33 2010
MachineType: Lenovo INVALID
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.32-22-generic root=UUID=4fa8b5a2-df36-44bd-9e2b-0e4982840edf ro quiet splash
ProcEnviron:
 LANGUAGE=
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
WpaSupplicantLog:

dmi.bios.date: 09/23/2008
dmi.bios.vendor: Lenovo
dmi.bios.version: 10CN37WW
dmi.board.asset.tag: Lenovo Assert TAG
dmi.board.name: INVALID
dmi.board.vendor: Lenovo
dmi.board.version: 10CN38WW
dmi.chassis.asset.tag: Lenovo Assert TAG
dmi.chassis.type: 10
dmi.chassis.vendor: Lenovo
dmi.chassis.version: 10CN37WW
dmi.modalias: dmi:bvnLenovo:bvr10CN37WW:bd09/23/2008:svnLenovo:pnINVALID:pvrLenovoIdeaPadY530:rvnLenovo:rnINVALID:rvr10CN38WW:cvnLenovo:ct10:cvr10CN37WW:
dmi.product.name: INVALID
dmi.product.version: Lenovo IdeaPad Y530
dmi.sys.vendor: Lenovo

Revision history for this message
Bartłomiej Żogała (nusch) wrote :
Revision history for this message
Bartłomiej Żogała (nusch) wrote :

Attached decompiled DSDT maybe it helps somehow

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Bartłomiej,

If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kernel-suspend
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Bartłomiej Żogała (nusch) wrote :

Ok I tried:
linux-image-2.6.32-02063211-generic_2.6.32-02063211_amd64.deb
after echo 3 > /proc/acpi/sleep
effect is the same
also installed newest mainline 2.6.35 - without changes, but on this also tried different test options
Firstly tested every of those options:
core processors platform devices freezer
passed to /sys/power/pm_test
- the kernel always resumed properly. But after passing "none" to /sys/power/pm_test the system freezed again.

During this freeze(on every kernel) system doesn't responds to SysRq requests, screen is black with backlight and single underscore character(non blinking) and quickly after hang up fan accelerates so I think CPU is used, maybe some infinite loop in kernel code?

While skipping through those kernels I've seen quite different Magic numbers in dmesg:

root@novopad:~/kernel# cat 2.6.35_dmesg.txt | grep -C 5 Magic
[ 0.817683] NET: Registered protocol family 10
[ 0.818013] lo: Disabled Privacy Extensions
[ 0.818216] NET: Registered protocol family 17
[ 0.819624] PM: Resume from disk failed.
[ 0.819635] registered taskstats version 1
[ 0.820119] Magic number: 14:963:844
[ 0.820219] rtc_cmos 00:07: setting system clock to 2010-06-05 17:49:26 UTC (1275760166)
[ 0.820225] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.820229] EDD information not available.
[ 0.820327] Freeing unused kernel memory: 948k freed
[ 0.820584] Write protecting the kernel read-only data: 10240k

or
[ 0.820066] Magic number: 14:795:88
[ 0.820091] pcie_pme 0000:00:1c.2:pcie01: hash matches

or
 on standard ubuntu 2.6.32:
nusch@novopad:~$ dmesg | grep -C 5 Magic
[ 0.605918] NET: Registered protocol family 10
[ 0.606292] lo: Disabled Privacy Extensions
[ 0.606529] NET: Registered protocol family 17
[ 0.607911] PM: Resume from disk failed.
[ 0.607927] registered taskstats version 1
[ 0.608602] Magic number: 14:898:189
[ 0.608649] acpi device:1b: hash matches
[ 0.608710] rtc_cmos 00:07: setting system clock to 2010-06-05 18:09:02 UTC (1275761342)
[ 0.608713] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.608714] EDD information not available.
[ 0.608793] Freeing unused kernel memory: 876k freed

nusch@novopad:~$ lspci | grep 1b
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

I tried some time ago unloading every single module listed in lsmod and, it didn't help suspend, I can't physically unconnect devices in my laptop because it'll void warranty.

tags: removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Declining the Lucid and Maverick specific nominations for now and leaving this open against the actively developed Ubuntu kernel (which happens to be Maverick at this time). Will re-open the nominations should a fix be narrowed down which we can confirm specifically resolves this issue in Lucid and Maverick and qualifies for a Stable Release Update.

Revision history for this message
tm (tmtm) wrote :

Hi. Thanks to this forum http://dug.net.pl/tekst/111/suspend___problemy_z_acpi_na_przykladzie_asus_k52jr/ there is solution. All you have to do is to make a file:
/etc/pm/sleep.d/20_custom-ehci_hcd
and add this:

!/bin/sh
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
case "${1}" in
        hibernate|suspend)
              # Unbind ehci_hcd for first device 0000:00:1a.7:
               echo -n "0000:00:1a.7" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
              # Unbind ehci_hcd for second device 0000:00:1d.7:
               echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
        ;;
        resume|thaw)
              # Bind ehci_hcd for first device 0000:00:1a.7:
              echo -n "0000:00:1a.7" | tee /sys/bus/pci/drivers/ehci_hcd/bind
              # Bind ehci_hcd for second device 0000:00:1d.7:
              echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci_hcd/bind
        ;;
esac

Then suspend to ram on lenovo y530 should working. So the problem is usb related.

Revision history for this message
tm (tmtm) wrote :

Ah and i forgotten that you have to use pm-utils. And to put it on sleep use command
      pm-suspend
which invokes that script and calls s2ram i think. Tested on debian. Should work on any system becasue all bugs were almost the same.

Revision history for this message
George Hein (gjhein) wrote :

Appears now to work in Maverick on Lenovo Y530, THANKS FOR FIX

Revision history for this message
xgong (xgong) wrote :

Suspend works with command now !
But how to make the system to call this script when suspend is triggered by accessing from menu or hitting the power off button or closing the display?

Revision history for this message
b3d (jim-herrmann) wrote :

@tm - Thanks so much! The Patch works great. I've been putting up with this for so long, and now it works! This is awesome!

@Jackallen - You now need to set your power preferences to suspend when the lid was closed. The problem probably caused you to set them to something else because the attempt to suspend would mess up, and you just set it to avoid that. Now you need to go to, in Gnome, System -> Preferences -> Power Management and change the "When Laptop Lid is Closed" option for AC power and Battery power tabs. The General tab is where the options for the power button on suspend button are. HTH.

Revision history for this message
tm (tmtm) wrote :

And to add, now hibernate works with any tricks, it just shutdown and after power on, it displays "System resuming" like after hibernate in windows. But despite this I use tuxonice - it's a way faster.

Revision history for this message
Bartłomiej Żogała (nusch) wrote :

I can confirm tm fix resolves the problem, could someone apply this fix to official repositories?

Changed in linux (Ubuntu):
status: New → Fix Committed
Brad Figg (brad-figg)
tags: added: acpi-bad-address
tags: added: acpi-method-return
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.