5

Instead, I want my laptop to suspend when the lid is closed (this is the behaviour currently if no external displays are connected)

The exact same question has been asked here - 16.04 - When laptop lid is closed, the desktop switches to external monitor

I followed the steps in the answer - https://askubuntu.com/a/790136/785975 but that didn't work (maybe because of the updated Ubuntu version?)

Is there a fix for this in Ubuntu 20.04 for the default Gnome DE (I haven't tried with other DEs)?

Pratyush Das
  • 165
  • 1
  • 8

1 Answers1

4

It took me cca 2 hours to find the answer, which is not that bad for Ubuntu questions. Check out this post, it worked for me (Part III). https://apiraino.github.io/ubuntu-gnome-power/

The essential part is (after everything you have already done) to add the following line to /etc/systemd/logind.conf:

LidSwitchIgnoreInhibited=no

Then reboot and after that paradoxically modify the line in /etc/UPower/UPower.conf as follows:

IgnoreLid=true