How to disable sleep and configure lid power settings for Ubuntu

 


Enable sleep:

  1. Open a Terminal .
  2. 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
  5. Save the file and restart the service to apply the changes by typing # systemctl restart systemd-logind
Posting Komentar (0)
Lebih baru Lebih lama