17

How do I stop my laptop from suspending when closing the lid under lightdm - the power management settings in xfce or gnome 3 does not seem to apply when the window manager is not running.

Braiam
  • 69,112
jonasl
  • 330

4 Answers4

10

At the bottom of /etc/UPower/UPower.conf, set IgnoreLid=true.

jokerdino
  • 41,732
Will
  • 116
4

Run

gksudo gedit /etc/systemd/logind.conf

Uncomment

HandleLidSwitch=suspend

And change suspend to ignore.

Worked for me in 16.04.

Melebius
  • 11,750
4

Run

sudo vim /usr/share/polkit-1/actions/org.freedesktop.upower.policy

and replace the yes to no in the allow_active tags and replace from "yes" to "no" for inactive tags.

either

  • reboot
  • exit your X session, alt+ctrl+f1, and run sudo /etc/init.d/lightdm restart

Note: I just tested it, and restoring the values back to yes did not restore the previous functionality... no clue why.

Also, lightdm will still try to sleep, but will be denied. So every time you open the lid, you will get a message box telling the sleep/suspend failed.

this will also prohibit active suspend/sleep

...yet another annoyance that gnome3 brings us

Javier Rivera
  • 35,434
gcb
  • 262
1

Changing allow_active to no disable suspend for everything. I can't find better way to solve this but to switch to another console by pressing CTRL+ALT+F1 and then close the lid.

Peachy
  • 7,235
  • 10
  • 40
  • 47