Score:1

When laptop lid is closed, the desktop switches to external monitor (Ubuntu 20.04 Gnome)

kr flag

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)?

ChanganAuto avatar
us flag
Do you want it to suspend with the lid closed or something else? Did you check the settings already?
kr flag
Ah sorry if I wasn't too clear - I want the laptop to suspend; not switch the display over to the external monitor. And yes, I checked all relevant settings.
ChanganAuto avatar
us flag
I suggest installing Tweaks (gnome-tweaks) and confirm the relevant setting is enabled.
kr flag
I have gnome tweaks and "Suspend when laptop lid is closed" is enabled.
ChanganAuto avatar
us flag
Does it work as expected (suspend) if the external monitor *isn't* connected?
kr flag
Yes. It does. (Look at the question - I updated it a few minutes ago)
Score:3
fr flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.