I run powertop then it suggests that I should disable xy, etc. However, after I exit powertop, reboot the pc, and start it again[powertop], it brings up the same tips again! So how can I permanently save the suggestions of powertop?
-
Hi Lance - this was a duplicate of another question so I've refunded your bounty and linked question to the other. If you need more information you can put your bounty back on the other question. – Oli Dec 18 '11 at 11:22
-
1@Oli Can we please reopen this question? Due to edits to the linked question, this question is not a duplicate anymore. Especially not an exact duplicate. I'm facing this problem as well and need to find a solution soon. – May 11 '12 at 12:21
-
Can someone please re-link the duplicate or comment on it here so that others can find it? – mfisch Oct 24 '12 at 08:55
-
The duplicate linked is this. - http://askubuntu.com/questions/50242/why-does-echoing-these-parameters-with-sudo-not-work – jrg Nov 03 '12 at 01:55
-
Can you tell us what exactly the "stuff" it want's you to do is, so we can see any problems. For example, a specific command, or set of commands it want's run. How your running it, etc. Can we perhaps look at just one change it want you to make. It's very hard to tell why it's randomly not working without more data. – coteyr Nov 06 '12 at 16:45
3 Answers
Quick answer :
You just need to save them in /etc/rc.local
.
Detailed answer
In a terminal run:
sudo powertop --html=powertop.html
Step 1 generates a html file in your home directory. Click on that file so that it opens in your internet browser.
In the browser, go to "Tuning" tab. It gives all the tunings you have to tweak (on the left), and the commands that are implementing them (on the right).
Save these commands in
/etc/rc.local
.To do that, in a terminal, run:
gksu gedit /etc/rc.local
Write the commands before the line that reads
exit 0
, and save the file.

- 54,385

- 51
- 1
- 3
Saving to rc.local as stagelll mentions is probably the simplest way to do it, but it's obviously only good for a local fix.
Another way would be to craft a udev rule that applies the setting for the device in question. udev rules are more complicated to write but are safer to share with others.
For example, powertop suggested this:
echo 'on' > '/sys/bus/usb/devices/3-10/power/control';
which solved the particular issue I was interested in. But 3-10
is a bus number that's going to vary from system to system, depending on how the usb devices are attached. After a bit of research and fiddling, I made a file /etc/udev/rules.d/10-usb-avocent-kvm-pm.rules
with this rule, which sets power/control to on for my devices, wherever it might be connected in the USB subsystem:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0624", ATTR{idProduct}=="0013", ATTR{product}=="SC Secure KVM", TEST=="power/control", ATTR{power/control}:="on"

- 54,385

- 4,710
-
On ArchWiki, I read
ATTR{power/control}="on"
without the colon before the equal sign. Perhaps you should correct? – Serge Stroobandt Jan 03 '15 at 19:56 -
No. According to the man usbdev page, using = sets a value, and using := sets a value such that it cannot be unset. Either is probably suitable here. – Mei Mar 07 '17 at 22:17
This doesn't exactly save your powertop settings, but it does come with its own defaults which enable almost every powertop setting. It's called laptop-mode-tools.
Just run sudo apt-get install laptop-mode-tools
and run powertop
, see if you like it. This also enables you to edit the settings, which in turn, edit the powertop settings.
You can edit the settings by running sudo gedit /etc/laptop-mode/laptop-mode.conf
Maybe someone else knows how to save the settings "specifically" from powertop.
Here is a link for more information http://samwel.tk/laptop_mode/

- 54,385

- 208
-
laptop-mode-tools was replaced by pm-utils-powersave-policy in 2010, and may have since been replaced by something else. I don't think it's useful in current ubuntu releases. – ImaginaryRobots Nov 07 '12 at 17:18
-
hmmm very interesting. I use Ubuntu 12.10 and I con confirm laptop-mode-tools works just great and actually does function/shutdown things such as usb ports for a specific period of inactivity. However I will checkout this pm-utils. – Leealis Nov 08 '12 at 21:13
-
does installing laptop-mode-utils still cause other things to get uninstalled? It's possible that it got un-replaced or something... – ImaginaryRobots Nov 08 '12 at 21:59