Change go to sleep setting to user customizable

Is there a way set my computer to go to sleep in an interval other than what Power Management offers?

I want it to sleep after 5 minutes of inactivity?

There is no pick for that in Power Management. This is for Ubuntu Mate 20.04.

Thanks.
power

Hi, @fixit7 (Andy) :slight_smile:

You've asked:

After several different Web searches, I've found the following Question and Answer in "Ask Ubuntu":

That question has been answered by N0rbert (who is @Norbert_X here in the "Ubuntu MATE Community"), on 7th December 2021, as follows:

https://askubuntu.com/a/1379706/52725

"You can set these options using commandline

gsettings set org.mate.power-manager sleep-computer-ac 1800
gsettings set org.mate.power-manager sleep-display-ac 1200

gsettings set org.mate.power-manager sleep-computer-battery 180
gsettings set org.mate.power-manager sleep-display-battery 120

where numbers are seconds."

So, I'm guessing that if you want to "Put computer to sleep when inactive for" 5 minutes, "On AC Power", you should enter the following command, given that 5 minutes is 300 seconds:

gsettings set org.mate.power-manager sleep-computer-ac 300

I hope that helps :slight_smile:

2 Likes

Thank you very much ricmarques.

2 Likes

I used this, but computer did not go to sleep.

gsettings set org.mate.power-manager sleep-computer-ac 300
gsettings set org.mate.power-manager sleep-display-ac 300

Does it require a reboot?

Because of frequent neck and back pain, I have some memory problems.

My computer does go to sleep after 5 minutes.

1 Like

Hi, Andy.

I see that you've added the last two lines of your last reply as a later edit:

" Because of frequent neck and back pain, I have some memory problems.
My computer does go to sleep after 5 minutes."

I'm sorry that you're having those health issues :frowning_face: I hope that you're receiving the medical care for those problems and that you get well soon!

1 Like

Thanks for your concern.

After 30+ years, doctors can not find the cause or a treatment that works.

2 Likes