Preventing Ubuntu20.04 from sleeping.

Arbeiter

New Member
Credits
61
Hello,

Just got my top of the line Dell desktop machine with Ubuntu20.04. Everything is OK, except when I submit a job and leave, the computer goes to sleep after maybe 10 minutes. Things that I have tried from various web-pages..

1- ) I added a new line in the file /etc/ssh/sshd_config
ClientAliveInterval 60 (then I sync && reboot).

2-)
  • sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
3-) also, I tried to get the approach using "tweaks". but could not do it.

None of the above worked for me. There is also a solution that involves using dconf_editor,, but I did not try it. Sort of scared using that editor.

I need to submit jobs that normally take a week to run. Not sure how to get around this bug.

Can anybody help.
 


Condobloke

Well-Known Member
Credits
16,153
G'day Arbeiter, Welocme to Linux.org

Look in 'Power Settings'

I dont use Ubuntu, but if you were to click on menu and type in power settings ....it should take you to an area where you can click to stop the pc from going to sleep after a certain time period.
 

Arbeiter

New Member
Credits
61
Hi,
Thanks for your help, I cannot find any "power setting". When it sleeps, there is power, it is just that it is not doing anything. I move the mouse, hit Enter, or different keys ,, nothing. Then I have to switch off and then back on.

Last night, I got it to run over night but, I left a weight on the "control key". I think I tricked him. Must be a solution. thanks.
 

Condobloke

Well-Known Member
Credits
16,153
There is a "software Centre" on Ubuntu
Access it and type in Caffeine Install it....let us know how you get on.
 

Condobloke

Well-Known Member
Credits
16,153
Forget Caffeine for the moment......

See Below First.




6. Control automatic suspend and screenlock for laptops
If you are using Ubuntu 20.04 on a laptop then you may want to pay attention to a few power and screenlock settings.

If your laptop is on battery mode, Ubuntu will suspend the system after 20 minutes of inactivity. This is done to save battery power. Personally, I don’t like it and thus I disable it.

Similarly, if you leave your system for a few minutes, it automatically locks the screen. I don’t like this behavior as well so I prefer disabling it.

Power Settings Ubuntu 20 04
Power Settings in Ubuntu 20.04
 

Condobloke

Well-Known Member
Credits
16,153

Arbeiter

New Member
Credits
61
Hi,

Thanks for the reply.
Just installed the caffeine, and I deactivated it. The coffee cup is brewing, so, maybe this did the trick.
I am just going to sit here and see if it keeps running.

Thank again.
 

Arbeiter

New Member
Credits
61
Forget Caffeine for the moment......

See Below First.




6. Control automatic suspend and screenlock for laptops
If you are using Ubuntu 20.04 on a laptop then you may want to pay attention to a few power and screenlock settings.

If your laptop is on battery mode, Ubuntu will suspend the system after 20 minutes of inactivity. This is done to save battery power. Personally, I don’t like it and thus I disable it.

Similarly, if you leave your system for a few minutes, it automatically locks the screen. I don’t like this behavior as well so I prefer disabling it.

Power Settings Ubuntu 20 04
Power Settings in Ubuntu 20.04
Mine is a desktop.
 

Condobloke

Well-Known Member
Credits
16,153
If Caffeine doesnt brew properly......the alteration of settings in post number 5 will do a better job.

Just saw you post re desktop not laptop......makes no difference........the settings will still be there on that distro...Ubuntu 20.04
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
28,645

Condobloke

Well-Known Member
Credits
16,153
The link from @KGIII will definitely work.
 
D

Deleted member 101831

Guest
Lower left hand corner 9 dots left click them.
A window opens look for a round icon that says Settings left click it.
A window opens with a menu look for Power and left click it.
The rest should be self explanatory.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top