Disable Powerlid
Enable sleep:
Open a Terminal . Run the following command: # systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
Configure lid power settings:
Open the /etc/systemd/logind.conf file for editing.
Find the line #HandleLidSwitch=suspend.
Remove the # character at the beginning of the line.
Change the line to either of the desired settings below:
HandleLidSwitch=poweroff to shutdown computer when lid is closed
HandleLidSwitch=hibernate to hibernate computer when lid is closed
HandleLidSwitch=suspend to suspend computer when lid is closed
HandleLidSwitch=ignore to do nothing to do nothing
- Save the file and restart the service to apply the changes by typing # systemctl restart systemd-logind.