5

How can I disable suspending when the lid is closes?

I never suspend my laptop. When I close the lid and the system is running, I want the screen to be blanked, but the system should run as if the lid was open.

How can I achieve this in Sway?

tukusejssirs
  • 218
  • 1
  • 7
  • Did you check the power management options? This is usually where [this thing is managed](https://imgur.com/PcocRwH) (screenshot is for KDE...). – xenoid Jul 08 '20 at 12:41

1 Answers1

8

I'm not sure Sway handles that, so first try disabling system-wide lid actions by editing /etc/systemd/logind.conf and see if it works (you can also use lock instead of ignore):

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore

sudo systemctl kill -s HUP systemd-logind - will apply these changes.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64