1

Ever since I upgraded to 19.10, when I close the lid the laptop doesn't suspend anymore. It doesn't even lock the screen. It almost seems like the OS isn't picking up the close lid event. If I press the power button suspend works fine and resumes when I open the lid afterwards.

I have the 'suspend when lid is closed' option enabled in GNOME Tweaks.

Any idea on how to fix/debug this issue? I have a Dell XPS 15 9560.

pomsky
  • 70,557

2 Answers2

0

First, make sure that pm-utils is installed.
sudo apt install pm-utils.
Then,edit the logind.conf file. You should always back up a critical file before changing it.
sudo cp /etc/systemd/logind.conf /etc/systemd/logind.conf.back.
Now, edit the file.
sudo gedit /etc/systemd/logind.conf
You'll see some lines like this.

#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288

What you have to do is to remove the # from some of the lines and change it’s value to

HandleSuspendKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend

Now, restart your system and see if your laptop goes into suspend.

0

With root priviledges, open /etc/systemd/logind.conf with a text editor:

sudo nano /etc/systemd/logind.conf 

Add this line to the file:

HandleLidSwitch=suspend

Save the changes and check if the desired behaviour is observed after reboot.

Quasímodo
  • 2,104