How to Change the Lid Close Action in Ubuntu Laptop
How to Change the Lid Close Action in Ubuntu Laptop
Edit the systemd-logind config file:
~$ grep Lid /etc/systemd/logind.conf |
HandleLidSwitchDocked=ignore – If your system is inserted in a docking station, or if more than one display is connected, then the action occurs if specified.
HandleLidSwitchExternalPower=suspend – If your system is on external power, the action occurs if specified.
HandleLidSwitch=suspend – For all other cases, the value of HandleLidSwitch will occur if enabled.
ignore – do nothing.
poweroff – shutdown machine.
reboot – restart the system.
lock – screen lock all running sessions.
Remove '#' at the beginning to enable the line, and change the value!
After changes, save the file and restart the logind service by running command in terminal:
~$ systemctl restart systemd-logind.service |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.