Laptop screen turned off instead of suspending on lid close

Bug #1398771 reported by Michał Sawicz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unity-settings-daemon (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

For some time now my laptop did not suspend on lid close, I noticed recently that it actually only happened when I had my external screen connected, and what was actually happening is that the internal screen got disabled instead of the laptop going to sleep.

Attached find a --debug log from a close/open cycle.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: unity-settings-daemon 15.04.1+15.04.20141128-0ubuntu1
Uname: Linux 3.18.0-031800rc4-generic x86_64
ApportVersion: 2.14.7-0ubuntu10
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 3 11:44:15 2014
SourcePackage: unity-settings-daemon
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Michał Sawicz (saviq) wrote :

What might be happening is that the screen is turned off before the lid close event is delivered, so the event is ignored because the screen was already off?

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Rocko (rockorequin) wrote :

I get this in 15.04 as well, based on the description. When I close the lid, the external monitor initially turns off and then it turns straight back on again as the primary monitor, exactly as if I had turned off the internal monitor via the screen settings GUI instead of closing the lid.

If I've read the description correctly, perhaps the title of this bug report should say "Internal screen turned off..." instead of "External screen turned off..."?

Revision history for this message
Michał Sawicz (saviq) wrote :

Of course, nice catch Rocko ;)

summary: - External screen turned off instead of suspending on lid close
+ Laptop screen turned off instead of suspending on lid close
Changed in unity-settings-daemon (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Rocko (rockorequin) wrote :

I notice that if I unplug the external monitor first and then close the lid, the laptop *does* suspend.

I tried uncommenting HandleLidSwitch=suspend in /etc/systemd/logind.conf in case it is a systemd issue, but this didn't make any difference (even after a reboot), so perhaps this is a bug in systemd.

There also appear to be some new dconf settings that affect the suspend behaviour:

org.gnome.settings-daemon.plugins.xrandr: this is set to 'follow-lid' in my setup, which makes xrandr do a 'dock' when the lid is closed (ie to switch off the internal monitor, which is exactly the description in this bug). If I set it to 'do-nothing', closing the lid either does nothing (as expected) or engages the lock screen.

There's also a setting at org.gnome.settings-daemon.plugins.power called lid-close-suspend-with-external-monitor that describes itself with:

        With no external monitors plugged in, closing a laptop's lid
 will suspend the machine (as set by the lid-close-battery-action and
 lid-close-ac-action keys). By default, however, closing the lid when
 an external monitor is present will not suspend the machine, so that one can keep
 working on that monitor (e.g. for docking stations or media viewers). Set this
 key to False to keep the default behavior, or to True to suspend the laptop whenever the
 lid is closed and regardless of external monitors.

It is set to false by default, and its description matches the behaviour described in this bug report, so the bug might be that the power settings GUI (ie where you set the suspend behaviour) does not include the toggle for this setting.

However, note that suspend still does not work even if you set lid-close-suspend-with-external-monitor to true, so I guess there is an additional bug in gnome that prevents the laptop from suspending.

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.