Page 1 of 1

Keep linux system awake and running

Posted: Thu May 31, 2018 4:22 am
by rouhi
Hi,

I have a linuxmint 17.2 installed on my HP PC.

I have edited

Code: Select all

/etc/default/grub
and replaced

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
with

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT=“text”
so that the linux starts in

Code: Select all

tty
.
I am going to use the PC as an SSH server that I will connect to it using my laptop to run some commands and get results. Therefore I have disconnected the monitor and only connected the LAN cable to the PC.

Things work very well after the computer boots. I can connect to the computer through SSH properly. But after about 10 minutes the computer goes to sleep, standby or .... . That I cannot connect to it anymore through SSH.

I want to see how can I force the system to keep alive 24/7?

Re: Keep linux system awake and running

Posted: Thu May 31, 2018 6:50 am
by acerimusdux
Well if you are running a default installation, it probaly is still running the whole X windows system, display manager, window system, etc., and is configured by default to sleep after a certain time to protect the screen (which is no longer attached).

Next time you log in, try this:
sudo service lightdm stop

And if you want to regularly run headless, set it so lightdm doesn't start in the first place:
sudo systemctl disable lightdm.service

Re: Keep linux system awake and running

Posted: Thu May 31, 2018 7:02 am
by acerimusdux
Also usefull, the wakeonlan program, if you want to be able to wake your computer over the lan when it is asleep:

https://community.linuxmint.com/tutorial/view/1062