You are not logged in.
Pages: 1
I want to use 'ondemand' when on battery power and 'performance' when on A/C. What is a good way to set this up? I saw the cpufreq(d) daemons but they don't seem to have this option (as far as I could tell).
Offline
this should be easy to do by adding an acpi handler for battery/ac that simply does something like
if on_ac; then
modprobe cpufreq_performance
cpufreq-set -g performance
else
modprobe cpufreq_ondemand
cpufreq-set -g ondemand
fi
You don't need cpufreqd for this, as that is a userspace governor (it does not use ondemand/performance, it uses cpufreq_userspace)
Offline
I use acpid (loaded in DAEMONS array), and
...
...
ac_adapter)
case "$2" in
AC0)
case "$4" in
00000000)
echo -n "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
;;
00000001)
echo -n "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
;;
esac
;;
*) logger "ACPI action undefined: $2" ;;
esac
...
...
in /etc/acpid/handler.sh
Offline
I agree with the suggestions above, but the mention of cpufreqd is actually unfair: it is not a mere userspace governor (as, e.g., powernowd); also in the default configuration, it changes governor in different situations. I do not like is over-complex configuration so I do not use it anymore, however I am pretty sure you can do what you want also with cpufreqd (please do not identify the cpufreqd package with the cpufreq daemon in the cpufrequtils package).
Mortuus in anima, curam gero cutis
Offline
what if you don't have a powersave governor? my system just has ondemand and performance.
Offline
what if you don't have a powersave governor? my system just has ondemand and performance.
You need to enable support in the kernel.
Offline
Pages: 1