Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 800
Francisco Aguirre Avatar asked Nov 14 '25 22:11

Francisco Aguirre


1 Answers

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
like image 61
Chris Avatar answered Nov 17 '25 21:11

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!