Lenovo U300s does not suspend

Bug #904261 reported by Stuart Langridge
98
This bug affects 18 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Colin Ian King
Precise
Fix Released
Undecided
Colin Ian King
Quantal
Fix Released
Medium
Colin Ian King

Bug Description

When suspending this Lenovo U300s, it does not suspend. Specifically, it seems to never enter the suspend state at all; the screen goes black, but it is a lit-up black (not a turned-off-screen black) and the laptop never enters suspend. I have to kill power to get it back.

I tried the RTC clock debugging trick from https://wiki.ubuntu.com/DebuggingKernelSuspend but I think it didn't work because the laptop never enters suspend; the dmesg log after rebooting had a magic number but no hash matches.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-4-generic 3.2.0-4.10
ProcVersionSignature: Ubuntu 3.2.0-4.10-generic 3.2.0-rc5
Uname: Linux 3.2.0-4-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: aquarius 1604 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf7e00000 irq 49'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:14f1506e,17aa5003,00100000 HDA:80862805,17aa5003,00100000'
   Controls : 13
   Simple ctrls : 6
CheckboxSubmission: 4d186c1dd89d3ba4cb89f5ee55713686
CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
Date: Wed Dec 14 14:05:54 2011
HibernationDevice: RESUME=UUID=2a997b66-19bc-46c5-b10c-2d09ecf514eb
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20111211)
MachineType: LENOVO 1080
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-generic root=UUID=1897a7e0-a3e7-4d65-811e-c8ffeacf0435 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-4-generic N/A
 linux-backports-modules-3.2.0-4-generic N/A
 linux-firmware 1.62
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/21/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 56CN38WW
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: U300s
dmi.board.vendor: LENOVO
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo IdeaPad U300s
dmi.modalias: dmi:bvnLENOVO:bvr56CN38WW:bd11/21/2011:svnLENOVO:pn1080:pvrLenovoIdeaPadU300s:rvnLENOVO:rnU300s:rvr1.0:cvnLENOVO:ct10:cvrLenovoIdeaPadU300s:
dmi.product.name: 1080
dmi.product.version: Lenovo IdeaPad U300s
dmi.sys.vendor: LENOVO

Revision history for this message
Stuart Langridge (sil) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . If possible, please test the latest v3.2-rcN kernel (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). 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.

If this bug is fixed by the mainline kernel, please add the following tag 'kernel-fixed-upstream-KERNEL-VERSION'. For example, if kernel version 3.2-rc1 fixed and issue, the tag would be: 'kernel-fixed-upstream-v3.2-rc1'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'. If you believe this bug does not require upstream testing, please add the tag: 'kernel-upstream-testing-not-needed'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: needs-upstream-testing
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Also, do you know if this is a new issue? Have you ever run earlier version of Ubuntu on this machine?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Stuart Langridge (sil) wrote :

Joseph: I have not run earlier versions of Ubuntu; the machine is brand new (on the market) and so I went straight to precise. I'll try the above tips; thanks!

Revision history for this message
Stuart Langridge (sil) wrote :

Upstream mainline kernel did not fix it: the problem is exactly the same as described above. Tags adjusted as requested.

tags: added: kernel-bug-exists-upstream
removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Dan O'Reilly (oreilldf) wrote :

I can confirm that I'm having the same (at least based on the visible symptoms) suspend issues in Oneiric. I had to RMA my laptop due to a hardware issue, but as soon as I get it back I can provide logs if requested.

Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-5.11)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-5.11
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Triaged
Revision history for this message
Stuart Langridge (sil) wrote :

Have run cking's s3 test script as per https://wiki.ubuntu.com/Kernel/Reference/S3SystemTapDebug.

locatehang, run immediately after reboot (because the machine hung at a lit black screen as before), printed:

$ ./locatehang
Looking for function that matches hash from the Magic Number from the kernel log.
  Magic: 12:64:42 maps to hash: a3d2c
  Hash matches: acpi_hw_write_pm1_control() (address: 0)
The kernel probably wrote to the southbridge the magic to put the machine
into suspend or hibernate and then the machine hung. Generally this means
that the machine did not wake up and get back to the kernel resume successfully
which normally indicates a BIOS issue.

All s3-*.log files were 0 bytes in size:

$ ls -l s3*.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-devices.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-error.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-systemtap.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-tasks.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-test.log
-rw-r--r-- 1 root root 0 Dec 16 16:45 s3-trace.log

Revision history for this message
Colin Ian King (colin-king) wrote :

So, this basically means that the S3 test script observed that the kernel wrote to the power management registers which then transitions the machine into the S3 state.

The kernel doesn't do much more after this it is waiting for the machine to suspend. So a hang like this is quite curious. If S5 (shutdown) works, then this could indicate that the PM1 controls don't work but as discussed on IRC, S5 does work, so it is strange that transitioning to S3 breaks.

I'm out of ideas. We should pull in Alex Hung as he may have some notion of what to do next.

Revision history for this message
Colin Ian King (colin-king) wrote :

Incidentally, did S3 work with Windows?

Revision history for this message
Stuart Langridge (sil) wrote : Re: [Bug 904261] Re: Lenovo U300s does not suspend

Sadly, I don't know. The machine arrived with Windows on, but I didn't
run it; I just installed Ubuntu.

On 16/12/11 17:21, Colin King wrote:
> Incidentally, did S3 work with Windows?
>

Revision history for this message
Colin Ian King (colin-king) wrote :

I see that Lenovo has pushed out a firmware upgrade recently (2011-12-02) for this machine:

http://consumersupport.lenovo.com/au/en/driversdownloads/Drivers_Show_5482.html

..worth a punt, but there is always the associated risk of bricking the device if it goes wrong.

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

I can confirm that suspend was working properly for me in Windows.

Revision history for this message
Stuart Langridge (sil) wrote :

Dan: if you still have Windows, would you like to try the BIOS update that cking links to to see if it fixes things? (I'm not at all sure that I can install BIOS updates from Ubuntu.)

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

I blew away my Windows partition to install Ubuntu. But I've sent the machine back to Lenovo for repairs. It's possible they'll blow away Ubuntu and put the stock image back in place, in which case I'd be able to update to the latest BIOS before putting Ubuntu back on there. I'll update you as soon as I get it back.

Revision history for this message
e X t 7 3 (ext73) wrote :

This bug is in kernel 3.2 (vanilla stable release too), I have this error also on the MSI X370 - Brazos platform.

Revision history for this message
e X t 7 3 (ext73) wrote :

btw. under kernel 3.1.7 all working properly (on this MSI X370 and other machines)

Revision history for this message
Matt (mattdavis90) wrote :

I can confirm that this is still happening as described when using the latest BIOS update. Sleep works on Windows 7 but will not work on Ubuntu 11.10.

Revision history for this message
Colin Ian King (colin-king) wrote :

@Matt, thanks for that data point. I will see if I can get any sense out of contacts we have in Lenovo.

Revision history for this message
andrjas (andrjas) wrote :
Revision history for this message
Dan O'Reilly (oreilldf) wrote :

I can confirm that the fix andrjas linked to worked for me as long as I wasn't using an external display via the HDMI port. If the external display was active, I could suspend successfully, but resuming would hang.

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

After a little more investigation, resuming actually does work. Ubuntu just isn't properly enabling the HDMI display when it comes back. If I press the keyboard button to swap between internal/external display a few times, the HDMI display comes back on.

Revision history for this message
Stuart Langridge (sil) wrote :

I confirm that the script linked by andrjas makes suspend work, both by menu choice and by lid close, on my U300s. Now passing the buck to @cking to establish why ;-)

Changed in linux (Ubuntu):
assignee: nobody → Colin King (colin-king)
status: Triaged → In Progress
Revision history for this message
Tim Peeters (tpeeters) wrote :

For me also the script linked by andrjas fixes the problem on U300s

Revision history for this message
Colin Ian King (colin-king) wrote :

@Stuart, I've been told that the ubs-linus branch of http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git contains some patches that may be useful, so I'd like you to give this a spin. The caveat is that this is the 3.4 kernel and I've not boot tested it, so you mileage may vary..

I've put the kernels .debs at: http://zinc.canonical.com/~cking/lp-904261

Can you let me know if these help the suspend/resume issue?

Colin

Revision history for this message
Dmitry Vukolov (ekid) wrote :

The 3.4 kernel with patches doesn't seem to help. Only the script makes suspend work properly.

Revision history for this message
Colin Ian King (colin-king) wrote :

Yesterday I built a set of kernel images containing the following patch which was tested by Stuart and seems to fix the issue.

http://marc.info/?l=linux-pm&m=133573212512122&w=2

The kernels are available: http://zinc.canonical.com/~cking/sil

Anyone else experiencing this bug can give these kernels a spin and provide feedback too. As it is, Stuart has informed me that they work.

Revision history for this message
Stuart Langridge (sil) wrote :

Fantastically, this updated kernel from Colin works perfectly. I removed the /etc/pm/sleep.d/20_custom-ehci_hcd script, installed the kernels downloaded from Colin, and rebooted, and suspend works perfectly either by command from the device menu or by closing the lid.

Revision history for this message
John Lenton (chipaca) wrote :

Just installed it on cparrino's machine (an i5 u300s) and it worked, both by closing and reopening the lid, and by suspending from the menu and then touching the power.

Revision history for this message
Ben Shaby (benshaby) wrote :

This worked for me as well. Thank you!

Will this kernel patch be included in the official updates that get delivered automatically via update manager?

Revision history for this message
Colin Ian King (colin-king) wrote :

@Ben, once it has landed upstream I will try to get into Precise under the normal Stable Release Updates policy, which may take a few to several weeks.

Revision history for this message
Cristian Parrino (cparrino) wrote :

I've had a regression on my u300s. I ran the latest updates last night and the machine no longer suspends.

Revision history for this message
Andy Whitcroft (apw) wrote :

This patch has still not solidified into final form upstream so we are still unable to apply this to the precise main kernel. Here is an updated precise kernel:

    http://people.canonical.com/~apw/lp904261-precise/

Revision history for this message
Cliff Wells (cliff-develix) wrote :

@Colin

Thanks for your .debs. Now for an additional favor: turns out the Dell/Canonical Project Sputnick touchpad driver works great on the U300s and removes the other biggest point-of-pain on this hardware.

Any chance you'd be willing to build some kernel debs with both the suspend/resume patches and the Sputnik touchpad drivers?

http://bartongeorge.net/2012/06/20/sputnik-update-touchpad-driver-now-available/

Revision history for this message
Cliff Wells (cliff-develix) wrote :

I built a custom Precise kernel, adding only the ACPI patch (to fix suspend/resume) and the Sputnik touchpad drivers. Things are looking much better on the U300s. There's still some minor issues, but at least the system is usable.

http://www.enemyofthestatement.com/ubuntu-12-04-on-lenovo-u300s

HTH

Revision history for this message
Colin Ian King (colin-king) wrote :

I've discussed the older patch with upstream and we now have a patch that has landed upstream that may fix the u300 suspend/resume issue, so I was wondering if somebody would test it to see if it fixes it.

Updated kernels can be found in: http://kernel.ubuntu.com/~cking/lp-904261/v2/

If this does the trick I can submit this as a Stable Request Update. Thanks.

Revision history for this message
Peter Mahnke (peterm-ubuntu) wrote :

Colin

I just tested this on my U300 and it worked in all the scenarios that I know I have problems with and it worked!

Thank you!

Peter

Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks Peter, I will start the SRU process with this fix.

Revision history for this message
Colin Ian King (colin-king) wrote :

== SRU Justification ==

A class of new machines from Lenovo (such as the U300) and some ASUS laptops
are hanging on suspend.

== Fix ==

This patch is already an upstream fix that makes
acpi_pm_device_sleep_state() conform to the ACPI specification.

== Impact ==

Machines like Lenovo U300 and some ASUS laptops fail to suspend. The only
viable workaround is xHCI bind/unbind hack which is really ugly and can
potentially lose data with connected devices.

== Test Case ==

Simply suspend the laptop, without the fix it will just hang on suspend.

This has been tested on a Lenovo U300 and also sanity checked on a
Lenovo X220i (which didn't have the bug) to check it doesn't cause problems
on hardware without this bug.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Precise):
status: New → Fix Committed
Changed in linux (Ubuntu Quantal):
status: In Progress → Fix Released
Changed in linux (Ubuntu Precise):
assignee: nobody → Colin King (colin-king)
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-29.46). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Revision history for this message
Colin Ian King (colin-king) wrote :

Anyone subscribed with to this bug with a U300 please test out a -proposed kernel and let us know if it works, then we can release this fix. Thanks.

Revision history for this message
siraj k (sirajk) wrote :

Just tried the -proposed kernel (3.2.0-29-generic) and can confirm that it works. Thanks very much!

siraj k (sirajk)
tags: added: verification-done-precise
removed: verification-needed-precise
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.5 KiB)

This bug was fixed in the package linux - 3.2.0-29.46

---------------
linux (3.2.0-29.46) precise-proposed; urgency=low

  [ Tim Gardner ]

  * No change upload to fix armel/armhf FTBS caused by
    'UBUNTU: [Config] SND_OMAP_SOC, SND_OMAP_SOC_MCBSP and SND_OMAP_SOC_OMAP3_BEAGLE =y'
    Added ignore and ignore.module files to ABI directories.

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1029507

linux (3.2.0-29.45) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1029507

  [ Andy Whitcroft ]

  * SAUCE: rds_ib_send() -- prevent local pings triggering BUG_ON()
    - LP: #1016299
    - CVE-2012-2372

  [ Upstream Kernel Changes ]

  * Revert "samsung-laptop: make the dmi check less strict"
    - LP: #1029431
  * samsung-laptop: make the dmi check less strict
    - LP: #1029431
  * raid5: delayed stripe fix
    - LP: #1029431
  * tcp: drop SYN+FIN messages
    - LP: #1029431
  * tg3: Apply short DMA frag workaround to 5906
    - LP: #1029431
  * rtl8187: ->brightness_set can not sleep
    - LP: #1029431
  * net/wireless: ipw2x00: add supported cipher suites to wiphy
    initialization
    - LP: #1029431
  * kbuild: do not check for ancient modutils tools
    - LP: #1029431
  * brcmsmac: "INTERMEDIATE but not AMPDU" only when tracing
    - LP: #1029431
  * ext4: Report max_batch_time option correctly
    - LP: #1029431
  * NFSv4: Reduce the footprint of the idmapper
    - LP: #1029431
  * NFSv4: Further reduce the footprint of the idmapper
    - LP: #1029431
  * macvtap: zerocopy: fix offset calculation when building skb
    - LP: #1029431
  * macvtap: zerocopy: fix truesize underestimation
    - LP: #1029431
  * macvtap: zerocopy: put page when fail to get all requested user pages
    - LP: #1029431
  * macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built
    successfully
    - LP: #1029431
  * macvtap: zerocopy: validate vectors before building skb
    - LP: #1029431
  * KVM: Fix buffer overflow in kvm_set_irq()
    - LP: #1029431
  * scsi: Silence unnecessary warnings about ioctl to partition
    - LP: #1029431
  * iommu/amd: Fix missing iommu_shutdown initialization in passthrough
    mode
    - LP: #1029431
  * iommu/amd: Initialize dma_ops for hotplug and sriov devices
    - LP: #1029431
  * usb: Add support for root hub port status CAS
    - LP: #1029431
  * gpiolib: wm8994: Pay attention to the value set when enabling as output
    - LP: #1029431
  * sched/nohz: Rewrite and fix load-avg computation -- again
    - LP: #1029431
  * USB: option: add ZTE MF60
    - LP: #1029431
  * USB: option: Add MEDIATEK product ids
    - LP: #1029431
  * USB: cdc-wdm: fix lockup on error in wdm_read
    - LP: #1029431
  * mtd: nandsim: don't open code a do_div helper
    - LP: #1029431
  * dvb-core: Release semaphore on error path dvb_register_device()
    - LP: #1029431
  * hwspinlock/core: use global ID to register hwspinlocks on multiple
    devices
    - LP: #1029431
  * libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
    - LP: #1029431
  * md/raid1: fix use-after-free bug in RAID1 data-check code.
    - LP: #1029431
  * PCI: EHCI: fix crash during suspend on ASUS computers
    - L...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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.