You are not logged in.

#1 2008-02-06 00:19:10

cry0x
Member
Registered: 2007-04-11
Posts: 91

Change CPU freq governer when on battery?

I am not using any special utility to set my frequency governor, simply:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

in my rc.local

It would be advantageous for me to use the powersave governor while on battery. How would I go about doing this "automagically" (through some ACPI switch I'm sure)?

I appreciate any input.


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#2 2008-02-06 00:30:14

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: Change CPU freq governer when on battery?

This is a recent post that may help you:
http://bbs.archlinux.org/viewtopic.php?id=43228

Edit: Oops posted a link to this post...

Last edited by Allan (2008-02-06 00:30:45)

Offline

#3 2008-02-06 00:47:54

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Change CPU freq governer when on battery?

laptop-mode-tools is the way to go, IMO.
if that's excessive for your needs you could also use the acpid daemon and edit /etc/acpi/handler.sh so that appropriate commands are called when battery/ac are switched.  The syntax of handler.sh isn't too difficult to figure out.

Offline

#4 2008-02-06 03:09:38

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Change CPU freq governer when on battery?

fwojciec wrote:

laptop-mode-tools is the way to go, IMO.
if that's excessive for your needs you could also use the acpid daemon and edit /etc/acpi/handler.sh so that appropriate commands are called when battery/ac are switched.  The syntax of handler.sh isn't too difficult to figure out.

Excellent. I'm already using acpid to execute my custom suspend script when I press the power button. I wonder why I didn't think to look there first yikes

Thanks!


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

Board footer

Powered by FluxBB