1

I'm trying to get my laptop to go to sleep when I shut the lid. Right now, it locks the screen on lid close, and sleeps once the password is entered. The current full sequence of events is:

  1. Shut the lid of the laptop
  2. Observe from the external power light that it does not sleep
  3. Open the lid, observe the lock screen is displayed
  4. Enter the password to unlock
  5. The machine instantly sleeps, and will stay asleep
  6. Wake the machine with the keyboard or power button
  7. The screen wakes, the "unlock" animation happens (without a password), and I'm at the unlocked desktop environment

I've toggled various "lid closed action" settings in Gnome and gnome-tweak tool. I can make the laptop ignore the lid closing entirely, but can't get it to sleep on lid closed (other than this sequence).

This happened on 18.04; I upgraded to 19.04 today and it still occurs. I very well could have altered a configuration that is causing this, but I don't know where else to investigate.

Thinkpad Carbon X1 3rd Gen.

0

Set systemd logind.conf settings

Invoke the Terminal by pressing Ctrl+Alt+T. Edit the systemd logind.conf file by typing:

sudo -H gedit /etc/systemd/logind.conf

Look for these two lines and change them to look like this:

HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend

You might have to change ignore or lock to read suspend. You might have to remove a leading #.

Save the file and quit gedit. After ensuring no applications (like word processor, spreadsheet, etc.) have files open type into the terminal:

sudo reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.