suspends when switching VTs when lid is closed

Bug #515465 reported by Hans-Gerd van Schelve on 2010-02-01
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-power
Fix Released
Medium
gnome-power-manager (Ubuntu)
Medium
Martin Pitt
Lucid
Medium
Martin Pitt

Bug Description

Binary package hint: gnome-power-manager

I have configured g-p-m to go into suspend to ram when closing the LID on a Laptop running Lucid..

If the system is in a docking station and started with the lid closed, the following problem occurs:
Now when switching from X to a virtual console and then back to X the laptop goes into suspend2ram.

The expected result is that the laptop does not go into suspend2ram.

I found this on a Lucid system:
gnome-power-manager 2.29.1-0ubuntu2

The same happens when starting VirtualBox gui on that system!

virtualbox Version is: 3.1.2-56127_Ubuntu_karmic 0

Torsten Spindler (tspindler) wrote :

This seems to be fixed in 2.29.2-0ubuntu2, at least I cannot reproduce the problem on a Thinkpad T61.

Changed in gnome-power-manager (Ubuntu):
status: New → Invalid
status: Invalid → Incomplete

Just tested against 2.29.2-0ubuntu2 on my x61. I can still reproduce the problem here so the current version does not fix the problem in my case.

description: updated
description: updated

Setting the bug to confirmed after seeing it on two different systems.

summary: - g-p-m acts when switching to console and back to x
+ g-p-m acts when switching to console and back to x when lid is closed
Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Confirmed
Torsten Spindler (tspindler) wrote :

After killing gnome-power-manager the problem disappears.

Chris Coulson (chrisccoulson) wrote :

Thank you for your bug report. Please run "killall gnome-power-manager && gnome-power-manager --verbose 2>&1 | tee ~/gpm.log", then trigger the issue and attach the resulting log file here.

Thanks

Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Medium
status: Confirmed → Incomplete

Attached the requested debug output.

Torsten Spindler (tspindler) wrote :

The attached patch prevents a system from going to sleep when lid is closed and it is docked. It contains a lot of debug output, just in case.

Chris Coulson (chrisccoulson) wrote :

Thanks, but the patch seems quite a hacky solution, and very specific to your hardware too (eg, I don't even have a /sys/devices/platform/dock.0/docked when my laptop is docked). A more robust check would be to see if there are any external monitors connected.

tags: added: patch

Checking for a display could be done with xrandr. I'll have a look at
it.

It is not completely clear to me how to use xrandr to detect multiple displays. On the command line it looks like the following will see if an external display is connected:

$ xrandr | grep connected | grep -v disconnected | egrep "VGA|DVI"

Torsten Spindler (tspindler) wrote :

The attached source checks via xrandr if an external display is connected (named VGA or DVI). It does not work with drivers that don't provide xrandr interface, e.g. the binary driver from nvidia.

Torsten Spindler (tspindler) wrote :

Attached is the Makefile. Please let me know if this is the right direction for resolving the issue.

Martin Pitt (pitti) wrote :

This worked fine in Karmic, and I can perfectly reproduce this on my workstation on current lucid. I'll take a look at it.

I already fixed a bug with similar symptoms back in karmic, seems this broke again in a slightly different way.

Changed in gnome-power-manager (Ubuntu Lucid):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → Martin Pitt (pitti)
status: Incomplete → In Progress
tags: added: regression-potential
removed: patch
summary: - g-p-m acts when switching to console and back to x when lid is closed
+ suspends when switching to console and back to X when lid is closed
summary: - suspends when switching to console and back to X when lid is closed
+ suspends when switching VTs when lid is closed
Martin Pitt (pitti) wrote :

I thoroughly analyzed the situation in the upstream bug and sent a patch. I'll discuss this with upstream and upload it after beta-1.

Changed in gnome-power-manager (Ubuntu Lucid):
status: In Progress → Fix Committed
Martin Pitt (pitti) wrote :

Patch pushed to upstream git, this will be in gpm 2.30.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.29.91-0ubuntu7

---------------
gnome-power-manager (2.29.91-0ubuntu7) lucid; urgency=low

  [ Chris Coulson ]
  * Updated patch tag information now some patches are upstream

  [ Martin Pitt ]
  * 17-unify-power-strings.patch:
    - Revert "Shut down" → "Switch off" change for lucid, as in other
      packages. This is still being debated.
    - Revert all the "your computer" → "the computer" (and similar) changes.
      No reason to break hundreds of translations for such unimportant changes.
  * Add 01-suspend-on-vt-change.patch: Fix wrong suspends with docked laptops.
    (LP: #515465)
 -- Martin Pitt <email address hidden> Wed, 24 Mar 2010 15:29:44 +0100

Changed in gnome-power-manager (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in gnome-power:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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