I installed Ubuntu 18.10 on my Thinkpad X1 Extreme. After I closed the lid, the machine is still working as I can see things on the external display. How can I put it to sleep/hibernation when I close the lid and have the machine wake up when I open the LCD lid? Thanks

1 Answer 1


When an HDMI monitor is plugged in, the system considers it "docked" as if it were plugged into a docking station. As such you need to use:

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

Change the line:


to read:


Then save the file and reboot.

Note: This is the most common solution and if it doesn't work we can explore other options.

  • Thanks. Do you mean when the HDMI monitor is plugged in the laptop, the system is in what is called "clamshell mode" in the Apple's world. i.e. the Thinkpad is still on while the lid is closed? If the Thinkpad is not connected to an external monitor while I am on the go, how do I put it to sleep/hibernation by chosing the lid and waking up the system automatically by opening the lid? Oct 22, 2018 at 23:36
  • 1
    When the lid is closed and an external monitor is displaying the desktop, you can still select suspend from desktop menu. Oct 22, 2018 at 23:38
  • If I use the laptop on the bus and want to put it to sleep and wake it up when I open the lid, should I uncomment the line HandleLidSwitch instead? Should I use suspend or hibernate? Oct 23, 2018 at 2:48
  • 1
    When the machine is not docked it will suspend regularly as per your power settings under the system settings menu. There you would select "Suspend" or "Hibernate" when lid is closed for battery and for plugged into AC. Oct 23, 2018 at 10:32
  • Thanks. When I left the machine unused for 20-30 minutes, the screen turned blank. Later on, pressing any key on the keyboard, mouse button or power button cannot wake the machine up. The led on the power button just pulsed slowly. I had to hard press the power button continuously to force the laptop to shut down and press the power button again to turn it on. Is this a bug of 18.10? In terms of "Suspend" and "Hibernate", which option is better? Oct 23, 2018 at 14:07

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.