How to stop laptop from going to sleep when lid closed (18.04 LTS Mate)

Bo Berglund bo.berglund at gmail.com
Sun Apr 19 06:31:39 UTC 2020


I have spent the last week recommissioning my old HP Elitebook 8440w
laptop as a development box and I have pretty much succeeded in
getting it done concerning the GUI and the dev tools I need as well as
setting up VNC so it works also when the main system sits at the logon
screen (which was a hassle all by itself).

I have used Ubuntu 18.04 LTS and the Mate desktop.

The end use case will be that the laptop shall be running headless (no
monitor/keyboard attached) and accessed only via PuTTY SSH and VNC
from my main Windows 10 PC. It must be on 24/7.
When done I will stuff it away in a cupboard where it will be running
accessed only via the network.

I already have a mini-tower Ubuntu 18.04 LTS Server machine used as
Subversion server in a headless configuration. This is on 24/7 and has
never been an issue. It just runs...
So I thought this would be an easy setup, but I was mistaken.

The Ubuntu install on the laptop seems not to be able to run in a
headless mode 24/7 unless the lid is open. It simply won't stop going
into suspend after some time (don't know how long before it suspends,
but it is not doing it immediately).
>From there it is *unable* to wake up and resume.

I have set all of the power saving features I have found to "off" or
"never" and it looked yesterday like it actually worked, but now when
I woke up this morning the laptop was again dead and when I opened the
lid the power button indicator was slowly fading up and down in
brightness.

So I momentarily pushed the power button, whereupon the screen came on
showing the logon dialog. But it is totally unresponsive.
The mouse pointer sits locked to the center of screen and the system
is not networking so it cannot be reached by SSH or VNC.

What can be done to totally block *all* use of the automatic suspend?

And what can be done to make it resume if it has suspended anyway?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list