Prevent Raspberry Pi 4 for going to sleep/shutdown (Ubuntu Server 18.04)

2k views Asked by At

I have this issue: I installed Ubuntu Server 18.04 to my Raspberry Pi 4 and it is connected through the ethernet port. If I exit the ssh session, some minutes later the RPI4 is unaccessible with ssh, and the leds of the ethernet port are turned off, just the red led indicating that is connected to the power supply.

I have not installed any Desktop GUI, just a fresh installation of Ubuntu Server.

Thanks in advance.

1

There are 1 answers

0
Chris On

I had a similar issue, I found this - it has changed something, just waiting to see if it fixes it now

https://www.unixtutorial.org/disable-sleep-on-ubuntu-server/

tl;dr - run this:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target