Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Powertop forgets its settings when shut down

Post Reply
Message
Author
waldmattis
Forum Novice
Forum  Novice
Posts: 70
Joined: Sat May 28, 2016 6:17 pm

Powertop forgets its settings when shut down

#1 Post by waldmattis » Wed Mar 14, 2018 4:13 pm

Hi all.
I use Powertop very often. It is great.
Regrettably it forgets the settings I have made when I shut down the system.

So every time after rebooting MX-17, 64bit, I have to change the entries manually from "bad" to "good".

Is there a way, that Powertop learns to remember my settings?

Regards
Karl

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22599
Joined: Wed Jul 19, 2006 6:13 am

Re: Powertop forgets its settings when shut down

#2 Post by Jerry3904 » Wed Mar 14, 2018 4:32 pm

I never even heard of it, but luckily Ms. Google has. I see that a web search on "powertop save settings" shows a number of solutions that look like that they might be of help.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
c4os
Forum Novice
Forum  Novice
Posts: 64
Joined: Tue Jun 19, 2018 12:28 pm

Re: Powertop forgets its settings when shut down

#3 Post by c4os » Sat Sep 08, 2018 1:40 pm

Powertop settings are temporarly.

If you want to keep the settings you need to add it's at the /etc/rc.local script.

Fast way is:

Code: Select all

powertop --auto-tune

exit 0
But you could have problems on devices with optimized power.
Here is the script generator script to generate you a script where you can disable each device separately.

Script name is powertop-auto-gen.sh with the content below:

Code: Select all

#! /bin/bash
# powertop shell script generator

sudo powertop -r /tmp/powertop.html
sudo echo "#!/bin/bash" > /tmp/powertop-script.sh
sudo echo "# Powertop start script" >> /tmp/powertop-script.sh
sudo echo "" >> /tmp/powertop-script.sh
sudo sed 's/.*\(echo.*\);.*/\1/g' /tmp/powertop.html | grep echo >> /tmp/powertop-script.sh
sudo echo "" >> /tmp/powertop-script.sh
sudo echo "exit 0" >> /tmp/powertop-script.sh
sudo echo "" >> /tmp/powertop-script.sh
echo "/tmp/powertop-script.sh created"

exit 0

After you ran the script, you will get a script at /tmp/powertop-script.sh.
To be sure you're optimize the correct devices, you can uncomment each line seperatly.
Powertop itself could be helpful to identify the devices and the command at the script.

The script can be added to the /etc/rc.local instead of powertop --auto-tune.
Copy it's to a folder of your choice and add it's to the rc.local:

Code: Select all

# Powertop
#powertop --auto-tune
/home/c4os/bin/powersave-script.sh

exit 0

Powered on: MX 17 Horizon x86_64
Hardware: Dell Latitude E4300 - CPU: Intel Core 2 Duo P9600 (2) @ 2.535GHz - Memory: 4GB
Style: Resolution: 1280x800 - WM Theme: Balou - Theme: Blackbird [GTK2/3] - Icons: Papirus-Dark [GTK2]

Post Reply

Return to “Software / Configuration”