Help - Search - Members - Calendar
Full Version: Experimental Intel SpeedStep kext
InsanelyMac Forum > InsanelyMac Lounge > The X Labs > Intel SpeedStep
Pages: 1, 2, 3, 4, 5, 6
mercurysquad
New version 1.3.2 is now available!

New page for all downloads/bug reports is here.
INFO:We have switched to Google Code. Downloads from this post have been removed. Info on this page may be outdated. Everyone's encouraged to use the google code page instead.

--------------------------------------------------------------------------------------------------------
N/2 bus ratio support giving most users <1GHz pstates. Undervolting support, sse2 rtcfix kernel support, direct ctl change, Pstate override, default pstate, bug fixes.
Kernels on which it will work: any.

Thanks to the help of people over on #xnu-chat, an experimental Intel SpeedStep driver is now available which doesn't require a speedstep kernel (ie. it should work well with sleep kernels and allow you to resume/sleep). It will work on any Intel processor which supports speedstep (including older Pentium M). However, timing might be unstable on older processors (being fixed), so Core or higher is highly recommended. Note that it will not magically give sleep/resume ability to your speedstep kernel. Please switch to a sleep or vanilla kernel. NO AMD SUPPORT.

We need more testing before it can be termed a working kext. Please download the attached zip, unzip it and do in Terminal:

CODE
sudo kextload IntelEnhancedSpeedStep.kext


You don't need to put it in /System/Library/Extensions for testing.
Then use any SpeedStep GUI. Two of them are attached, use whatever you like.
Once you are satisfied, put it in /S/L/E and it should load everytime you boot up.

Here is more specific info about how to install the kext and use the SpeedStep app

If you experience problems with GUI apps, simply close it and use the terminal to test.

A lot of people are reporting problems with the speedstep.app and cputhrottler2beta apps. These were NOT created by me and this is not what we are testing. So please, close those apps and try manually throttling using terminal. An updated SpeedStep.app is in the works, tuxx will provide more info on it. A beta is uploaded but NO support yet until it's finished.

To see which frequencies are available:
CODE
sysctl kern.cputhrottle_freqs

To switch frequency:
CODE
sudo sysctl -w kern.cputhrottle_curfreq=YYYY
(replace YYYY with what you want from the list you got. You can also set a single digit number directly which is the frequency (pstate) number: 0 is highest speed, 1 is next lowest etc.

What to test -

1) That you can actually switch CPU speed
2) Whether your timing is stable (ie. OSX UI/animations should be smooth, not stuttering in audio)
3) Test whether you can still sleep and then resume - if your sleep/resume worked before

> Make sure you unload ACPICPUThrottle.kext and/or AppleIntelCPUPowerManagement.kext before loading this! <

To get debug log messages, type this in Terminal:
CODE
sudo dmesg | grep IntelEnhancedSpeedStep

If it doesn't work for you, paste on pastebin the output of the above command, and of
CODE
sysctl machdep.cpu && uname -a
, then post the URL here. To get information about the current freq/voltage and available freq/voltage, type
CODE
sysctl -a | grep throttle



INFO

From all the bug reports and debug logs, I have come to the conclusion: ACPI SUCKS.

So I have halted debugging ACPI autodetect of p-states. It is good enough now for 80% of users. For the remaining 20%, please create your P-states manually in steps of 2xFSB.

Next up: support for <1Ghz speed on supported kernels, and auto-throttle.


New features/fixes :
1.3.2
- fix a bug which displayed incorrect current frequency value when using n/2 bus ratio
1.3.1
- fixed certain issues with <1ghz support
1.3
- N/2 bus ratio support, should provide <1GHz pstates to most people. Note that if you have sse2, this will be enabled ONLY if you are using a kernel which supports <1ghz properly. Currently the only such kernel is my kernel 9.4 which is not released yet. :-)
- Excessive debug messages are now removed. Should fix stuttering while changing frequency
- Added extra IODelay after switching pstate so that sysctl displays the new values. This should make people happier. tongue.gif
- Minor internal fixes.
1.2.2
- Better kernel feature detection. Better clock recalibration.
1.2.1c
- Kernel feature autodetection, override via Info.plist key "KernelFeatures" in IOKitPersonalities. Set to -1 for autodetect (only works with new kernels which are NOT out yet), 0 = no speedstep,1ghz+, 1=speedstep kernel,1ghz+, 2=speedstep kernel,less than 1ghz support.
- No more phantom PStates (e.g 2401 mhz)
- Default Pstate during bootup/load, set DefaultPState key in Info.plist, -1=no default, 0=pstate0 is default etc.
- Doesn't allow <1 ghz throttling unless patched kernel supports it (vanilla/sleep kernels dont)
1.2.0
- Added delay for latency while switching pstate - should fix people not being able to switch frequencies consistently
- Undervolting! New sysctl key kern.cputhrottle_curvolt to change the current voltage. Setting will be remembered for that pstate.
- Added sysctl key kern.cputhrottle_ctl for direct changing of fid/vid: only for testing!! Settings will not be remembered
- Load PState table from kext's info.plist! For those who get "There was an error getting Pstate table from ACPI". To use this, open the kext's Info.plist in property list editor. Expand IOKitPersonalities/IntelEnhancedSpeedStep and you will see PStateTableDisabled. It is an array of arrays. Each element is one pstate. Each pstate has 2 elements, first is the frequency in MHz and 2nd is voltage in mV. If you change the name of the array to PStateTable, it will be loaded by the kext instead of autodetecting via ACPI. NO error checking so make sure it's valid for your CPU.
joe75
nice job, mercurysquad biggrin.gif
Krazubu
Nice work

The system and sound stutter when the mode is set to manual in the AC pan of the CPU throttler.

CPU is C2D E6650
mercurysquad
QUOTE(Krazubu @ Aug 5 2008, 02:44 AM) *
Nice work

The system and sound stutter when the mode is set to manual in the AC pan of the CPU throttler.

CPU is C2D E6650

Will look it up.

And quick tip for anyone else suspecting it's due to speedstepping: check dmesg - sudo dmesg | grep IntelEnhanced. If such stuttering is expected on your system, there will be a WARN message saying so.

Also: if it doesn't work at all for some people, check sudo dmesg, if it says "There was an error getting PState table from ACPI" - this is a known issue. We are working on manually overriding your frequency/voltage tables, kext will be out soon.
titooo
Thanks for the application man.
I think it's a great advance as it will let us have "vanilla kernel + speedstep options"(which till now only was possible using Coolbook, which cost 10$) or "sleep kernel + speedstep options".
But unfortunantely I couldn't test it till Asus repair my laptop... sad.gif
nobb1x
tried it, at the start it gave me 5 p-state (see log) but using tuxx speedstep app it never hit the 800mhz one,and use the 1200mhz as lower one, i don't know if this is usual.
trying some cpu intensive applications it seem to switch the speed, while using itunes it make the experience very bad,with continue stuttering. Closing the Speedstep.app the stuttering has gone, so i'm unsure if the problem is related to that app or at the kext. usually i use the ACPICPUThrottler for speedstep and never seen that problem (stuttering i mean)
Cputhrottler2beta2 crashes my system so i can't try it, i lost the keyboard and mouse after a while i start it.

some infos about my system

notebook Compal FT00
C2D 2ghz (7250)
macos 10.5.3
toh kernel 9.2.0 (speedstep)
i didn't tried sleep/resume, but i has never worked before too.

Have a good work!!
Krazubu
I forgot to say that sleep mode still doesn't work, but it never worked btw, the mobo is an ASUS P5B with intel 965
kennyp
Nice, very nice!
Compaq c714nr using Vanilla kernel 9.4.0, in 10.5.4 kext in working great. Using CPU Throttler2Beta2 I an sitting at 800 mhz and it auto steps to 1067 and 1467.

No change with sleep....(goes to sleep ok, but on wake cpu fan does not return to active)

As I said before, nice!

KennyP
mrheat
hi

here my results - check my sig for hardware details

http://pastebin.com/ma91d66c

keep up the good work!

regards,

mrheat
eclau
After loading IntelEnhancedSpeedStep.kext, I did the following in Terminal:
sudo -s
chown root /Applications/SpeedStep.app/Contents/MacOS/SpeedStep
chmod +s /Applications/SpeedStep.app/Contents/MacOS/SpeedStep

But SpeedStep did not launch. Can someone help? Thanks!

CPUThrottler2 was unable to detect my CPU frequency... showing 0 all the time.
nobb1x
QUOTE(eclau @ Aug 5 2008, 06:01 PM) *
After loading IntelEnhancedSpeedStep.kext, I did the following in Terminal:
sudo -s
chown root /Applications/SpeedStep.app/Contents/MacOS/SpeedStep
chmod +s /Applications/SpeedStep.app/Contents/MacOS/SpeedStep

But SpeedStep did not launch. Can someone help? Thanks!

CPUThrottler2 was unable to detect my CPU frequency... showing 0 all the time.


it don't start automatically, you need to start by hand, if you want it start with the system you need to follow this:
(from the readme)
Now go to System Preferences/Accounts click on lock(if it is locked), select Logins Items, and then click on + to add speedstep.app, browse to applications select speedstep.app and click add, and check that box.
btw, if it don't start, be sure the speedstep kext load, check the system.log to view or type sudo dmesg after the kextload.
dasepsilon
hell of a kext!
working great (at least up to now, i.e. 3 minutes biggrin.gif )

THANKS A LOT!!

(i'm on a dell xps 1330 with some intel core 2 duo, t5750 or something)

mercurysquad
Thanks to all those who tested!
Some issues have been fixed, a new beta will be put up soon.

Some general answers:

QUOTE
tried it, at the start it gave me 5 p-state (see log) but using tuxx speedstep app it never hit the 800mhz one,and use the 1200mhz as lower one, i don't know if this is usual.

This is being investigated. Apparently most such processors can't really go below 1Ghz but report 800mhz anyway.
QUOTE
trying some cpu intensive applications it seem to switch the speed, while using itunes it make the experience very bad,with continue stuttering.

From your log it definitely seems to be the app - it is switching Pstate several times a second, and since the kext locks the CPUs while switching, you will of course experience stuttering. Please try using manual switch method (sysctl -w ... described above).
QUOTE
i didn't tried sleep/resume, but i has never worked before too.

It can't fix your sleep/resume, it will just not mess with it if you could sleep/resume before.
JimDandy
Thanks for this. The kext works on my machine, but throttling using either of the programs causes poor performance, in my case with ITunes (what I tried). I was using either one set to automatic throttling. Also, I get only four steps for a 1.6 cpu.
eclau
Not working on Q6600 overclocked to 3.0GHz on Gigabyte P35-DS4

http://pastebin.com/mefe5b2

Thanks!
westwaerts
QUOTE(Krazubu @ Aug 5 2008, 02:48 PM) *
I forgot to say that sleep mode still doesn't work, but it never worked btw, the mobo is an ASUS P5B with intel 965


strange because on my p5b sleep works ( manually and auto), but restart and shutdown only randomly.
r_o_o_s
Thank you! This is the beginning of fixing one of the two remaining thing that are not working on my D830.

The kext loads fine. Tuxx doesn't start for some reason but cputhrottle2beta2 does.

The cpu is a t7300 and i detect the following modes:

800
1200
1600
2000
2001 (!)

Neither of the 800 or 2001 modes work but the rest of them do.

Sleep still works fine.

The sound is affected when switching freqs, but only just as it happens.
timmyj
thanks for this works a treat, to get the tuxx to start u need to
chmod +x SpeedStep.app/Contents/MacOS/SpeedStep
but then if u want to remove the prompt for password run
sudo -s
chown root /Applications/SpeedStep.app/Contents/MacOS/SpeedStep
chmod +s /Applications/SpeedStep.app/Contents/MacOS/SpeedStep
mitch_de
Works here. E4400 2.0GHZ , (little overclocked by FSB), so 1398 to 2333 MHZ with that stepping.
MSI P965-NEO F, VANILLA 10.5.4 Kernel biggrin.gif

The speedtesp app works also. ( Thanks for the hint avoid everytime admin password input)

The CPUTrottler2Beta, first didnt alow me to run any new app (only the running apps worked ), also sometimes no CTB2 window came up after starting CPUTrottler2Beta, after a few seconds it asked for admin password and mostly then the window came up. But not always.

No error logs for that "no window" thing in the console.

Only some messages about an fork() problem (running first time CT2B, try to start Xbench,... ).
I had to close CT2B first, and restart CT2B again to run the Apps
my tried to start apps
06.08.08 12:23:05 com.apple.launchd[162] ([0x0-0x82082].com.spiny.xbench) fork() failed, will try again in one second: Resource temporarily unavailable (xbench cant start up)
06.08.08 12:23:15 com.apple.launchd[162] ([0x0-0x84084].com.realtech.openglex) fork() failed, will try again in one second: Resource temporarily unavailable (..cant start up)
06.08.08 12:23:57 com.apple.launchd[162] ([0x0-0x85085].com.mechanicalpants.CPUHistory) fork() failed, will try again in one second: Resource temporarily unavailable

But even Systemevents coundnt run (until i closed CTB2)
06.08.08 12:24:26 com.apple.launchd[162] (com.apple.PreferenceSyncAgent) fork() failed, will try again in one second: Resource temporarily unavailable
06.08.08 12:24:38 com.apple.launchd[162] ([0x0-0x86086].com.apple.iCal.helper) fork() failed, will try again in one second: Resource temporarily unavailable
06.08.08 12:24:56 com.apple.launchd[162] (com.apple.PubSub.Agent) fork() failed, will try again in one second: Resource temporarily unavailable

After i closed CTB2, the apps all can start normal and after that i didnt get that problem again.

So can i use Speedtep app + your great .kext ? Or does i need the CTB2 app also for config the .kext ?

Also i am a bit confused (perhaps its now not implemented) about saving profile. CTB2 never saved it , so it had to config the setttings alyways again. Default was always Manual: 1398 , Dynamic 1398/1398.

HINT: Checking if the .kext works . Xbench is super for that, because if set to dynamic stepping, you can see that XBENCH (need to run only CPU+MEM Tests) the first CPU Bench Value is always worst, the trottler need some time to adjust to higher MHZ and the CPU Bench runs very fast. After 0.5 sec i think its runnung full MHZ and the values are same as without stepping as max. MHZ.

Question:
I can see that if wether Speedstep nor C2TB2 running, the .kext didnt step anymore up/down (fixed MHZ as last stepping).
Is that right ?
GREAT THING !!!!
wingrunr21
Ok, it works for me with a few quirks:

No errors show up in dmesg other than the debugging message reporting throttling. I am getting a few "glitches" with my mouse. It seems it will lag for a second and then it will jump to the correct location on screen.

I have to run CPUThrottler2 three times to get it to work properly. The first time it opens it just sits at 1200 mhz no matter what. The second time it will throttle until I remove the AC adapter and then just stop. The third time it works fine. The other oddity with that program is that when it is running I cannot use a bash prompt. It seems like it is locking up all tty sessions for some odd reason.

Another very fast test for CPU throttling is to do a

cat /dev/urandom > /dev/null

from a terminal. That should quickly move your CPU up to full throttle.
mercurysquad
QUOTE(eclau @ Aug 6 2008, 08:12 AM) *
Not working on Q6600 overclocked to 3.0GHz on Gigabyte P35-DS4

http://pastebin.com/mefe5b2

Thanks!

Can you please post the output of sudo dmesg after loading the kext? Thanks. Also check your BIOS whether it has speedstep enabled.
mitch_de
Seems to be very "cool" also for desktop users with overclocked CPUs. If nothing to do, CPU can cool down more than with C1E (in BIOS enbaled/disabled like enhanced speedstep enabled/disabled).
Q: Does CE1 CPU engergiesaver works beside speedstep (bios of mainboard manage that) or does it nothing running OS X ?

PROBLEM:
Aftera view minutes working speedtep app quits (no more in menu).
Only that message in the syslog, no dmesg of your .kext.
login[2438]: DEAD_PROCESS: 2438 ttys000 (i know that 2438 was speedstep).

Now i will try CTB2 running insted of speedstep.

Working since 15 minutes without quitting like speedstep.
Only asking every 5 Min for admin pwd, i made the same trick to (sudo .....) as hint above some posts.

wingrunr21
This is an update from my previous post.

Using SpeedStep.app is a lot better than the CPUThrottler. Mouse lag is non-existent or at least not noticeable except for when then CPU changes frequency. There is still a slight lag but otherwise rather smooth.

One interesting thing to note is that the kext is picking up an 800 mhz throttle level and a 2601 mhz throttle level. Neither one of these levels work. Here are the levels that do work: 1200 1600 2000 2600.
mitch_de
Now 2 hours later, all is OK. CTB2 is running and has not quit as SpeedStepp app.
Also stepping has worked all the time without any problem.

eclau
QUOTE(mercurysquad @ Aug 6 2008, 11:29 AM) *
Can you please post the output of sudo dmesg after loading the kext? Thanks. Also check your BIOS whether it has speedstep enabled.


The following items in BIOS are enabled:
CPU Enhanced Halt (C1E)
CPU Thermal Monitor (TM2)
CPU EIST Function

Output of sudo dmesg:
http://pastebin.com/m18674818

Also, same problem with E7200.
DrDeelay
Hi there!

CPU Typ Mobile DualCore Intel Core 2 Duo T5500, 1666 MHz (10 x 167)
Motherboard Name BenQ Joybook R55v
Motherboard Chipsatz Mobile Intel Calistoga-PM i945PM
Arbeitsspeicher 2048 MB (DDR2 SDRAM)
DIMM1: Hynix HYMP512S64CP8-C4 1 GB DDR2-533 DDR2 SDRAM (5-4-4-12 @ 266 MHz) (4-4-4-12 @ 266 MHz) (3-3-3-9 @ 200 MHz)
DIMM3: Aeneon AET760SD00-30DB97X 1 GB DDR2-667 DDR2 SDRAM (5-5-5-15 @ 333 MHz) (4-4-4-12 @ 266 MHz) (3-3-3-9 @ 200 MHz)
BIOS Typ Phoenix (02/06/07)

Works great with Vanilla-Kernel 9.4. Can change Frequency manually and dynamic.

keep up the great work, please... :-)

DrDeelay!
THe KiNG
OMG so this is "The light at the end of the tunnel..."
Really great work guys!
Now my results:
CODE
INFO  P-State 0: 2401 MHz at 1212 mV, consuming 35 W
INFO  P-State 1: 2400 MHz at 1137 mV, consuming 35 W
INFO  P-State 2: 2000 MHz at 1100 mV, consuming 28 W
INFO  P-State 3: 1600 MHz at 1050 mV, consuming 22 W
INFO  P-State 4: 1200 MHz at 1000 mV, consuming 16 W
INFO  P-State 5: 800 MHz at 925 mV, consuming 14 W

bash-3.2# sysctl kern.cputhrottle_freqs
kern.cputhrottle_freqs: 800 1200 1600 2000 2400 2401
bash-3.2# sysctl -w kern.cputhrottle_curfreq=800
kern.cputhrottle_curfreq: 2400 -> 1200
bash-3.2# sysctl -w kern.cputhrottle_curfreq=1200
kern.cputhrottle_curfreq: 1200 -> 1200
bash-3.2# sysctl -w kern.cputhrottle_curfreq=1600
kern.cputhrottle_curfreq: 1200 -> 1600
bash-3.2# sysctl -w kern.cputhrottle_curfreq=2000
kern.cputhrottle_curfreq: 1600 -> 2000
bash-3.2# sysctl -w kern.cputhrottle_curfreq=2400
kern.cputhrottle_curfreq: 2000 -> 2400
bash-3.2# sysctl -w kern.cputhrottle_curfreq=2401
kern.cputhrottle_curfreq: 2400 -> 2400

For some reason SpeedStep.app dosent like me tongue.gif beta app works but with bugs same sound problems but sound is ok when i switch freq manual in terminal so is not kext fault, only bug i found in kext is 800 & 2401 freq, both dosen't work. Also i notice a temp increase on stock freq 2400 ~51 C was never before more then 44 C
BTW that "cat /dev/urandom > /dev/null" keeps 1 core of cpu in 100% blink.gif
"sudo dmesg | grep IntelEnhancedSpeedStep" returns nothing on me.
Pastebin results
mercurysquad
Hey people, please keep issues separate, ie. if it's an issue with one of the speedsteps apps, it is not in my control smile.gif So if you are having problems, please close the speedstep apps and try throttling manually using the terminal (sysctl command).

Primarily I am testing the .kext because that's what's new. tuxx is working on improving SpeedStep.app (which will also support voltage changes). Will keep you all posted.

New kext will come tomorrow with a lot of the issues fixed. Please keep the test reports coming! Thanks.
lovedahackintosh
eagerly waiting the next version of this. i tried it on my inspiron 6000 (against your recommendation) and wasnt too successful. i am now using your beta 9.2 kernel from the other thread as my default as it is the only thing that FINALLY fixed my sound... even if i can only throttle down to 1ghz.

any chance this (as opposed to the custom 9.2 kernel) will eventually work for sse2 cpus?
THe KiNG
Until new beta is out here is my PC results:
CODE
bash-3.2# sysctl kern.cputhrottle_freqs
kern.cputhrottle_freqs: 1596 2394
bash-3.2# dmesg | grep IntelEnhancedSpeedStep
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 0
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x827
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 0
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x827
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 0
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x827
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 0
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x827
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 0
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x827
IntelEnhancedSpeedStep: DBG Throttle done.
IntelEnhancedSpeedStep: DBG Throttling to PState 1
IntelEnhancedSpeedStep: DBG Starting throttle with CTL 0x51b
IntelEnhancedSpeedStep: DBG Throttle done.
bash-3.2# sysctl machdep.cpu && uname -a
machdep.cpu.address_bits.virtual: 48
machdep.cpu.address_bits.physical: 36
machdep.cpu.cache.size: 4096
machdep.cpu.cache.L2_associativity: 8
machdep.cpu.cache.linesize: 64
machdep.cpu.arch_perf.fixed_width: 40
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.width: 40
machdep.cpu.arch_perf.number: 2
machdep.cpu.arch_perf.version: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.dynamic_acceleration: 0
machdep.cpu.thermal.sensor: 1
machdep.cpu.mwait.sub_Cstates: 32
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.cores_per_package: 4
machdep.cpu.logical_per_package: 4
machdep.cpu.extfeatures: XD EM64T
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS
HTT TM SSE3 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM
machdep.cpu.brand: 0
machdep.cpu.signature: 1787
machdep.cpu.extfeature_bits: 537919488 1
machdep.cpu.feature_bits: -1075053569 58301
machdep.cpu.stepping: 11
machdep.cpu.extfamily: 0
machdep.cpu.extmodel: 0
machdep.cpu.model: 15
machdep.cpu.family: 6
machdep.cpu.brand_string: IntelŪ Core™2 Quad CPU Q6600 @ 2.40GHz
machdep.cpu.vendor: GenuineIntel
Darwin THeKiNG-PC.local 9.5.0 Darwin Kernel Version 9.5.0: Fri Jul 25 16:58:20 PDT 2008; root:xnu-1228.7.52~1/RELEASE_I386 i386

Waiting for the new kext for testing!
Thanks!
rhyguy
This doesnt work, as well as every other sppedstep solution out there

IntelEnhancedSpeedStep: WARN There was an error while getting PState array from ACPI

Dell inspiron 530, intel q6600
zillac
Works great here on Thinkpad T60p, C2D T7200, "1000 1333 1666 2000" all works.

Thanks for the great work.
uuid
Q6600 on GA-P35-DS3L:

Kext loads and works fine when NOT overclocked. Available Frequencies are 1600 and 2400.
Load: http://pastie.org/249044
DMESG: http://pastie.org/249045 (and so on)

When OC'd, I get the often reported "IntelEnhancedSpeedStep: WARN There was an error while getting PState array from ACPI"

Thanks for the hard work! This is turning out to be a great kext! biggrin.gif
edit:
Sleep/resume works (did before)
Playback is smooth (3 HD videos simultaneously)
Changing frequencies between the two values seems to work (what is a reliable way to determine actual freq?)
tuxx
QUOTE(uuid @ Aug 7 2008, 09:26 AM) *
Changing frequencies between the two values seems to work (what is a reliable way to determine actual freq?)


the most reliable way is to read the "kern.cputhrottle_curfreq" value using sysctl. just do:

sudo sysctl -a kern.cputhrottle_curfreq
mitch_de
QUOTE(tuxx @ Aug 7 2008, 04:30 PM) *
the most reliable way is to read the "kern.cputhrottle_curfreq" value using sysctl. just do:
sudo sysctl -a kern.cputhrottle_curfreq

Thanks.
Question:
Does the new speedstep.kext trottle allone (after setup as dynamic) or does it need an running App like CPUThrottler / SpeedStep too and stops throttling when no CPUThrottler/SpeedStep is running?
I dont need (always) an feedback how fast the cpu is running (App Window/Menue).

Would be great if , if it is possible to include the throttling in the speedstep.kext itself and use CPUThrottler only for setup/changing setup.
mercurysquad
New kext out, check 1st page.

Kext does no throttling on its own. Either do it via terminal, or via one of the apps. In the future we may add autothrottle support.

SSE2 users: This will work but clock will be messed up. Even on my modified 9.2 kernel. Next beta 1.2.1 probably this evening will support sse2 with 9.2 rtc fixed kernel also, but no sleep with that unfortunately. A new universal 9.4 kernel with fixed clock+sleep is in the works as well.

Cheers.
uuid
QUOTE(mercurysquad @ Aug 8 2008, 07:21 AM) *
New kext out, check 1st page.


It works! Amazing, thanks so much! I'm running my Q6600 at 1.2 volts / 1600 MHz at the moment, and seems to be stable. Anything specific that I should test?
mercurysquad
SSE2 Users - version 1.2.1 now supports SpeedStep kernels with rtcfix! Set KernelFeatures to 1 in Info.plist to enable it!
THe KiNG
Well the new kext dosen't work on my lappie stuck on 2401 MHz and is the only freq reported! sad.gif
On Pc same 2 value, only thing that is changed to me is the debug info on boot.
Waiting for new beta to test.
Keep up the good work, I can see the light XD
r_o_o_s
I have a Dell D830 and I have now done som more testing. (system/kernel info below)
The bios setting dynamic accelleration seems to affect the kext.

with the old one (1.0 or 1.1 or whatever it was)

DA off: gives me 5 modes 800,1200,1600,2000,2001 (neither 800 nor 2001 works)
DA on: gives me 4 modes 800, 1200,1600,2000 (800 doesnt work, guess i need fixed kernel)

with 1.2.1b
DA off: gives me 3 modes (1200,1600,2000)
DA on: gives me 1 mode (2001)
Messing with kernelfeatures causes kernel panic


Sleep works with both kexts
Sound is affected the moment one changes mode, not else
Have a look at the end of this post for interesting voltage behaviour

/roos

_____________________________
INFO



roos-D830:~ roos$ sysctl machdep.cpu && uname -a
machdep.cpu.address_bits.virtual: 48
machdep.cpu.address_bits.physical: 36
machdep.cpu.cache.size: 4096
machdep.cpu.cache.L2_associativity: 8
machdep.cpu.cache.linesize: 64
machdep.cpu.arch_perf.fixed_width: 40
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.width: 40
machdep.cpu.arch_perf.number: 2
machdep.cpu.arch_perf.version: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.dynamic_acceleration: 0
machdep.cpu.thermal.sensor: 1
machdep.cpu.mwait.sub_Cstates: 139808
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.cores_per_package: 2
machdep.cpu.logical_per_package: 2
machdep.cpu.extfeatures: XD EM64T
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM
machdep.cpu.brand: 0
machdep.cpu.signature: 1786
machdep.cpu.extfeature_bits: 537919488 1
machdep.cpu.feature_bits: -1075053569 58301
machdep.cpu.stepping: 10
machdep.cpu.extfamily: 0
machdep.cpu.extmodel: 0
machdep.cpu.model: 15
machdep.cpu.family: 6
machdep.cpu.brand_string: Intel® Core™2 Duo CPU T7300 @ 2.00GHz
machdep.cpu.vendor: GenuineIntel
Darwin roos-D830.local 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386 i386

kern.cputhrottle_curfreq: 1200
kern.cputhrottle_curvolt: 1068
kern.cputhrottle_freqs: 1200 1600 2000
kern.cputhrottle_factoryvolts: 1068 1228 1388
kern.cputhrottle_ctl: 1559
roos-D830:~ roos$

roos-D830:~ roos$ sudo sysctl -w kern.cputhrottle_curvolt=1
Password:
kern.cputhrottle_curvolt: 1068 -> 1036

eclau
Still no go sad.gif
wingrunr21
The beta no longer works for me. dmesg output seems to show it finding the correct number of Pstates but it only finds one available scaling frequency. It also is only finding one of the "phantom" Pstates. Here is my dmesg output:

CODE
sudo dmesg | grep Intel
IntelEnhancedSpeedStep: INFO  Initializing version 1.2.1b (C) Prashant Vaibhav <mercurysquad@yahoo.com>
IntelEnhancedSpeedStep: DBG   Probing for Intel processor...
IntelEnhancedSpeedStep: INFO  Supported Intel processor found on your system
IntelEnhancedSpeedStep: DBG   Processor Family 6, Model 39
IntelEnhancedSpeedStep: INFO  Starting
IntelEnhancedSpeedStep: DBG   FSB = 199 MHz
IntelEnhancedSpeedStep: INFO  On your processor, voltages can be changed in 12.5 mV steps
IntelEnhancedSpeedStep: DBG   Using data from CPU0
IntelEnhancedSpeedStep: DBG   Found 6 P-States
IntelEnhancedSpeedStep: INFO  P-State 0: 2601 MHz at 1250 mV, consuming 32 W, latency 10 usec
IntelEnhancedSpeedStep: DBG   Using 1 PStates.
mercurysquad
Sorry stupid bug in culling code showed the phantom and culled the real ones instead of the other way round :-)
Fix is being tested, original post will be updated when it seems to work.
mitch_de
Hi,
the news about the kernel flags (in your .plist) are a bit ???

"New features/fixes :
- Kernel feature autodetection, override via Info.plist key "KernelFeatures" in IOKitPersonalities. Set to -1 for autodetect (only works with new kernels which are NOT out yet), 0 = no speedstep,1ghz+, 1=speedstep kernel,1ghz+, 2=speedstep kernel,less than 1ghz support."
In the downloaded new kext, there is kernelFeatures = -1, which means only for kernels which did not exist now?
To what number have i switch(edit .plist) if i have normal vanilla , 0 = no speedstep,1ghz+ ?

i use 0. Perhaps better to change the DL version with 0 as default.


Get:
kern.cputhrottle_curfreq: 1864
kern.cputhrottle_curvolt: 1340
kern.cputhrottle_freqs: 1398 1864 2330
kern.cputhrottle_factoryvolts: 1564 1564 1564 (cool!)
kern.cputhrottle_ctl: 2088
E4400 2330 max, trotteling is working well (as last version).

If i want to change volts, which steps are to set ?
(only steps of 2 mV, even Voltages), would 1500 an value which could word (1,500 V insted of 1,564 V)

Thanks

wingrunr21
QUOTE(mercurysquad @ Aug 8 2008, 08:35 AM) *
Sorry stupid bug in culling code showed the phantom and culled the real ones instead of the other way round :-)
Fix is being tested, original post will be updated when it seems to work.


Ok, sounds good!
mercurysquad
Ok, fixed version 1.2.1c is out. Please download that one instead. Sorry that the bug slipped in (hey it's beta!). Thanks to The_King for beta testing.


As for the KernelFeatures flag, here is the explanation:

Using -1 is safest, and recommended for anyone with SSE3/core or better processor.
Using 0 is also generally safe. It explicitly turns off extra things not needed for SSE3 processors.
Using 1 is ONLY for those who are using a speedstep kernel on SSE2 (specially my rtcfix kernel).
Do NOT use 1 for any other kernel, it will panic.
Do NOT use 2 for any kernel at all. This will only be used in the future to force clock recalibration and speed<1ghz. Currently it will panic on ALL kernels.

Even when our universal speedstep+sleep kernel is out, use -1. This will make the kext autodetect which features to use.

Hope that clears up the confusion.

About the voltage steps: it will either be 16 mV or 12.5 mV depending on your processor. If you do sudo dmesg just after loading the kext, the log messages will tell you what voltage step your processor supports. If you set a voltage in any other step, it's not a problem, kext will choose the nearest voltage that your processor supports. It will also not allow setting to too high voltage.

Minimum voltage is 700mV or 712.5 mV depending on CPU. If you set a voltage too low, processor will automatically use the lowest voltage it will support.
mitch_de
Thanks!

I tried VID setting now.
kern.cputhrottle_curfreq: 1398
kern.cputhrottle_curvolt: 1564
kern.cputhrottle_freqs: 1398 1864 2330
kern.cputhrottle_factoryvolts: 1564 1564 1564


my kern.cputhrottle_curvolt without chaning (factory) was 1564

e180058210:~ ami$ sysctl -w kern.cputhrottle_curvolt=1464
kern.cputhrottle_curvolt: 1340 (??)
sysctl: kern.cputhrottle_curvolt: Operation not permitted sudo needed ?( but -a shows that 1340)

kern.cputhrottle_curfreq: 1398
kern.cputhrottle_curvolt: 1340
kern.cputhrottle_freqs: 1398 1864 2330
kern.cputhrottle_factoryvolts: 1564 1564 1564
kern.cputhrottle_ctl: 1576


Are there fixed steps (i read at Intel that there are 12,5 mV Steps,)
12,5 mV = 12,5 in our numbers.

AT least NO crash since 2 hours (using the first version of VID +/-) using kernel flag 0

Now setting it (fixed) to 1864 MHZ

kern.cputhrottle_curfreq: 1864
kern.cputhrottle_curvolt: 1340
kern.cputhrottle_freqs: 1398 1864 2330
kern.cputhrottle_factoryvolts: 1564 1564 1564
kern.cputhrottle_ctl: 2088

But kern.cputhrottle_curvolt didnt use the setting before, it stays at 1340 mV.


mercurysquad
QUOTE(mitch_de @ Aug 8 2008, 03:50 PM) *
Thanks!

I tried VID setting now.

my kern.cputhrottle_curvolt without chaning (factory) was 1564

e180058210:~ ami$ sysctl -w kern.cputhrottle_curvolt=1464
kern.cputhrottle_curvolt: 1340 (??)
sysctl: kern.cputhrottle_curvolt: Operation not permitted sudo needed ?( but -a shows that 1340)

sysctl ern.cputhrottle_curvolt also gives 1340

Are there fixed steps (i read at Intel that there are 12,5 mV Steps,)
12,5 mV = 12,5 in our numbers.

AT least NO crash since 2 hours (using the first version of VID +/-) using kernel flag 0


Please read the explanation above about voltage steps.

Your voltage depends on frequency, so if the voltage doesn't make sense (ie. too low or otherwise), check the frequency. For lower frequency, voltage is lower. Best to always check using sysctl -a | grep throttle. So you see the possible frequencies and their corresponding voltages along with current freq and voltage the cpu is running at. Most probably your processor was running at a frequency whose voltage was 1340 mV.

Also, you need to add sudo before sysctl to be able to change any values.

UPDATE: According to the additional info you posted, it seems (once again) ACPI is to blame -- it is not giving proper data. The _curvolt is read directly from the CPU, and the CPU is properly reporting 1340 mV, but ACPI is reporting 1564 mV for all frequencies (which is clearly VERY high). For the next version we are going to add pstate tables for a lot of processors to avoid relying on ACPI.

For now you can make your own pstate table in the info.plist. You can get the voltages for each frequency by switching the curfreq and then checking the curvolt. Switch to each fequency and make a not of its voltage. Then ediit Info.plist and set the proper freq/voltage, and change the name of the array from PStateTableDisabled to PStateTable.
wingrunr21
Very nice! It works properly for me now. dmesg output looks good and the phantoms are gone.

You do have to restart SpeedStep.app to get it to see the new pstates.

Still getting very slight delays when the cpu throttles but it seems a bit better than last time. Audio is not choppy and video playback is smooth.
mitch_de
QUOTE(mercurysquad @ Aug 8 2008, 03:53 PM) *
Please read the explanation above about voltage steps.

... Best to always check using sysctl -a | grep throttle. So you see the possible frequencies and their corresponding voltages along with current freq and voltage the cpu is running at. Most probably your processor was running at a frequency whose voltage was 1340 mV.

Also, you need to add sudo before sysctl to be able to change any values.


OK, Sudo i clear.
But why kern.cputhrottle_curvolt value changes if the command canīt work because no permission.
Before sysctl .... kern.cputhrottle_curvolt was 1564, after (without sudo) 1340.
Or is it only changed in value but NOT in real.


But my factory settings are all the same for the VID
kern.cputhrottle_curfreq: 1864
kern.cputhrottle_curvolt: 1340
kern.cputhrottle_freqs: 1398 1864 2330
kern.cputhrottle_factoryvolts: 1564 1564 1564

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.