Do not hibernate/sleep when laptop lid is closed

Whenever I close the lid of my laptop and reopen it, the screen remains black. It seems that this is due to my new laptop.
I wasn't able to find an option which lets the laptop turned on (screen off though) while the lid is closed. Does anyone know how to fix this issue?
2021-10-19_14-41

sudo nano /etc/systemd/logind.conf

Find line:

#HandleLidSwitch=suspend

Remove the hashtag and change it to:

HandleLidSwitch=ignore

sudo nano /etc/UPower/UPower.conf

IgnoreLid=true
3 Likes

Thank you very much, this solved my problem!
But now when I close and re-open the lid, Zorin will automatically enable fight mode. Also for this case, I looked in settings but was unable to find this.

Ummm... Airplane mode?

nmcli r wifi on

nmcli r wifi on

It will enable wifi indeed, but I want to disable that Zorin automatically turns on airplane mode. I would understand if airplane mode gets enabled when the lid is closed. But airplane mode should get disabled again when the lid is re-opened. Currently, airplane mode gets enabled when I re-open the lid

I agree... it is a Gnome thing that is often asked about. The only method I can think of would be to place that command into an Autostart bash script.

1 Like

alright. It's not that bad for my use cases but thank you anyways!

2 Likes

It's very easy.
Save the command on file with text editor.
Make the file executable.
Open the autostart creation application and in Command, list the path to that file.
Done.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.