12

Since the upgrade to 15.04 (update: 15.10 still same), my laptop's behavior on closing lid has changed: if it is connected to an external monitor, it will not suspend. In addition, all the windows are now flushed to the external monitor. This seems like a deliberate feature and not a bug.

How do I configure the laptop to suspend even if it's connected to an external monitor?

This is Lenovo Thinkpad T440s on Ubuntu 15.04/15.10 with Intel graphics.

9

I think this feature is now configurable. You can change the option as user with the dconf-editor:

Schema:

org.cinnamon.settings-daemon.plugins.power

or (depending on what desktop environment you use)

org.gnome.settings-daemon.plugins.power

Key:

lid-close-suspend-with-external-monitor

Set to:

true

Description:

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.

| improve this answer | |
  • Or for those of us that are command-line-oriented: dconf write /org/gnome/settings-daemon/plugins/power/lid-close-suspend-with-external-monitor true (then you can put it into your 'set up a new ubuntu machine' script, and never have to worry about it again) – Jonathan Hartley Aug 23 '16 at 15:05
  • 1
    At least in Linux Mint 18.1 Serena Cinnamon (~Ubuntu 16.04 also?) this is now the standard behavior and configurable via system settings -> power management -> power -> Perform lid-closed action.. – Tapper Jun 4 '17 at 21:09
  • I had this same problem when upgrading from 17.04 to 17.10 (which implies on moving to GNOME 3). Changing the key lid-close-suspend-with-external-monitor in the path org.gnome.settings-daemon.plugins.power to true solved the issue. – brandizzi Nov 29 '17 at 11:43
8

Welcome to Ubuntu with systemd rather than with upstart.

This is systemd bug #76267. Lennart Poettering's initial explanation was:

The [nvidia] binary driver does not implement the DRM interfaces in /sys. This means we cannot detect how many displays are connected and then we decide not to handle the lid switch since we cannot be sure about whether the device is in "docking" mode, or not.

A "fix" is to use nouveau.

Because of systemd bug #82485 this behaviour is now configurable. If you have a non-DRM driver, like the nvidia one, the default behaviour with multiple monitors will be to ignore the lid switch. But the recent HandleLidSwitchDocked setting in logind.conf can be used to change this.

(For completeness: There is GNOME bug #734964, still open, that introduces complications for GNOME 3 users.)

| improve this answer | |
  • I see. So it seems like a bug. But I use Intel graphics. Is the fix different? Many thanks. – Phil Apr 25 '15 at 16:03
  • The two systemd bugs you are mentioning are marked as resolved/fixed by now. – Tapper Apr 1 '16 at 9:46
1

I ran into the same problem upgrading from 14.10 to 15.04 (Xubuntu). Although I was using Nouveau (Xorg driver), I wasn't able to go into Suspend mode closing the lid. Every other way worked just fine e.g. "Sleep Button", "Suspend" from Menu etc.

My workaround was to uncheck the following option in gnome-settings (a.k.a Settings Editor):

xfce4-power-manager > logind-handle-lid-switch (unchecked)

After doing this I can suspend closing my lid anytime.

Hope that helps.

| improve this answer | |
1

This is a new systemd default which is not configurable yet.

To Workaround, type in a terminal

echo "HandleLidSwitchDocked=suspend" |sudo tee -a /etc/systemd/logind.conf

then reboot(!).

This changes the default from "ignore" to "suspend".

| improve this answer | |
  • You may want to vote "This bug affects me" here to make this UI-configurable: bugs.launchpad.net/ubuntu/+source/xorg/+bug/1439440 – geek-merlin Dec 30 '15 at 15:36
  • I tried this on Debian Stretch. The file /etc/systemd/logind.conf has this option commented out, the default value was not suspend. But even after changing to suspend and restarting, it still doesn't suspend on closing the lid. – Fred Schoen Oct 22 '17 at 22:38
0

I was facing similar issue this answer solved my issue. Install Unity Tweak Tool and in System > Security all the options should be unticked. The Desktop Lock was ticked in my case uncheck this.

See this img:

enter image description here

If the above mentioned option is ticked then in System Settings > Brightness and Lock the lock option is disabled which causes all the problem.

See this img:

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.