summaryrefslogtreecommitdiff
path: root/source/a/sysvinit-scripts/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit-scripts/scripts')
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.cpufreq8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.cpufreq b/source/a/sysvinit-scripts/scripts/rc.cpufreq
index 24adb8d9..4caaa5a4 100644
--- a/source/a/sysvinit-scripts/scripts/rc.cpufreq
+++ b/source/a/sysvinit-scripts/scripts/rc.cpufreq
@@ -33,7 +33,7 @@ SCALING_GOVERNOR=ondemand
# provides power savings on Intel processors while avoiding the ramp-up lag
# present when using the powersave governor (which is the default if ondemand
# is requested on these machines):
-if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)" = "intel_pstate" ]; then
+if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 2> /dev/null)" = "intel_pstate" ]; then
SCALING_GOVERNOR="performance"
fi
@@ -42,6 +42,12 @@ if [ ! -z "$1" -a "$1" != "start" ]; then
SCALING_GOVERNOR=$1
fi
+# To force a particular option without having to edit this file, uncomment the
+# line in /etc/default/cpufreq and edit it to select the desired option:
+if [ -r /etc/default/cpufreq ]; then
+ . /etc/default/cpufreq
+fi
+
# If you need to load a specific CPUFreq driver, load it here. Most likely you don't.
#/sbin/modprobe acpi-cpufreq