When closing the lid of my laptop nothing happens instead of suspend)

5,042

These instructions follows this tips page:

Enable automatic shutdown, hibernate, or do nothing when laptop lid is closed.

  1. Edit the logind.conf file

    sudo gedit /etc/systemd/logind.conf
    
  2. Uncomment the following line (delete the # character):

    #HandleLidSwitch=suspend
    

    to

    HandleLidSwitch=suspend 
    
  3. Save the file and finally restart the systemd service:

    sudo systemctl restart systemd-logind.service
    
Share:
5,042

Related videos on Youtube

oliver
Author by

oliver

Updated on September 18, 2022

Comments

  • oliver
    oliver over 1 year

    I have Ubuntu 18.04 installed on my Lenovo Thinkpad L560. When I close the lid nothing happens. I want the system to suspend. The settings for this are turned on. So when I close my lid and reopen it nothing has happened. I'm not logged out or anything.

    Can you help me?

    • abu_bua
      abu_bua over 5 years
      Try to check gsettings -> askubuntu.com/a/1059712/790920
    • oliver
      oliver over 5 years
      I found the solution myself. I followed these steps: tipsonubuntu.com/2018/04/28/… but I was stupied i tried to edit the file before but I didn't see the "#" for the line to be a comment. After removing the "'#" it works!
  • Chaim Eliyah
    Chaim Eliyah about 5 years
    Not working on Lenovo T430, sadly
  • pepa.dvorak
    pepa.dvorak almost 4 years
    This works perfect, but unfortunately it does not make distinction between battery/ac-in situation - is there any chance making it suspend when running on battery and doing nothing when ac is plugged in?