Setup "powertop --auto-tune" at startup

5 respostas [Última entrada]
404
404
Desconectado
Joined: 04/09/2015

I have Trisquel 7 running on a Lenovo x60 with Libreboot.

Every time i notice some buzz/noises coming from the motherboard.

I was able to avoid this noise following this:
http://www.libreboot.org/docs/misc/index.html#trisquel7_powertop

so every time i log into the system i have to run this command:

****@ThinkPad-X60:~$ sudo powertop --auto-tune
[sudo] password for ****:

and i got this output:

Loaded 0 prior measurements
Cannot load from file /var/cache/powertop/saved_parameters.powertop
RAPL device for cpu 0
RAPL device for cpu 0
RAPL device for cpu 0
Cannot load from file /var/cache/powertop/saved_parameters.powertop
Leaving PowerTOP

It looks like i got an error too.

is there any way to automate the command "sudo powertop --auto-tune" at startup?

Thanks

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Try to write 'powertop --auto-tune' before the exit directive in /etc/rc.local. You will need the administrative permission to modify the file (here with GEdit):
$ gksu gedit /etc/rc.local

404
404
Desconectado
Joined: 04/09/2015

like this?
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
powertop --auto-tune

exit 0

seems not working

lembas
Desconectado
Joined: 05/13/2010

Two things, first /etc/rc.local needs to be executablesudo chmod +x /etc/rc.local

and you should use full paths, so replace powertop with the output ofwhich powertop

404
404
Desconectado
Joined: 04/09/2015

i've just edited the file:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/sbin/powertop --auto-tune

exit 0

and then:

sudo chmod +x /etc/rc.local

but is still making noises.

i have to do every time i start the system manually:
sudo powertop --auto-tune

and i've just realized now that if i have an optical usb mouse connected it doesen't work anymore after sudo powertop --auto-tune.

EDIT:when the system is loading i saw this:

Cannot load from file /var/cache/powertop/saved_parameters.powertop

lembas
Desconectado
Joined: 05/13/2010

Regarding the mouse behavior, goto powertop and find the tunable that controls the mouse. On my computer it seems to be "Autosuspend for USB device USB Optical Mouse [3-2]".

Hit enter to toggle that tunable and powertop shows you what it does when it disables it.

You can put that command in rc.local after the auto tune command.

(Or if you like to save more power, you can click a mouse button to wake it up. Looks like the default autosuspend time is 2 seconds but you can change it too.)