Prevent suspend laptop

What would be the proper way to configure BalenaOS to preventing suspend when closing the lid of my laptop?

Basically I would like to configure this:

[Login]
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore

Source: https://wiki.debian.org/Suspend#Disable_suspend_and_hibernation

I’m using the generic x86/x64 image.

hey there,

We have an example container doing this via dbus. Take a look here
There is one drawback to this approach though. If the container exits when the lid is closed, the laptop will go into hibernation. So make sure it is open when doing updates or shutting it down from the dashboard.

Hope this helps.

1 Like