I have Ubuntu 14.04.01 server.
I edited /etc/systemd/logind.conf
and 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?