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
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:
Then save the file and reboot.
Note: This is the most common solution and if it doesn't work we can explore other options.