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

From ThinkWiki
Jump to: navigation, search
(How to get it work)
m
 
(24 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
==Foreword==
 
==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.
+
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 TRiED 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.  
+
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.
+
ThinkPads known to have this configuration are the {{X20}}, {{X21}}, {{T20}}, {{T21}}, {{T22}}, {{TransNote}} and possibly {{A20m}}, {{A20p}}, {{A21e}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22p}} models. (EDIT: A21m reported to be frequency-scaling according to GNOME CPU Freq Applet in Ubuntu Dapper and perhaps already in Hoary)
: 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.
+
The issue is that these CPUs do not repport correctly that they are SpeedStep capable.
 +
 
 +
This Document is under the GNU/GPL v2+ Licence.
  
 
==My case==
 
==My case==
Line 14: Line 15:
 
==============================================================================
 
==============================================================================
 
-->
 
-->
: This is what i get:
+
This is what i get:
: I have a x21 IBM ThinkPad, and when trying the SpeedStep implementation of 2.6 kernels i got:
+
I have a x21 IBM ThinkPad, and when trying the SpeedStep implementation of 2.6 kernels i got:
[xaiki@gonzo]:~% sudo modprobe speedstep-smi
+
:{{cmduser|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
+
:{{cmdresult|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 <tt>cpufreq.debug=7</tt> ( 1 is for core, 2 is for ??, and 4 is for drivers, 7 = 1 + 2 + 4 ) gave:
 +
:{{cmduser|sudo modprobe speedstep-smi}}
 +
:{{cmdresult|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}}
 +
:{{cmduser|sudo tail /var/log/syslog}}
 +
:{{cmdresult|[...]}}
 +
:{{cmdresult|Nov 11 19:54:20 localhost kernel: speedstep-lib: x86: 6, model: 8}}
 +
:{{cmdresult|Nov 11 19:54:20 localhost kernel: speedstep-lib: Coppermine: MSR_IA32_EBL_CR_POWERON is 0x44080020, 0x0}}
 +
:{{cmdresult|Nov 11 19:54:20 localhost kernel: speedstep-lib: Coppermine: MSR_IA32_PLATFORM ID is 0x0, 0x540000}}
 +
:{{cmdresult|Nov 11 19:54:20 localhost kernel: speedstep-smi: No supported Intel CPU detected.}}
  
: 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==
 
==How to get it work==
: Note: to get this working on recent kernels you'll need:
+
Note: to get this working on recent kernels you'll need:
 
  CONFIG_X86_SPEEDSTEP_RELAXED_CHECK = y
 
  CONFIG_X86_SPEEDSTEP_RELAXED_CHECK = y
: Easy =) just disable the speedstep-lib checks
+
Disable the speedstep-lib checks
  [xaiki@gonzo]:~% sudo modprobe speedstep-lib relaxed_check=1
+
:{{cmduser|1=sudo modprobe speedstep-lib relaxed_check=1}}
[xaiki@gonzo]:~% sudo modprobe speedstep-smi
+
:{{cmduser|sudo modprobe speedstep-smi}}
: Hurrah !!
+
 
 +
In Debian ( and probably with others, please confirm ), you can automate the module parmeters by creating a {{path|/etc/modprobe.d/speedstep-lib}} file with:
 +
options speedstep-lib relaxed_check=1
 +
 
 +
And then, you may add  these 2 lines to {{path|/etc/modules}}:
 +
speedstep-lib
 +
  speedstep-smi
 +
 
 +
===Ubuntu (Edgy)===
 +
In Ubuntu I had to do following to make it work. Tested with T22.
 +
 
 +
:{{cmduser|sudo modprobe -r speedstep-lib speedstep-smi }}
 +
:{{cmduser|1=sudo modprobe speedstep-lib relaxed_check=1}}
 +
:{{cmduser|sudo modprobe speedstep-smi }}
 +
:{{cmduser|sudo modprobe cpufreq_userspace }}
 +
 
 +
With these cpufrequtils works fine.
 +
 
 +
===Ubuntu (since 9.04)===
 +
 
 +
Since the above modules are compiled in the kernel, this above methods does not work anymore
 +
 
 +
:{{cmduser|sudo killall powernowd}}
 +
:{{cmduser|sudo powernowd -q}}
 +
 
 +
et voilà.
 +
 
 +
Some people report that one should use grub and not grub2 (see [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/580189/comments/9]).
  
 
==How to use it==
 
==How to use it==
===Using the sys interface===
+
[[How to make use of Dynamic Frequency Scaling]]
: 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 200-450-500-750 Speedstep capable... i'd like it to run at 1Ghz ...
 
  
 
==What's not working==
 
==What's not working==
: Obviously, what's not working is the other steps, and the current-speed reconignition.
 
  
 +
On an X20, speedstep_smi messes up acpi and nvram. Best not to use it. See [http://bugzilla.kernel.org/show_bug.cgi?id=6847 Kernel bug 6847]
  
[[Category:A20m]] [[Category:A20p]] [[Category:A21e]] [[Category:A21m]] [[Category:A21p]] [[Category:A22e]] [[Category:A22m]] [[Category:A22p]] [[Category:T20]] [[Category:T21]] [[Category:T22]] [[Category:TransNote]] [[Category:X20]] [[Category:X21]] [[Category:X22]] [[Category:X23]] [[Category:X24]]
+
The speeds shown may be erroneous, which has dramatic consequances if you try to watch movies or applications that are (exact) time-depending (as the timer is all dizzy).

Latest revision as of 09:44, 8 July 2010

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 TRiED 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, T20, T21, T22, TransNote and possibly A20m, A20p, A21e, A21p, A22e, A22m, A22p models. (EDIT: A21m reported to be frequency-scaling according to GNOME CPU Freq Applet in Ubuntu Dapper and perhaps already in Hoary)

The issue is that these CPUs do not repport correctly that they are SpeedStep capable.

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:

$ 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:

$ 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
$ 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

Disable the speedstep-lib checks

$ sudo modprobe speedstep-lib relaxed_check=1
$ sudo modprobe speedstep-smi

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 these 2 lines to /etc/modules:

speedstep-lib
speedstep-smi

Ubuntu (Edgy)

In Ubuntu I had to do following to make it work. Tested with T22.

$ sudo modprobe -r speedstep-lib speedstep-smi
$ sudo modprobe speedstep-lib relaxed_check=1
$ sudo modprobe speedstep-smi
$ sudo modprobe cpufreq_userspace

With these cpufrequtils works fine.

Ubuntu (since 9.04)

Since the above modules are compiled in the kernel, this above methods does not work anymore

$ sudo killall powernowd
$ sudo powernowd -q

et voilà.

Some people report that one should use grub and not grub2 (see [1]).

How to use it

How to make use of Dynamic Frequency Scaling

What's not working

On an X20, speedstep_smi messes up acpi and nvram. Best not to use it. See Kernel bug 6847

The speeds shown may be erroneous, which has dramatic consequances if you try to watch movies or applications that are (exact) time-depending (as the timer is all dizzy).