X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fcpufreq-detect.sh;h=70d5452bcc672f4fb5ebb0fa52fa4e8a9ed69a64;hb=6d23e879dc928813efe91b49939d3df24f2c2f3f;hp=881ced86324238b56430382673690e573d54e82e;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git diff --git a/usr_bin/cpufreq-detect.sh b/usr_bin/cpufreq-detect.sh index 881ced8..70d5452 100755 --- a/usr_bin/cpufreq-detect.sh +++ b/usr_bin/cpufreq-detect.sh @@ -4,9 +4,11 @@ # 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] ################################################################################ -# 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 +65,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. @@ -110,15 +120,15 @@ case "$VENDOR_ID" in # K7 MODULE=powernow-k7 ;; - 15) - # K8 + 15|16|20) + # K8 (=15), Phenom (=16), AMD E-350 all-in-one CPUs (=20) MODULE=powernow-k8 ;; esac ;; CentaurHauls*) # VIA - if [ $CPU_FAMILY == 6 ]; then + if [ $CPU_FAMILY = 6 ]; then MODULE=longhaul; fi ;;