0

I have a latest Ubuntu 20 LTS dekstop with cinnamon UI. If I turn on my PC but don't log in, my PC go to sleep after a while, getting unreachable via SSH. I can wake it up by pressing a button on the keyboard locally, but with wake-on-lan.

How I can prevent to go into sleep?

I googled it a lot and tried to set IdleAction=ignore in /etc/systemd/logind.conf file and few other things as below, but nothing helped. What else I can do to avoid going into sleep state? I want to reach that PC remotely as well so quite important. Thanks a lot in advance! I guess this is something related to Ubuntu's login screen as logind.conf helped me in case of an Ubuntu server.

$ sudo su
# su lightdm -s /bin/bash
# gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
Halacs
  • 121

1 Answers1

0

I did this : sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'

got it from Prevent sleep/suspend when not logged in to a specific account