Poweroff after login when lid is closed

Hi everyone,

I'm using a second monitor while my laptop lid is closed. When the login screen appears at system startup, I enter my password and press Enter, but instead of logging in, the system shuts down.
This only happens when the lid is closed. If I open the lid, the system logs in normally.

Has anyone experienced this issue or know a fix?

Thanks in advance!


OS: Zorin OS 17.3 x86_64
Host: 82Y9 Legion Slim 5 16APH8
DE: GNOME 43.9
WM: Mutter
GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 28e0

You might need to look into dconf-editor (would need to be installed separately) and edit some power settings that relate to lid closing actions while (presumably) on AC. I can't recall the exact location (and I can't check right now) but it should be somewhere along the following lines:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor 'nothing'
That is a command you could enter in the terminal that SHOULD change the behaviour of the laptop with an external monitor plugged in to do 'nothing'. But I can't verify immediately if that location is the same now as it used to be.

In dconf-editor, you can use the same but using a gui to find that location that's referenced in the command, and change settings from there.

EDIT: I'm doing a quick search and it's seeming that this may or may not work anymore in newer versions of gnome. I would like to extend my heartfelt gratitude to the Gnome developers once again for their continued success in changing everything all the time for definitely very good reasons.

3 Likes

You can try this guide:

Save the original file before editing it as backup.

Welcome to the Forum!

Does Your System run in Wayland or X11/Xorg?

What an excellent suggestion @applecheeks37 , you found where the hidden setting lie. This feature has caused me so much grief for years! Finally a resolution to the issue!

In order to make this change, I had to click on these two, turn off the toggle, then select from the drop-down boxes, BLANK. Then all I had to do, was click on APPLY after.

For those who use laptops as desktops like me, we are eternally grateful. :blush:


3 Likes

Thank you all for your help and suggestions! The blank value works wonderfully.
My system runs in Wayland.

4 Likes

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