Disable suspend mode when closing the lid
As I am running Ubuntu 20.04 on my old laptop, I want to disable the suspend mode when I close the lid. Here is how I did it:
Open the file
/etc/systemd/logind.confwith your favorite text editor. I usevim:sudo vim /etc/systemd/logind.confFind the line
#HandleLidSwitch=suspendwhich is default behavior. Uncomment it and change it toHandleLidSwitch=ignore.
tip
There are other options you can set:
- suspend: The system will suspend
- hibernate: The system will hibernate
- poweroff: The system will power off
- lock: The system will lock the screen
- ignore: The system will do nothing