Difference between revisions of "How to get SpeedStep working on Coppermine-piix4-smi based ThinkPads"

From ThinkWiki
Jump to: navigation, search
(How to use it)
(Using the sys interface)
Line 68: Line 68:
 
  gonzo:~# cat /proc/cpuinfo  | grep "cpu MHz"
 
  gonzo:~# cat /proc/cpuinfo  | grep "cpu MHz"
 
  cpu MHz        : 976.152
 
  cpu MHz        : 976.152
: don't trust no-one, my cpu is a 200-450-500-750 Speedstep capable... i'd like it to run at 1Ghz ...
+
: don't trust no-one, my cpu is a 500-700 Speedstep capable... i'd like it to run at 1Ghz ...
  
 
===cpudyn===
 
===cpudyn===

Revision as of 13:30, 11 April 2005

Foreword

APPLYING THIS HOWTO MAY MAKE YOU DUMB, CRASH YOUR CPU, YOUR MOTHERBOARD, MAKE YOUR GIRLFRIEND LEAVE YOU, OR MAYBE WORSE, USE IT AT YOUR OWN RISKS, I'M NOTHING OF A KERNEL HACKER, NEITHER A SMART GUY, THIS IS HOW I TRYED TO GET IT WORK, AND TILL NOW IT IS WORKING, MY PROPOSITION ARE ALMOST GUARANTED TO BE DUMB.
This HowTo is intended for people having trouble getting SpeedStep working via CpuFreq on their Coppermine CPU with a piix4 mainboard.
Thinkpads known to have this configuration are the X20, X21, X22, X23, X24, T20, T21, T22 and possibly A2x models.
These CPUs support (as i could notice) at least 3 different running speed, but it seems that the SpeedStep driver (and maybe the SpeedStep Data Sheet) only allows 2 diffrent running modes.
This Document is under the GNU/GPL v2+ Licence.

My case

This is what i get:
I have a x21 IBM ThinkPad, and when trying the SpeedStep implementation of 2.6 kernels i got:
[xaiki@gonzo]:~% sudo modprobe speedstep-smi
FATAL: Error inserting speedstep_smi    (/lib/modules/2.6.10-rc1-mm4-xa1/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-smi.ko): No such device
Rebooting with cpufreq.debug=7 ( 1 is for core, 2 is for ??, and 4 is for drivers, 7 = 1 + 2 + 4 ) gave:
[xaiki@gonzo]:~% sudo modprobe speedstep-smi
FATAL: Error inserting speedstep_smi   (/lib/modules/2.6.10-rc1-mm4-xa1/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-smi.ko): No such device
[xaiki@gonzo]:~% sudo tail /var/log/syslog
[...]
Nov 11 19:54:20 localhost kernel: speedstep-lib: x86: 6, model: 8
Nov 11 19:54:20 localhost kernel: speedstep-lib: Coppermine: MSR_IA32_EBL_CR_POWERON is 0x44080020, 0x0
Nov 11 19:54:20 localhost kernel: speedstep-lib: Coppermine: MSR_IA32_PLATFORM ID is 0x0, 0x540000
Nov 11 19:54:20 localhost kernel: speedstep-smi: No supported Intel CPU detected.

How to get it work

Note: to get this working on recent kernels you'll need:
CONFIG_X86_SPEEDSTEP_RELAXED_CHECK = y
Easy =) just disable the speedstep-lib checks
[xaiki@gonzo]:~% sudo modprobe speedstep-lib relaxed_check=1
[xaiki@gonzo]:~% sudo modprobe speedstep-smi
Hurrah !!
In Debian ( and probably with others, please confirm ), you can automate the module parmeters by creating a /etc/modprobe.d/speedstep-lib file with:
options speedstep-lib relaxed_check=1
And then, you may add /etc/modules these 2 lines:
speedstep-lib
speedstep-smi

How to use it

This may be better suited elsewhere as it is not smi specific.

there are many deamons on the wild that will handle the work, here what Debian says:
cpudyn - CPU dynamic frequency control for processors with scaling
cpufreqd - A speedstep applet clone
cpufrequtils - utilities to deal with the cpufreq linux kernel feature
gnome-cpufreq-applet - CPU Frequency Scaling Monitor applet for GNOME
powernowd - control cpu speed and voltage using 2.6 kernel interface

Using the sys interface

speeds are in Khz.
your max speed is at: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
gonzo:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
700000
your min speed is at: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
gonzo:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
500000
echo to /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed to change the speed
gonzo:/home/xaiki# echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
gonzo:~# cat /proc/cpuinfo  | grep "cpu MHz"
cpu MHz         : 697.252
gonzo:~# echo 900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
gonzo:~# cat /proc/cpuinfo  | grep "cpu MHz"
cpu MHz         : 976.152
don't trust no-one, my cpu is a 500-700 Speedstep capable... i'd like it to run at 1Ghz ...

cpudyn

please test and report.

cpufreqd

works out of the box

cpufrequtils

This package mainly has 2 programs:
/usr/bin/cpufreq-info
/usr/bin/cpufreq-set
cpufreq-info gives general device information:
xaiki@gonzo:~$ cpufreq-info
cpufrequtils 0.2: cpufreq-info (C) Dominik Brodowski 2004
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: speedstep-smi
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 500 MHz - 700 MHz
  available frequency steps: 700 MHz, 500 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 500 MHz and 700 MHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 700 MHz.
and cpufreq-set allows setting

... Never got it working ...

What's not working

Obviously, what's not working is the other steps, and the current-speed reconignition.