2 ########################################################################
3 # Begin $rc_base/init.d/cpufreq
5 # Description : Initalisize and startup cpufreq and set a governor
7 # Authors : Arne Fitzenreiter - arne_f@ipfire.org
13 ########################################################################
20 boot_mesg
-n "Starting cpufreq... "
22 # try cpufreq hardware depend modules
23 for module
in acpi-cpufreq cpufreq-nforce2 e-powersaver \
24 gx-suspmod longhaul longrun p4-clockmod powernow-k6 \
25 powernow-k7 powernow-k8 speedstep-centrino speedstep-ich \
27 modprobe
$module > /dev
/null
2>&1;
29 boot_mesg
-n "$SUCCESS$module$NORMAL "
34 # load cqufreq governors
35 modprobe cpufreq_conservative
36 modprobe cpufreq_ondemand
37 modprobe cpufreq_powersave
38 modprobe cpufreq_userspace
40 CPUCOUNT
=`ls /sys/devices/system/cpu/cpu*/cpufreq/affected_cpus | wc -l`;
42 # Set the governor to ondemand to test if it works
43 cpufreq-set
-g ondemand
45 # activate cpufreq collectd module
46 sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc
/collectd.conf
48 # Set the governor to ondemand for all cpus
49 for i
in `seq 0 $CPUCOUNT`;
51 cpufreq-set
-c $i -g ondemand
60 echo "Usage: ${0} {start}"
65 # End $rc_base/init.d/cpufreq