Skip to content

Instantly share code, notes, and snippets.

@lujiacn
Created September 5, 2016 02:42
Show Gist options
  • Save lujiacn/334d220ecd726688c62474e6fc7db735 to your computer and use it in GitHub Desktop.
Save lujiacn/334d220ecd726688c62474e6fc7db735 to your computer and use it in GitHub Desktop.
make lid close do nothing
refer: http://askubuntu.com/questions/15520/how-can-i-tell-ubuntu-to-do-nothing-when-i-close-my-laptop-lid
accepted
For 13.10 - 16.04:
To make Ubuntu do nothing when laptop lid is closed:
Open the /etc/systemd/logind.conf file in a text editor as root, for example,
sudo -H gedit /etc/systemd/logind.conf
Add a line HandleLidSwitch=ignore (make sure it's not commented out!),
Restart the systemd daemon with this command:
sudo restart systemd-logind
or, from 15.04 onwards:
sudo service systemd-logind restart
See also: Ubuntu Server 13.10 now goes to sleep when closing laptop lid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment