Ubuntu Server (22.04) on a laptop, how to prevent standby when closing the display?
I installed Ubuntu Server on an old netbook. It runs quite well, but the thing went into standby mode as soon as the netbook was closed. After that, of course, no more network connections worked. Bad for a server, of course.
Video tutorial
Instructions
But the problem can be easily solved. We edit the following file:
/etc/systemd/logind.conf
Here we now set the following values. To do this, we remove the “#” at the beginning and set the value to “ignore”, or no:
HandleLidSwitch=ignore HandleListSwitchExternalPower=ignore HandleLidSwitchDocked=ignore LidSwitchIgnoreInhibited=no
Then we restart the system. Now the system continues to run when it is closed.