Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I run Powertop, and look at the Tunables screen, about twenty things are listed as Bad. I can toggle these to Good by pressing enter, and when I do so, projected battery lifetime doubles.

How can I make these changes persist? (I'm on Fedora 18, by the way, with Powertop 2.2)

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Powertop is not a permanent tool, as you know, so you will have to setup your system to run the commands through sysctl, udev, systemd units, scripts, whatever...

In order to see what commands are used by powertop you will have to run powertop --html BEFORE MAKING ANY CHANGES, that is, BEFORE toggling the settings from Bad to Good. If you already tuned for maximum battery life, undo your changes and run powertop --html again.

This is what the output should look like:

enter image description here

share|improve this answer
1  
AH! The part in all caps is exactly what I was missing. –  mattdm Feb 24 '13 at 16:44
    
Excitingly, some of the advice appears to be backwards. For example, it says iw dev wlan0 set power_save off, but turning it on is what changes the setting to "Good". –  mattdm Feb 24 '13 at 16:45

Look into /etc/rc.local. powertop suggests some commands to run , so insert them there.

share|improve this answer
1  
I have no /etc/rc.conf. Also, powertop doesn't seem to be suggesting any commands to run. (I think it did that in an older version.) –  mattdm Feb 24 '13 at 15:07
    
Create it if it isn't there. Use powertop --html and open the resulting file, going to the section called 'Software Settings in need of Tuning' –  schaiba Feb 24 '13 at 15:12
    
If I create that file, I'm quite sure it will do nothing on my system. And the html output has no section by that name. There is Optimal Tuned Software Settings, but that just lists items like "Enable SATA link power Managmenet for host0", with no commands. –  mattdm Feb 24 '13 at 15:19
    
My bad, that was meant to be rc.local. Fedora has , IIRC, a systemd unit file that will run that. –  schaiba Feb 24 '13 at 15:23
1  
I'm not on Fedora, I'm on Arch, and not only I have that section, but I do have the suggested commands. Perhaps anyone using Fedora could help further. –  schaiba Feb 24 '13 at 15:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.