how do I disable suspend when my laptop is plugged in and closed?

[I want my laptop to only go into suspend mode when it’s un-plugged, not when it is plugged in and the lid is closed. How can I disable that?]

Since fedora choosu to use gnome 3.x, the dconf-editor doesn’t work. This is because systemd override Gnome’s ACPI Settings. A non-elegant solution is to edit /etc/systemd/logind.conf:

su -c ‘vi /etc/systemd/logind.conf’
and set HandleLidSwitch to ignore:

HandleLidSwitch=ignore
and then restart systemd

su -c ‘systemctl restart systemd-logind.service’
Hope that help

One thought on “how do I disable suspend when my laptop is plugged in and closed?”

Leave a Reply