2

I have Ubuntu 14.04.01 server.

I edited /etc/systemd/logind.confand changed a line to

HandleLidSwitch=ignore

Then I saved the file and executed sudo restart systemd-logind.
I even rebooted the computer and verified that HandleLidSwitch still has the correct value even after 2 reboots.

However, Ubuntu still sleeps when the lid is shut.

How can I disable sleeping on closing the lid?

2 Answers 2

2

turned out the entire section was commented out I didn't realize because I am only use to commenting in C.

0

Comment away both the HandleLidSwitch and LidSwitchIgnoreInhibited in logind.conf and then type: (In a terminal: Ctrl+Alt+T)

sudo restart systemd-logind

Then type:

gsettings set org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action 'suspend'

and then report back here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .