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:

  1. Open the /etc/systemd/logind.conf file for editing.

  2. Find the line #HandleLidSwitch=suspend.

  3. Remove the # character at the beginning of the line.

  4. 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

  1. Save the file and restart the service to apply the changes by typing # systemctl restart systemd-logind.