I've installed Ubuntu 16.04 on two different laptops:

  • Lenovo Thinkpad T460s
  • HP Probook 6470b

My configuration is similar across both laptops. I have i3 WM installed, with lightdm (the default on 16.04).

In Unity, when closing the lid, lock+suspend works fine on both laptops.

In i3 WM, the behavior changes between both laptops:

  • On the T460s, when I close the lid, the laptop locks + suspends. The lock screen is the gnome-screensaver e.g. gnome-screensaver-command -l.

  • On the Probook, when I close the lid, the laptop only suspends. It doesn't lock.

Where is the "lock + suspend on lid close" behavior defined?

Extra information:

I spent some time trying to find where this behavior was defined. False leads include:

  • /proc/acpi/lid.sh
  • "HandleLidSwitch" in /etc/systemd/logind.conf

Most strangely, I installed ZSH today on the Probook (usually a Bash guy, wanted to give it a shot) and it started lock + suspend on lid close, with the same gnome-screensaver-command -l behavior as the T460s.

I uninstalled and re-installed ZSH and it disappeared, now it just suspends without locking.

Your Answer

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

Browse other questions tagged or ask your own question.