X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=blobdiff_plain;f=usr_bin%2Fcpufreq-detect.sh;h=e8c15c2b79d913ca5bf097e8a7e5001413c1693f;hp=881ced86324238b56430382673690e573d54e82e;hb=86460cc3653e55e63ee6ffb1cdf9800c74e22b7a;hpb=e720deae78f1eda5e6f62629606c194f16796762 diff --git a/usr_bin/cpufreq-detect.sh b/usr_bin/cpufreq-detect.sh index 881ced8..e8c15c2 100755 --- a/usr_bin/cpufreq-detect.sh +++ b/usr_bin/cpufreq-detect.sh @@ -4,9 +4,12 @@ # Authors: grml-team (grml.org), (C) Ubuntu, (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Tue Apr 18 19:09:55 CEST 2006 [mika] +# Latest change: Mit Jul 04 12:15:57 CEST 2007 [mika] ################################################################################ -# Notice: taken from http://people.ubuntulinux.org/~scott/patches/powernowd/ +# Notice: also check out /etc/init.d/loadcpufreq of current cpufrequtils in Debian. +# +# Notice: based on http://people.ubuntulinux.org/~scott/patches/powernowd/ and +# scripts found in the powernowd package version 0.97-1ubuntu6 on Ubuntu. ################################################################################ /usr/sbin/laptop-detect 2>/dev/null && LAPTOP=1 @@ -63,8 +66,16 @@ case "$VENDOR_ID" in GenuineIntel*) # If the CPU has the est flag, it supports enhanced speedstep and should # use the speedstep-centrino driver - if [ "`grep est $CPUINFO`" ]; then - MODULE=speedstep-centrino; + if [ "$(grep est $CPUINFO)" ]; then + case "$(uname -r)" in + 2.6.2[0-9]*) + # Prefer acpi-cpufreq for kernels after 2.6.20 + MODULE=acpi-cpufreq + ;; + *) + MODULE=speedstep-centrino + ;; + esac elif [ $CPU_FAMILY = 15 ]; then # Right. Check if it's a P4 without est. # Could be speedstep-ich, or could be p4-clockmod.