10

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?

5
  • 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, 2011 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.
    – user24668
    May 11, 2012 at 12:21
  • Can someone please re-link the duplicate or comment on it here so that others can find it?
    – mfisch
    Oct 24, 2012 at 8:55
  • The duplicate linked is this. - askubuntu.com/questions/50242/…
    – jrg
    Nov 3, 2012 at 1: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 6, 2012 at 16:45

3 Answers 3

5

Quick answer :

You just need to save them in /etc/rc.local.


Detailed answer

  1. In a terminal run:

    sudo powertop --html=powertop.html
    
  2. Step 1 generates a html file in your home directory. Click on that file so that it opens in your internet browser.

  3. 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).

  4. 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.

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"
2
  • On ArchWiki, I read ATTR{power/control}="on" without the colon before the equal sign. Perhaps you should correct? Jan 3, 2015 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 7, 2017 at 22:17
0

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/

3
  • 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. Nov 7, 2012 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 8, 2012 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... Nov 8, 2012 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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