With Ubuntu 16.04 laptop doesn't suspend when lid is closed

42,970

Solution 1

I stumbled across an answer that seems to have worked. Too bad there is not a cleaner way to do this than to alter the default settings. Would rather the System Settings|Power setting worked.

I edited the file '/etc/systemd/logind.conf'

sudo vi /etc/systemd/logind.conf

Then I uncommented the line (removed the beginning #) containing 'HandleLidSwitchDocked=ignore' and changed the value to be:

HandleLidSwitchDocked=suspend

After a reboot all seems to be working as expected, though I'm still prompted to login twice. (Once to unlock, and again as a user of the OS.)

Solution 2

I had a similar problem. There is apparently a bug in the 4.4.0 kernel. The problem can be solved when you install the new kernel 4.4.8.

You can find instructions to do it here: http://linuxdaddy.com/blog/install-kernel-4-4-on-ubuntu/

Works perfect for me.

Solution 3

I have/had the same problem and found this link helpful. Laptop does not suspend when lid is closed

Like one of the people with "solutions", I found that I have to manually suspend my laptop initially before closing the lid on subsequent occasions will work.

Good luck with it.

Share:
42,970

Related videos on Youtube

Adam Culp
Author by

Adam Culp

Updated on September 18, 2022

Comments

  • Adam Culp
    Adam Culp over 1 year

    I have a Dell 7737 laptop, and with Ubuntu 16.04 it no longer suspends when the laptop lid is closed. With 14.04 closing the lid put the laptop to suspend as expected. However, I reloaded the system with Ubuntu 16.04 and now closing the laptop does nothing. The laptop continues to run as if nothing happened.

    When I manually select "Suspend" from the menu it works as expected. (Though it does prompt me to double login on resume. No, not encryption login followed by OS login. This is a double OS login.)

    NOTE: Altering the System Settings|Power doesn't seem to affect anything.

    Any ideas on what changed from 14.04 to 16.04 in this area?

  • Adam Culp
    Adam Culp about 8 years
    This didn't work, but was my first attempt as well.
  • Roberto
    Roberto almost 8 years
    This helped getting the laptop to suspend after closing the lid, but my laptop now freezes every time I open the lid. Setting the laptop to suspend from the UI and then closing the lid works, but bringing the laptop back from suspend after opening the lid only works about 75% of the time, while 25% of the time the laptop freezes.
  • Jorge
    Jorge almost 8 years
    This solution worked for me and several other users. See bugs.launchpad.net/ubuntu/+source/systemd/+bug/1574120. And this double login issue does not happen here. I recommend affected users visit the aforementioned link and click the button that informs you are affected too (but please avoid leaving "me too" comments). Also subscribe to notifications so when they release a fix you can help test it.
  • Delorean
    Delorean almost 8 years
    This did not solve my problem with suspend. Running "echo mem > /sys/power/state" only gets me a black screen I can't get rid of. acpi_listen shows me lid closed and open events. Still nothing...
  • bozdoz
    bozdoz over 7 years
    Yeah, this solution really messed up my machine.
  • Mena
    Mena almost 7 years
    Didn't work for me on Ubuntu 17.04 / kernel 4.10.22 unfortunately. Neither did explicitly setting the other property: HandleLidSwitch.
  • BourbonCreams
    BourbonCreams almost 7 years
    It worked for me on 16.04 and I only have to login once. Thanks!
  • BourbonCreams
    BourbonCreams almost 7 years
    UPDATE: this solution worked for a couple of days. Now the computer goes to sleep but it wakes up straight after that without opening the lid.
  • George
    George over 6 years
    @BourbonCreams Check under System Settings > Brightness & lock if you have the "Lock" slide activated for when the computer is suspended.
  • Juan García
    Juan García almost 5 years
    Thanks! For my Dell XPS 9570 laptop I had to use 'HandleLidSwitch=suspend' instead of 'Docked'. Running Ubuntu 19.04.