Laptop doesn't suspend when power is unplugged while lid is closed

Reported by David Emett on 2012-06-18
This bug affects 5 people
Affects Status Importance Assigned to Milestone
xfce4-power-manager (Ubuntu)

Bug Description

In "Xfce Power Manager", I have:
On AC, when laptop lid is closed: Lock screen
On Battery, when laptop lid is closed: Suspend

This works fine, except when I unplug the power while the lid is closed. In that case, the laptop doesn't suspend and just remains locked.

WORKAROUND: Unplug power before closing lid.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-25-generic 3.2.0-25.40
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic 3.2.18
Uname: Linux 3.2.0-25-generic i686
NonfreeKernelModules: wl
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 /dev/snd/controlC0: dave 2165 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
 Card hw:0 'Intel'/'HDA Intel at 0xf5cf8000 irq 45'
   Mixer name : 'Realtek ALC269VB'
   Components : 'HDA:10ec0269,1043841c,00100100'
   Controls : 16
   Simple ctrls : 9
CurrentDmesg: [ 21.979982] init: plymouth-stop pre-start process (1393) terminated with status 1
Date: Mon Jun 18 23:48:15 2012
HibernationDevice: RESUME=UUID=4b5eff08-55db-4f33-8766-255d45a81d44
InstallationMedia: Lubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111011)
MachineType: ASUSTeK Computer INC. 1215N
 PATH=(custom, user)
 0 inteldrmfb
 1 nouveaufb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-25-generic root=UUID=6a76faae-dcd2-430a-aa4d-511a43d338d5 ro quiet splash vt.handoff=7
 linux-restricted-modules-3.2.0-25-generic N/A
 linux-backports-modules-3.2.0-25-generic N/A
 linux-firmware 1.79
SourcePackage: linux
UpgradeStatus: Upgraded to precise on 2012-05-06 (43 days ago)
dmi.bios.date: 05/05/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0902
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: 1215N
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: x.xx
dmi.chassis.asset.tag: 0x00000000
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer INC.
dmi.chassis.version: x.x
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0902:bd05/05/2011:svnASUSTeKComputerINC.:pn1215N:pvrx.x:rvnASUSTeKComputerINC.:rn1215N:rvrx.xx:cvnASUSTeKComputerINC.:ct10:cvrx.x:
dmi.product.name: 1215N
dmi.product.version: x.x
dmi.sys.vendor: ASUSTeK Computer INC.

David Emett (akxws32zf-dave) wrote :

David Emett, thank you for reporting this and helping make Ubuntu better. Could you please provide the information following https://wiki.ubuntu.com/DebuggingKernelSuspend ? As well, 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.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

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'.

Please let us know your results. Thanks in advance.

tags: added: needs-upstream-testing
affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: resume suspend
description: updated
Changed in linux (Ubuntu):
importance: Undecided → Low
description: updated
David Emett (akxws32zf-dave) wrote :

As I said in the comments of bug #886629, which AFAICT is identical to this one:

I don't see how https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume is relevant in this case -- the bug appears to be that suspend never gets triggered at all, not that it fails.

Problem persists with the 17th June kernel from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/

It's not clear to me that this is a kernel bug, should I still add the 'kernel-bug-exists-upstream' tag?

tags: removed: needs-upstream-testing
tags: added: needs-upstream-testing
David Emett (akxws32zf-dave) wrote :

Why did you re-add the 'needs-upstream-testing' tag? Is there more testing I should do?

David Emett, thank you for testing the mainline, and I added the appropriate kernel tag. Could you please provide the information following https://wiki.ubuntu.com/DebuggingKernelSuspend ?

tags: added: kernel-bug-exists-upstream
removed: needs-upstream-testing
David Emett (akxws32zf-dave) wrote :

I don't see how https://wiki.ubuntu.com/DebuggingKernelSuspend is relevant in this case -- the bug appears to be that suspend never gets triggered at all, not that it fails. So if I unplug the power and then close the lid, it will suspend fine. The problem is that if I close the lid first and then unplug the power, the suspend just isn't triggered.

Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Artyom Gavrichenkov (ximaera) wrote :

Also affects me with 12.04@Lenovo Thinkpad X200 and X220. Is there enough information provided to fix this, or I can help?

Artyom Gavrichenkov, could you please file a new report by executing the following in a terminal:
ubuntu-bug linux

For more on this, please see the Ubuntu Bug Control and Ubuntu Bug Squad article:

and Ubuntu Community article:

When opening up the new report, please feel free to subscribe me to it. Thank you for your understanding.

Helpful Bug Reporting Links:

Ian Hutchinson (hutch) wrote :

This bug is now identified as a shortcoming in gnome-settings-daemon.
A work around is available.

affects: linux (Ubuntu) → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
status: Expired → Confirmed
Ian Hutchinson (hutch) wrote :

This is an annoying shortcoming in the current gnome-settings (used to be gnome-power-manager). It does not check whether it should suspend when entering on-battery state. Here's a work-around:

Put the following into an (executable) file /etc/pm/power.d/zzsleepiflidclosed

# If the lid is closed, then sleep when we are switched to battery mode.
case "$1" in
    true) # Going into battery mode.
      sleep 1
      grep -q closed /proc/acpi/button/lid/*/state && dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
    false) # Going into line power mode
exit 0

I don't know why the sleep 1 pause is necessary, but without it, my lenovo won't resume stably. 2 seconds may be needed.

Sebastien Bacher (seb128) wrote :

reassigning, xfce doesn't use gnome-settings-daemon+

affects: gnome-settings-daemon (Ubuntu) → xfce4-power-manager (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers