User Tools

Site Tools


ubuntu_desktop:auto_power_off_when_laptop_lid_is_closed

Ubuntu Desktop - Auto power off when laptop lid is closed

There’s only “Suspend” and “Do nothing” options for laptop close actions.

To have Ubuntu shutdown when the laptop lid is closed, edit the logind.conf file:

sudo vi /etc/systemd/logind.conf

Uncomment the line #HandleLidSwitch=suspend and change it to HandleLidSwitch=poweroff.

You can also change the value to HandleLidSwitch=hibernate to hibernate Ubuntu when lid is closed.

Restart the machine or issue the following command to apply the change:

sudo systemctl restart systemd-logind.service
ubuntu_desktop/auto_power_off_when_laptop_lid_is_closed.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki