Computer suspends immediately after resuming if power is unplugged while suspended

Bug #425411 reported by Phil Sung
666
This bug affects 138 people
Affects Status Importance Assigned to Milestone
DeviceKit-Power
Unknown
Medium
gnome-power
Fix Released
Low
devicekit-power (Debian)
Fix Released
Unknown
devicekit-power (Ubuntu)
Fix Released
Medium
Martin Pitt
Karmic
Fix Released
Medium
Chow Loong Jin
Lucid
Fix Released
Medium
Martin Pitt
gnome-power-manager (Ubuntu)
Fix Released
Medium
Chow Loong Jin
Karmic
Fix Released
Medium
Chow Loong Jin
Lucid
Fix Released
Medium
Chow Loong Jin

Bug Description

Binary package hint: gnome-power-manager

(This is an up-to-date Karmic AMD64 on a Thinkpad X61s.)

Immediately after resuming from suspend, Ubuntu occasionally goes right back into suspend. Subsequent attempts to resume are still successful.

This started a few weeks ago.

I have only noticed this happening when AC power is unplugged between suspend and resume.

ProblemType: Bug
Architecture: amd64
Date: Sun Sep 6 14:48:16 2009
DistroRelease: Ubuntu 9.10
Package: gnome-power-manager 2.27.91-0ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-9.29-generic
SourcePackage: gnome-power-manager
Uname: Linux 2.6.31-9-generic x86_64

Revision history for this message
Phil Sung (psung) wrote :
Revision history for this message
Katsudon (katsudon) wrote :

I can confirm this on Thinkpad X61s.

Revision history for this message
Guillaume Giroux (gug-microflex) wrote :

confirmed on thinkpad T61p running amd64 karmic with all updates too - as the reporter says, it seems to be related to AC power being unplugged before resuming.

Revision history for this message
Sandro Mani (sandromani) wrote :

Same here on a T400 as well as on a T60.

summary: - Computer suspends immediately after resuming
+ Computer suspends immediately after resuming if power is unplugged while
+ suspended
Revision history for this message
Matt Zimmerman (mdz) wrote :

Confirming, as there are multiple reports here and some anecdotal support in bug 261084 of a more recent regression in Karmic

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
tags: added: regression-potential
Revision history for this message
Matt Zimmerman (mdz) wrote :

I've seen plenty of spurious suspends immediately after resume, but haven't been able to isolate the circumstances which trigger it. Connecting or disconnecting power while suspended doesn't seem to trigger the problem for me.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I see this problem on a Dell mini 10v, but NOT on a ThinkPad T61, both running current Karmic

Revision history for this message
Gunnar Thielebein (lorem-ipsum) wrote :

I have this issue with a hp touchsmart tx2 running the latest karmic-amd64. Tested with connected and disconnected power cable.
Second resume is successful. Suspending with pm-suspend resumes correctly on first time.

Revision history for this message
Martin Pitt (pitti) wrote :

I tested this with the automatic suspend when the battery goes low. DK-power git head as a patch for it.

affects: gnome-power-manager (Ubuntu) → devicekit-power (Ubuntu)
Changed in devicekit-power (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fix applied to Debian package git tree, and uploaded to unapproved.

Changed in devicekit-power (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Steve Beaulac (steve-sagacity) wrote :

Same situation on my MSI U120 running fresh (just updated) Karmic.

The system resumes perfectly everything seem to be working but when you
press any key on the keyboard the system goes back to suspend mode. Everything work after second resume.

Will be waiting for the fix

Revision history for this message
Martin Pitt (pitti) wrote :

I would highly appreciate if folks could add https://launchpad.net/~ubuntu-desktop/+archive/ppa and upgrade from this. It has a new dk-power (and nothing else) which hopefully fixes this. Please report back here with both positive and negative feedback. Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

If it does not work, please do

 killall gnome-power-manager
 gnome-power-manager --debug 2>&1 | tee ~/gpm.log

then reproduce the problem, press Control-C, and attach ~/gpm.log here.

Then press Alt+F2, run "gnome-power-manager" to get it back in normal shape.

Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, not "--debug", but "--verbose":

 killall gnome-power-manager
 gnome-power-manager --verbose 2>&1 | tee ~/gpm.log

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

Ok. The versions from the above PPA do not see to work for me on my scenario; specifially if you suspend with AC power and then remove the power while suspended you get a double suspend:

  apw@penfold:~$ dpkg -l | grep kit-power
  ii devicekit-power 011-1ubuntu1 abstraction for power
  ii libdevkit-power-gobject1 011-1ubuntu1 abstraction for power

As per comment #13/#14 I have reproduced this with gnome-power-manager debugging turned on and am attaching the gpm.log, note that this does report two suspends:

  - suspending, reason: The lid has been closed on ac power.
  - suspending, reason: The lid has been closed, and the ac adapter removed (and gconf is okay).

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. I tested the inverse scenario when plugging in AC power during suspend, and g-p-m didn't notice quickly enough and still thought I'd run out of battery and thus suspended again. I confirmed that the pending dk-power upload fixes this.

Andy's scenario looks like g-p-m is getting a "bouncing" effect on the lid-close input event. It does not seem related to dk-power at all. So I open a new g-p-m task for this.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-power - 011-1ubuntu1

---------------
devicekit-power (011-1ubuntu1) karmic; urgency=low

  * Add 00git-fix-ac-refresh.patch: Properly refresh update-time after AC
    changes. This avoids immediately suspending again when AC state changes
    during suspend. (LP: #425411)

 -- Martin Pitt <email address hidden> Thu, 15 Oct 2009 15:45:44 +0200

Changed in devicekit-power (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Elie Charest (archiesteel) wrote :

I get the same bug with devicekit-power updated to version 011-1ubuntu1 :-/

The gpm.log file also shows two suspending events, like Andy's.

Problem occurs under similar conditions: unplugging suspended computer then waking up (but not the reverse).

Current karmic running on a Dell Mini10v.

Revision history for this message
Gunnar Thielebein (lorem-ipsum) wrote :

I have the lid_up event twice, also with the ppa version of devicekit-power on hp touchsmart tx2.

Revision history for this message
Gunnar Thielebein (lorem-ipsum) wrote :

s/lid_up/lid_down regarding previous comment.

Perhaps acpi_listen is also of interest (2x open/close):

button/lid LID 00000080 00000007
button/lid LID 00000080 00000008
button/lid LID 00000080 00000009
button/lid LID 00000080 0000000a

Revision history for this message
Lagos (artificial-music) wrote :

Confirmed on Asus Eeepc 1000h.
If the power cable is unplugged during a suspended state, the system will go right back to suspend after login.

Basically.
1. plug system into ac power
2. close lid to suspend
3. disconnect power cord.
4. open lid to wake up.
5. system will wake up, ask for log in, and as soon as it is logged in, suspend again. Press any key to wake the system up after that and the problem will be gone.

Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu):
status: Triaged → In Progress
Martin Pitt (pitti)
summary: - Computer suspends immediately after resuming if power is unplugged while
- suspended
+ Computer suspends immediately after resuming
Martin Pitt (pitti)
summary: - Computer suspends immediately after resuming
+ Computer suspends immediately after resuming if power is unplugged while
+ suspended
Revision history for this message
rupert (r-plumridge) wrote :

Confirmed on a Dell XPS M1330 running Karmic updated as fully as possible.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

I get a similar problem on a Dell D430 as reported in bug #459082. However, it also happens if power if unplugged *before* going into suspend. Here, I always unplug the adapter *before* and give it a minute or two before closing the lid.

tags: added: regression-karmic
tags: removed: amd64
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

I'll also point out that this bug is not amd64-specific. This D430 has a single-core CPU that is pure i386 and the issue exists too.

Revision history for this message
Gavin Chappell (g-a-c) wrote :

Also affects me on a Toshiba Portege A600 running the Karmic RC (been running and upgrading roughly since the beta release but haven't upgraded for a day or two). Attached are my gpm.log and a list of power related packages on my system.

Revision history for this message
Gavin Chappell (g-a-c) wrote :

Here's the second attachment, I couldn't see a way to attach two files to a single comment. I should also have told you I'm on the AMD64 release.

Martin Pitt (pitti)
summary: - Computer suspends immediately after resuming if power is unplugged while
- suspended
+ Computer suspends immediately after resuming
summary: - Computer suspends immediately after resuming
+ Computer suspends immediately after resuming after lid close/open
Revision history for this message
Martin-Éric Racine (q-funk) wrote : Re: Computer suspends immediately after resuming after lid close/open

At the risk of stating the obvious, this bug falls into the "if it ain't broken, don't fix it" category, as it was working flawlessly in Jaunty and during the early phase of Karmic development. Someone somewhere obviously made a drastic change (most probably upstream, but we shouldn't entirely discount changes in Debian/Ubuntu packaging, especially build-time patches) and it would be a good idea to figure out who, when and why, in order to avoid this ever happening again.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming after lid close/open

Martin-Éric Racine [2009-10-27 11:27 -0000]:
> At the risk of stating the obvious, this bug falls into the "if it ain't
> broken, don't fix it" category, as it was working flawlessly in Jaunty
> and during the early phase of Karmic development. Someone somewhere
> obviously made a drastic change (most probably upstream, but we
> shouldn't entirely discount changes in Debian/Ubuntu packaging,
> especially build-time patches) and it would be a good idea to figure out
> who, when and why, in order to avoid this ever happening again.

Presumably in the change from hal to dk-power.

Changed in gnome-power-manager (Ubuntu Karmic):
milestone: none → karmic-updates
Revision history for this message
flyman (fleitman68) wrote : Re: Computer suspends immediately after resuming after lid close/open

Bump!
Computer suspends immediately after resuming _if_ power is unplugged while suspended.

Revision history for this message
Max (mpflueger) wrote :

I just upgraded to the release of Karmic on my Lenovo T400 and I am experiencing this bug.

Revision history for this message
mnoe (matthias-noe) wrote :

After upgrading from jaunty to karmic I am experiencing this bug on a Macbook Pro 5,5.

Revision history for this message
Aviv Ben-Yosef (aviv-by) wrote :

Same here on a Thinkpad X200s, latest karmic

Revision history for this message
Martin Ling (martin-launchpad) wrote :

Also getting this on a Dell Latitude D610 since upgrade to Karmic. I think it does only happen when the power has been unplugged whilst suspended. It also doesn't seem to happen if I just suspend, unplug, and wake up again. Every time it happens the laptop has been asleep in my bag for quite a while.

Revision history for this message
O. Emmerson (oemmerson) wrote :

I have been experiencing this problem since installing Ubuntu v9.10.
I am running a Lenovo 3000 n500 laptop.

Revision history for this message
maiden30403 (maiden30403) wrote :

Seem to be having the same problem on Asus N81-VG using Ubuntu 9.10 AMD64 with latest packages.

Revision history for this message
Jason Gao (jasongao) wrote :

I seem to be having the same problem on an X200 Tablet (similar hardware to the X200s), except that the whole thing locks up when it tries to suspend again. I even get as far as seeing the unlock prompt before it freezes.

Revision history for this message
Aviv Ben-Yosef (aviv-by) wrote :

Jason: that's happening on my X200s too, and documented in this bug: http://linux.byexamples.com/archives/297/how-to-ssh-without-password/

Revision history for this message
Aviv Ben-Yosef (aviv-by) wrote :
Revision history for this message
Mark Cariaga (mzc) wrote :

this also affects Acer aspire D250. if I can recall corrctly there was a patch/update for dk-power in between alpha and beta release, after that everything went downhill.

Revision history for this message
Gunnar Thielebein (lorem-ipsum) wrote :

> this also affects Acer aspire D250. if I can recall corrctly there was a patch/update for dk-power in between alpha and beta
> release, after that everything went downhill.

can you point to that patch? Was it Ubuntu specific or upstream?

Steve Beattie (sbeattie)
tags: added: karmic regression-release
removed: regression-karmic regression-potential
Katsudon (katsudon)
summary: - Computer suspends immediately after resuming after lid close/open
+ Computer suspends immediately after resuming if power is unplugged while
+ suspended
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu Karmic):
assignee: Martin Pitt (pitti) → nobody
status: In Progress → Triaged
Changed in gnome-power-manager (Ubuntu):
status: In Progress → Triaged
milestone: karmic-updates → none
summary: - Computer suspends immediately after resuming if power is unplugged while
- suspended
+ Computer suspends or freezes immediately after resuming if power is
+ unplugged while suspended
Martin Pitt (pitti)
summary: - Computer suspends or freezes immediately after resuming if power is
- unplugged while suspended
+ Computer suspends immediately after resuming if power is unplugged while
+ suspended
Changed in gnome-power-manager (Ubuntu Lucid):
status: Triaged → Fix Committed
Changed in gnome-power-manager (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in gnome-power-manager (Ubuntu Karmic):
assignee: nobody → Chow Loong Jin (hyperair)
status: Triaged → In Progress
Changed in gnome-power-manager (Ubuntu Karmic):
status: In Progress → Confirmed
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu Karmic):
status: Confirmed → Fix Committed
tags: added: verification-needed
Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Changed in gnome-power-manager (Ubuntu Karmic):
status: Fix Committed → Confirmed
Changed in gnome-power-manager (Ubuntu Lucid):
status: Fix Released → Confirmed
tags: added: verification-failed
removed: verification-done
Changed in gnome-power-manager (Ubuntu Lucid):
status: Confirmed → Fix Committed
Changed in gnome-power-manager (Ubuntu Lucid):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu Karmic):
status: Confirmed → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
70 comments hidden view all 150 comments
Revision history for this message
Chris Conway (cconway) wrote :

Same here, after a full reboot. A log is attached.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

On Tuesday 26,January,2010 09:34 PM, Chris Conway wrote:
> Same here, after a full reboot. A log is attached.
>
> ** Attachment added: "gnome-power-manager log for: lid close, remove AC, lid open"
> http://launchpadlibrarian.net/38407533/gpm.log
>
Please get the libdevkit-power-gobject1 package from the same PPA before
testing. gnome-power-manager needs to be restarted (killall gnome-power-manager,
and run gnome-power-manager in a run dialog) after you've installed the new
gnome-power-manager and libdevkit-power-gobject1.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Changed in devicekit-power (Ubuntu Karmic):
assignee: Martin Pitt (pitti) → Chow Loong Jin (hyperair)
status: Fix Released → In Progress
Changed in devicekit-power (Ubuntu Lucid):
assignee: Martin Pitt (pitti) → Chow Loong Jin (hyperair)
status: Fix Released → In Progress
Changed in gnome-power-manager (Ubuntu Karmic):
status: Fix Committed → In Progress
Changed in gnome-power-manager (Ubuntu Lucid):
assignee: Martin Pitt (pitti) → Chow Loong Jin (hyperair)
status: Fix Released → In Progress
Revision history for this message
Chris Conway (cconway) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

Chow, That worked!

On Tue, Jan 26, 2010 at 8:48 AM, Chow Loong Jin <email address hidden> wrote:
> On Tuesday 26,January,2010 09:34 PM, Chris Conway wrote:
>> Same here, after a full reboot. A log is attached.
>>
>> ** Attachment added: "gnome-power-manager log for: lid close, remove AC, lid open"
>>    http://launchpadlibrarian.net/38407533/gpm.log
>>
> Please get the libdevkit-power-gobject1 package from the same PPA before
> testing. gnome-power-manager needs to be restarted (killall gnome-power-manager,
> and run gnome-power-manager in a run dialog) after you've installed the new
> gnome-power-manager and libdevkit-power-gobject1.
>
> --
> Kind regards,
> Chow Loong Jin (GPG: 0x8F02A411)
> Ubuntu Contributing Developer
>
>
> ** Changed in: devicekit-power (Ubuntu Karmic)
>       Status: Fix Released => In Progress
>
> ** Changed in: devicekit-power (Ubuntu Karmic)
>     Assignee: Martin Pitt (pitti) => Chow Loong Jin (hyperair)
>
> ** Changed in: devicekit-power (Ubuntu Lucid)
>       Status: Fix Released => In Progress
>
> ** Changed in: devicekit-power (Ubuntu Lucid)
>     Assignee: Martin Pitt (pitti) => Chow Loong Jin (hyperair)
>
> ** Changed in: gnome-power-manager (Ubuntu Karmic)
>       Status: Fix Committed => In Progress
>
> ** Changed in: gnome-power-manager (Ubuntu Lucid)
>       Status: Fix Released => In Progress
>
> ** Changed in: gnome-power-manager (Ubuntu Lucid)
>     Assignee: Martin Pitt (pitti) => Chow Loong Jin (hyperair)
>
> --
> Computer suspends immediately after resuming if power is unplugged while suspended
> https://bugs.launchpad.net/bugs/425411
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Chow Loong Jin (hyperair) wrote :
Changed in devicekit-power (Ubuntu Lucid):
assignee: Chow Loong Jin (hyperair) → Martin Pitt (pitti)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-power - 014-3

---------------
devicekit-power (014-3) unstable; urgency=low

  * Add 02-dkpclient-singleton.patch: Make DkpClient a singleton to avoid some
    weird race conditions. Patch taken from upstream git. (Closes: #567021,
    LP: #425411)
 -- Martin Pitt <email address hidden> Tue, 26 Jan 2010 20:26:03 +0100

Changed in devicekit-power (Ubuntu Lucid):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted devicekit-power into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in devicekit-power (Ubuntu Karmic):
status: In Progress → Fix Committed
Changed in devicekit-power (Debian):
status: Unknown → Fix Released
Revision history for this message
Bastanteroma (bastanteroma) wrote :

This may new a bug, but:

Since upgrading to Lucid a week ago, resuming by opening the lid leaves me with a blank screen. Everything else appears to be working (or music, internet connection, at least).

Suspending through the menu and then resuming with the power button works fine, as does suspending from tty1.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

On Thursday 28,January,2010 06:41 AM, Bastanteroma wrote:
> This may new a bug, but:
>
> Since upgrading to Lucid a week ago, resuming by opening the lid leaves
> me with a blank screen. Everything else appears to be working (or music,
> internet connection, at least).
>
> Suspending through the menu and then resuming with the power button
> works fine, as does suspending from tty1.
>
Yes, that is a new bug. Please file it separately.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Chow Loong Jin (hyperair) wrote :

And here's the final gnome-power-manager debdiff that will fix all double-suspend issues for Karmic!

Revision history for this message
ethanay (ethan-y-us) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

This message doesn't directly contribute to the bug fix. However, as
an Ubuntu (and ex-M$) user (and unofficial Ubuntu family sysadmin), I
just want to thank you folks and others for the work you are doing in
making Ubuntu an increasingly solid distro. The level of transparency
is refreshing and amazing.

Thanks!

Revision history for this message
Chow Loong Jin (hyperair) wrote :

The next upload of gnome-power-manager to Debian will include this fix, then it'll be synced over.

Changed in gnome-power-manager (Ubuntu Karmic):
status: In Progress → Confirmed
Changed in gnome-power-manager (Ubuntu Lucid):
status: In Progress → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks! I sponsored/accepted the new g-p-m into karmic-proposed. Please test again.

Changed in gnome-power-manager (Ubuntu Karmic):
status: Confirmed → Fix Committed
Revision history for this message
Novecento (alexander-doelz) wrote :

Hi Martin, It worked!

Revision history for this message
glass.dimly (jmjohn) wrote :

Installing devicekit-power from karmic proposed as suggested worked perfectly for me.

Make sure to pin and add the proposed repositories as suggested here:

https://wiki.ubuntu.com/Testing/EnableProposed

Then,

sudo aptitude install devicekit-power/karmic-proposed

Thanks for your work!

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Ling (martin-launchpad) wrote :

I have installed gnome-power-manager and devicekit-power from karmic-proposed and rebooted, but am still seeing this problem on a Dell Studio XPS 1645.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

On Tuesday 02,February,2010 09:35 PM, Martin Ling wrote:
> I have installed gnome-power-manager and devicekit-power from karmic-
> proposed and rebooted, but am still seeing this problem on a Dell Studio
> XPS 1645.
>
There were actually multiple variants of this problem. I'm quite sure I got the
first two. Could you explain exactly what you do that can reproduce this bug?
Also please kill gnome-power-manager and post the output of `gnome-power-manager
--verbose` from a double-suspend round.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-power - 011-1ubuntu2

---------------
devicekit-power (011-1ubuntu2) karmic-proposed; urgency=low

  * debian/patches/02-dkpclient-singleton.patch:
    - Make DkpClient a singleton to avoid strange races that can
      arise. Patch pulled from upstream Git. (LP: #425411)
 -- Chow Loong Jin <email address hidden> Wed, 27 Jan 2010 02:02:00 +0800

Changed in devicekit-power (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.28.1-0ubuntu1.3

---------------
gnome-power-manager (2.28.1-0ubuntu1.3) karmic-proposed; urgency=low

  * debian/patches/09-fix-double-suspend.patch:
    + Inhibit consolekit events after resuming from suspend to fix a race
      condition regarding pm-utils, uswsusp, and chvt (LP: #425411)

gnome-power-manager (2.28.1-0ubuntu1.2) karmic-proposed; urgency=low

  * debian/patches/09-fix-double-suspend.patch:
    + Fix gpm_button_is_lid_closed to return an updated value from
      DeviceKit-Power instead of its own locally stored value which may be
      outdated (LP: #425411)

gnome-power-manager (2.28.1-0ubuntu1.1) karmic-proposed; urgency=low

  * debian/patches/09-fix-double-suspend.patch:
    + Manually check lid status in gpm_manager_client_changed_cb. Fixes
      double-suspend bug (LP: #425411)
 -- Chow Loong Jin <email address hidden> Thu, 28 Jan 2010 08:26:09 +0800

Changed in gnome-power-manager (Ubuntu Karmic):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu Lucid):
milestone: none → lucid-alpha-3
Revision history for this message
Martin Ling (martin-launchpad) wrote :

> There were actually multiple variants of this problem. I'm quite sure I got the
> first two. Could you explain exactly what you do that can reproduce this bug?

With AC power connected, I close the lid and the machine suspends. I then remove the power cable and open the lid. The machine resumes, but then immediately suspends again. If I resume it again by pressing the power button, it stays resumed.

> Also please kill gnome-power-manager and post the output of `gnome-power-manager
> --verbose` from a double-suspend round.

Attached.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Wednesday 03,February,2010 01:14 AM, Martin Ling wrote:
>> There were actually multiple variants of this problem. I'm quite sure I got the
>> first two. Could you explain exactly what you do that can reproduce this bug?
>
> With AC power connected, I close the lid and the machine suspends. I
> then remove the power cable and open the lid. The machine resumes, but
> then immediately suspends again. If I resume it again by pressing the
> power button, it stays resumed.
>
>> Also please kill gnome-power-manager and post the output of `gnome-power-manager
>> --verbose` from a double-suspend round.

Did you install the updated libdevkit-power-gobject1 package (it comes from the
devicekit-power source package)? That's the particular package that contains the
fix for your problem. You'll need to restart gnome-power-manager after
installing it, of course.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Tomas Pospisek (tpo-deb) wrote :

I am confirmin that after reverting the configuration change from

  https://bugs.launchpad.net/ubuntu/+source/devicekit-power/+bug/425411/comments/47

upgrading to:

linux-image-generic 2.6.31.19.32
devicekit-power 011-1ubuntu2
gnome-power-manager 2.28.1-0ubuntu1.3

and rebooting, suspending and waking up is working as it should. I.e.:

1) I close the lid while AC is plugged in -> the laptop suspends correctly
2) while suspended I unplug AC
3) I open the lid -> the laptop wakes up
4) and that's it, no more re-suspending, the laptop stays up awake

(HP Compaq 6710b here)

Thanks to Chow Loong Jin and Marin Pitt fixing and trackingall this stuff! Horray!

Revision history for this message
Krister Swenson (thekswenson) wrote :

The fix seems to work on the dell xps m1330.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.29.2-0ubuntu1

---------------
gnome-power-manager (2.29.2-0ubuntu1) lucid; urgency=low

  * New upstream release:
    - Move the power management preferences into the hardware section of the
      control center.
    - Use the name of 'Power' for the power management preferences capplet
    - Don't rely on the cached value of the lid status, to fix a double
      suspend issue (LP: #425411)
    - Add a flag to inhibit consolekit events just after we resumed
    - Don't automatically suspend if there are suspend inhibits
    - Do not exit if hal is not available
    - Only connect to HAL if there is no xrandr backlight hardware
    - Fix compile when using an ld that defaults to --as-needed
    - Enable the help action in gnome-power-statistics. Fixes #607005
    - Ensure the window is realized before we invalidate it. Fixes #604918
    - Don't show the user a sleep failed link pointing to the quirk site
    - Show the device name even when using UPower
    - Translation updates.
  * Drop patches accepted upstream:
    + 03-run-without-hal.patch
    + 04-dont-connect-to-hal-with-xrandr.patch
    + 09-fix-double-suspend.patch
  * Regenerate 90-autotools.patch.
 -- Martin Pitt <email address hidden> Fri, 05 Feb 2010 13:28:09 -0800

Changed in gnome-power-manager (Ubuntu Lucid):
status: Confirmed → Fix Released
Revision history for this message
glass.dimly (jmjohn) wrote :

Fix worked for me! Thanks for all the work!

Revision history for this message
David Hardstone (dhardstone) wrote :

+ my thanks!!

Revision history for this message
cement_head (andorjkiss) wrote :

Hi,

  At some point in the last few (three?) weeks this bug was fixed for me using an HP6910p laptop (I posted my original bug here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/505479 ).

Thanks,
CH

Revision history for this message
paul stoop (paul-stoop-nl) wrote :

What does it mean: "Fix released"? I still have this problem, every day twice, as i use my laptop while commuting by train and charging at home and at work!

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Wednesday 10,February,2010 10:46 PM, paul stoop wrote:
> What does it mean: "Fix released"? I still have this problem, every day
> twice, as i use my laptop while commuting by train and charging at home
> and at work!
>
As shown by the previous few comments, this issue is fixed for most people. If
you can still see this problem, please check the versions of your
gnome-power-manager and libdevkit-power-gobject1 packages. You need
2.28.1-0ubuntu1.3 of gnome-power-manager and 011-1ubuntu2 of
libdevkit-power-gobject1.

You can check these by running this in a terminal:
apt-cache policy gnome-power-manager libdevkit-power-gobject1

If you do have the required versions mentioned above, then the bug fix was not
complete, and we will need you to follow the steps detailed in comments #13 and
#14 of this bug report.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Chris Conway (cconway) wrote :

Paul, the bug is (thought to be) fixed in devicekit version 011-1ubuntu2 and gnome-power-manager version 2.28.1-0ubuntu1.3, both available in karmic-updates. Do you have the karmic-updates repository enabled? If so, you should post a follow-up more details on your system and the output from "gnome-power-manager --verbose" on a suspend, resume, re-suspend cycle.

Revision history for this message
Erik Andrén (erik-andren) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

2010/2/10 paul stoop <email address hidden>:
> What does it mean: "Fix released"? I still have this problem, every day
> twice, as i use my laptop while commuting by train and charging at home
> and at work!
>

Paul,
Please make sure you've enabled the proposed repository.

Best regards,
Erik

> --
> Computer suspends immediately after resuming if power is unplugged while suspended
> https://bugs.launchpad.net/bugs/425411
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
Celsius (celsius-netbel) wrote :

Thanks ! The fix works on my dell latitude e6500

I had open bug 496525 which is a duplicate of this bug. Is there anything I have to do to close that bug or mark it as fixed ?

Revision history for this message
paul stoop (paul-stoop-nl) wrote :

Thanks all. My T61p is up to date and I can' t reproduce the bug right now. I'll pay close attention the next days is it shows up again. I think it only happens/happened after a significant battery discharge. cheers, Paul.

Revision history for this message
David Tombs (dgtombs) wrote :

@Celsius: Nope, you don't have to do anything. Thanks for the thought, though!

Revision history for this message
paul stoop (paul-stoop-nl) wrote :

After 10 days of being aware that this bug was fixed, I can confirm that it definitely seems to have been expelled from my laptop (lenovo T61p) as well. Congretulations, this was the last major pain in my neck since Karmic.
-p

Revision history for this message
Mark (mark-wege) wrote :

i can confirm it working with kde too.

Revision history for this message
ethanay (ethan-y-us) wrote :

Are there other "immediately resuspends" bugs that are currently open?

The power state problem this bug describes is now fixed on my XPS m1330, but I am still experiencing immediate resuspends on occasion. It seems to be after

a. locking or blanking the screen, closing the lid (triggers suspend), or
b. letting the computer suspend itself and

attempting resume after several hours have passed.

Revision history for this message
Kieran Hogg (xerosis) wrote :

I'm still seeing this on an up to date Kubuntu Karmic, without devicekit or gnome-power-manager installed. is the only solution to install these packages? Neither are installed by default on Kubuntu.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 425411] Re: Computer suspends immediately after resuming if power is unplugged while suspended

On Monday 08,March,2010 04:07 AM, Kieran Hogg wrote:
> I'm still seeing this on an up to date Kubuntu Karmic, without devicekit
> or gnome-power-manager installed. is the only solution to install these
> packages? Neither are installed by default on Kubuntu.
>
This bug belongs to gnome-power-manager/devicekit-power, and has been fixed.
What you are seeing is a different bug with similar symptoms. Neither
gnome-power-manager nor devicekit-power will fix your problem on Kubuntu.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Developer

Revision history for this message
ethanay (ethan-y-us) wrote :

This was fixed with me for a while, but I'm seeing it again on an up-to-date Karmic laptop (Dell XPS m1330)...

1. Occasional, seemingly-random suspend immediately after resume
2. Suspend after resume if power state changes during suspend (e.g., laptop is unplugged)

both seem to happen after a threshold time is exceeded -- can't reproduce with a suspend and immediate resume. All cases involve laptop lid close triggering suspend.

Revision history for this message
David Tombs (dgtombs) wrote :

ethanay: I recommend reporting a new bug with "ubuntu-bug gnome-power-manager". This one has been fixed, you probably have a different issue.

Changed in devicekit-power:
importance: Unknown → Medium
Changed in gnome-power:
importance: Unknown → Low
status: Unknown → Fix Released
Displaying first 40 and last 40 comments. View all 150 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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