]>
Commit | Line | Data |
---|---|---|
d2c65e37 AF |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/cpufreq | |
4 | # | |
5 | # Description : Initalisize and startup cpufreq and set a governor | |
6 | # | |
7 | # Authors : Arne Fitzenreiter - arne_f@ipfire.org | |
8 | # | |
9 | # Version : 00.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | case "${1}" in | |
19 | start) | |
a041a28d AF |
20 | boot_mesg -n "Starting cpufreq ... " |
21 | ||
22 | for module in acpi-cpufreq cpufreq-nforce2 e-powersaver \ | |
23 | gx-suspmod longhaul longrun p4-clockmod powernow-k6 \ | |
24 | powernow-k7 powernow-k8 speedstep-centrino speedstep-ich \ | |
25 | speedstep-smi; do | |
26 | modprobe $module > /dev/null 2>&1; | |
27 | if [ ${?} = 0 ]; then | |
28 | boot_mesg -n "$SUCCESS$module$NORMAL " | |
29 | fi | |
30 | done | |
31 | boot_mesg "" | |
d2c65e37 AF |
32 | # load cqufreq governors |
33 | modprobe cpufreq_conservative | |
34 | modprobe cpufreq_ondemand | |
35 | modprobe cpufreq_powersave | |
36 | modprobe cpufreq_userspace | |
37 | ||
38 | # Set the governor to ondemand | |
39 | cpufreq-set -g ondemand | |
40 | evaluate_retval; | |
41 | ||
42 | # activate cpufreq collectd module | |
43 | sed -i -e "s|#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf | |
44 | ||
45 | exit 0; | |
46 | ;; | |
47 | *) | |
48 | echo "Usage: ${0} {start}" | |
49 | exit 1 | |
50 | ;; | |
51 | esac | |
52 | ||
53 | # End $rc_base/init.d/cpufreq |