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?
3 Answers
Quick answer :
You just need to save them in /etc/rc.local.
Detailed answer
In a terminal run:
sudo powertop --html=powertop.htmlStep 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.localWrite the commands before the line that reads
exit 0, and save the file.
- 55,453
- 51
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"
- 55,453
- 4,740
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/
- 55,453
- 208