Skip to main content
added 122 characters in body
Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336

Install GNOME Tweak Tool and go to the Power section. There's an option to disable the automatic suspend on lid close.


 

Option details

The setting doesI compared not appear in dconfdconf before and after to find the option, but it turns out that's not how it's implemented. Instead, itTweak Tool creates ~/.config/autostart/ignore-lid-switch-tweak.desktop. The autostart is a script which effectively runs systemd-inhibit --what=handle-lid-switch.

So this So we can see the lid close action is now handled purely by systemd-logind. An

Alternative route

An alternative answer would be to edit /etc/systemd/logind.conf to include:

HandleLidSwitch=ignore

It's slightly different, in that itThis would affectwork all users on the systemtime, not just when your user is logged in.

Install GNOME Tweak Tool and go to the Power section. There's an option to disable the automatic suspend on lid close.


 

The setting does not appear in dconf. Instead, it creates ~/.config/autostart/ignore-lid-switch-tweak.desktop. The autostart is a script which effectively runs systemd-inhibit --what=handle-lid-switch.

So this is now handled purely by systemd-logind. An alternative answer would be to edit /etc/systemd/logind.conf to include:

HandleLidSwitch=ignore

It's slightly different, in that it would affect all users on the system.

Install GNOME Tweak Tool and go to the Power section. There's an option to disable the automatic suspend on lid close.

Option details

I compared dconf before and after to find the option, but it turns out that's not how it's implemented. Instead, Tweak Tool creates ~/.config/autostart/ignore-lid-switch-tweak.desktop. The autostart is a script which effectively runs systemd-inhibit --what=handle-lid-switch. So we can see the lid close action is handled purely by systemd-logind.

Alternative route

An alternative would be to edit /etc/systemd/logind.conf to include:

HandleLidSwitch=ignore

This would work all the time, not just when your user is logged in.

Source Link
sourcejedi
  • 53.5k
  • 23
  • 178
  • 336

Install GNOME Tweak Tool and go to the Power section. There's an option to disable the automatic suspend on lid close.


The setting does not appear in dconf. Instead, it creates ~/.config/autostart/ignore-lid-switch-tweak.desktop. The autostart is a script which effectively runs systemd-inhibit --what=handle-lid-switch.

So this is now handled purely by systemd-logind. An alternative answer would be to edit /etc/systemd/logind.conf to include:

HandleLidSwitch=ignore

It's slightly different, in that it would affect all users on the system.