Laptop does not suspend on lid close when external display is connected

Bug #951790 reported by Roman Masek
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Invalid
Low
Unassigned

Bug Description

I've configured my laptop to suspend when the lid is closed (in gnome-control-center's Power panel). It works ok as long as there is no external display connected. However when I connect my external LCD, laptop IS NOT suspended (external display is turned off though).

I've done some research and found out that problem is in gnome-settings-daemon package: There is code in gsd-power-manager.c in do_lid_closed_action function which checks whether there are any active external outputs and if it finds any, it prevents suspending. I believe that in this case we should honor what's set in gnome-control-center and suspend. Patch which removes this logic is attached.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-settings-daemon 3.3.91-0ubuntu2 [modified: usr/lib/gnome-settings-daemon-3.0/libpower.so]
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu1
Architecture: amd64
Date: Sat Mar 10 21:21:00 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120309)
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-settings-daemon
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Roman Masek (romario333) wrote :
Revision history for this message
Roman Masek (romario333) wrote :

As a side note - this bug has one funny aspect. If you look at the beginning of do_lid_closed_action method, there is code starting with comment - /* check we won't melt when the lid is closed */. Well if I don't miss anything we WOULD MELT if external display was connected :-)

Revision history for this message
Roman Masek (romario333) wrote :

I've filled bug in upstream too:

https://bugzilla.gnome.org/show_bug.cgi?id=671799

Roman Masek (romario333)
tags: added: multimonitor
removed: amd64
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "suspend_on_closed_lid_multi_display_fix.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Roman Masek (romario333) wrote :

This is no longer issue in 12.04, closing bug.

Changed in gnome-settings-daemon (Ubuntu):
status: New → Invalid
Revision history for this message
Vadász Zoltán B. (vadasz-zoltan) wrote :

It is still an issue in 12.04!
After an update several days ago my Dell E6520 with the intel CPU built in graphics does not suspend when an external display is attached and I close the lid. It suspends from the power menu and also on lid close id there is no external display attached.
Before the update suspend on lid close worked fine even if an external display was attached.
Unfortunately I can not tell which upgrade is responsible for the change, but I can tell, that I reboot the mashine every weekend and I upgrade every 2-3 days.
That's why I think the upgrade responsible for the change arrived in the last week, somewhere between 2012.05.21-2012.05.28.

Changed in gnome-settings-daemon (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Vadasz: what you describe is not a bug and has been discussed upstream several times I think, you should check bugzilla.gnome.org if you are interested in the details, the intend is to not suspend on lid close for docked configs since closing the lid for those is not a clear intend to suspend (you might just want to use your station monitor)

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
Revision history for this message
Matthew Woerly (nattgew) wrote :

I know this is marked as invalid, I'd just like to say that there is a "workaround" for this "bug" in Gnome shell. Gnome-tweak-tool has the option for "Laptop lid, when closed, will suspend even if there is an external monitor plugged in." Works great, no more messing with display settings all the time.

Revision history for this message
Drew Noakes (drewnoakes) wrote :

It seems that the behaviour desired by this bug is the default in Ubuntu 13.10.

Note too that there are people lobbying to be able to sleep on lid-close only when no monitor is connected as well! See http://askubuntu.com/q/362337/17164

When I move to my desk, I close the laptop and use a nice large monitor. There does not seem to be an option to avoid sleeping on lid close when an external monitor is connected any more.

Revision history for this message
Michael (michaeljt) wrote :

Sorry to be disturbing an ants nest here, but I am one of those annoying people who would like my laptop not to suspend when an external monitor is connected. I have no problems with installing gnome-tweak-tool and changing a setting there to get that behaviour, but the tool claims it is already enabled. Does anyone know whether this is an Ubuntu issue, or a GNOME one, and where I should be looking? Thanks.

Revision history for this message
Rob Golding (rob-robgolding) wrote :

I agree, being able to disable suspend when an external monitor is connected make perfect sense (even if it's not the default behaviour). I've installed gnome-tweak-tool and "Laptop lid, when closed, will suspend even if there is an external monitor plugged in." is disabled, but it happens anyway.

Revision history for this message
aexl (aexl) wrote :

Crosslinking #1439440

People that experience this bug since 1504 might face that one.

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.