Tutorial To Configure Lid Close Behavior Of Your Laptop In Ubuntu 20.04 LTS
When laptop lid is closed in Ubuntu 20.04, it suspends Ubuntu by default. In this tutorial, we are going to configure this default lid close behavior in Ubuntu 20.04 LTS.
We are going to tweak the logind.conf file to change the action of lid in Ubuntu.
Configure Lid Close Behavior Of Your Laptop With Ubuntu 20.04 LTS
Configure Lid Close Behavior Of Your Laptop With Ubuntu 20.04 LTS
sudo gedit /etc/systemd/logind.conf
Now, you need to search the line #HandleLidSwitch=suspend and then you can change the behavior of the lid:
- HandleLidSwitch=lock – Your Ubuntu will get locked when lid closed.
- HandleLidSwitch=ignore – It won’t do anything.
- HandleLidSwitch=poweroff – It will shut down your system when lid is closed
- HandleLidSwitch=hibernate – It will hibernate Ubuntu 20.04 LTS
Remember to remove the ‘#’. You can save the changes that you have made.
Restart your session with the following command:
systemctl restart systemd-logind.service