For 13.10 – 20.04.1:
To make Ubuntu do nothing when laptop lid is closed:
- Open the
/etc/systemd/logind.conffile in a text editor as root, for example,sudo -H gedit /etc/systemd/logind.conf - If
HandleLidSwitchis not set toignorethen change it:HandleLidSwitch=ignoreMake sure it’s not commented out (it is commented out if it is preceded by the symbol
#) or add it if it is missing, - Restart the systemd daemon (be aware that this will log you off) with this command:
sudo systemctl restart systemd-logind
or, from 15.04 onwards:
sudo service systemd-logind restart
Leave A Comment?