Ubuntu Server – Prevent standby when closing the laptop

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


But the problem can be easily solved. We edit the following file:


Here we now set the following values. To do this, we remove the “#” at the beginning and set the value to “ignore”, or no:


Then we restart the system. Now the system continues to run when it is closed.

Leave a Reply

Your email address will not be published. Required fields are marked *