power management from terminal?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
aussieJoe12
Level 1
Level 1
Posts: 8
Joined: Tue Mar 26, 2019 3:19 am

power management from terminal?

Post by aussieJoe12 » Sun Aug 18, 2019 7:51 pm

Hi,

As the title says, is it possible to set power management settings from the terminal? Specifically I want to set the screen to go blank after 5 minutes.

This setting is also available under power management, which I use, but it only works intermittently, once I set it, it works fine until I install updates of any kind, or even just opening the mint updater (from the system tray) causes the screen blanking to stop (monitor stays on all night until I open the power management app). So as a work around I'd like to run a cron job to apply the power management settings every day.

I've searched for fixes to the root cause but cant find anything relevant.

carum carvi
Level 5
Level 5
Posts: 946
Joined: Sun Apr 16, 2017 11:44 pm

Re: power management from terminal?

Post by carum carvi » Mon Aug 19, 2019 3:11 am

AussieJoe12, a probable cause of your failing suspend function for your screen could be an application that is continuously running in the background.

Another cause could be a mouse that it is slightly moving when you dont touch it. This will prevent the screen from going blank as well.

I have never heard of a bug by the Update Manager preventing the suspend function from working or the Update Manager resetting the power management settings. Are your updates being downloaded and installed correctly? No other problems on your computer?

What kind of LinuxMint OS are you using? Are you dual booting with Windows?

pbear
Level 7
Level 7
Posts: 1773
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: power management from terminal?

Post by pbear » Mon Aug 19, 2019 11:39 am

Yes, please report which version of Mint and which desktop.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

gm10
Level 18
Level 18
Posts: 8720
Joined: Thu Jun 21, 2018 5:11 pm

Re: power management from terminal?

Post by gm10 » Mon Aug 19, 2019 12:01 pm

carum carvi wrote:
Mon Aug 19, 2019 3:11 am
I have never heard of a bug by the Update Manager preventing the suspend function from working or the Update Manager resetting the power management settings.
For 19.2 I had changed it so that Update Manager prevents shutdown and reboot via systemd while automation tasks are running. But suspend remains possible and screen timeout is certainly unrelated.

At any time you can check for active hooks into the power states via this command, maybe that gives you some pointers:

Code: Select all

systemd-inhibit
But for screen timeout it can be something as simple as a dirty optical mouse that keeps "moving" on its own due to refraction preventing a proper read.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

Post Reply

Return to “Newbie Questions”