Jump to content

64bit p-state


hnak
 Share

131 posts in this topic

Recommended Posts

As Apple has moved com.apple.unsupported to com.apple.private in 10.6, kernel APIs are not visible from 64bit kexts without Apple's signature. As a result, I could not build 64 bit VoodooPower.

 

So I split the power management functionality into application and kext, where the kext simply reads/write CPU registers and the application monitors CPU ticks and notifies p-state switching to the kext.

It works in my environment ( Q9300 32/64, Phenom920 32 ). As I do not have Nehalem, I have no idea whether it works with them.

 

Of course, you do not need this at all if you are comfortable with 32bit ( AMD user has no choice anyway ) or using AppleIntelCPUManagement with DSDT patch. As TSC is not adjusted ( 10.6 kernel has removed rtc_stepping/rtc_stepped ), non-constant TSC CPU ( for example, K8 ) may have bad effect by the clock change.

 

How to use: Install VoodooPState.kext and launch PStateChanger.app.

 

The kext is reduced version of VoodooPower 1.2.3 ( by SuperHai ) and it generates the same p-state table. It cannot co-exist with power-management kexts which manipulates p-state (for example, VoodooPower ).

 

binary and source:

--- 10/20 updated : fixed memory leak & added doc icon option, avoid instant kp on Lynfield ---

ver. 1.0.3

leopard build

 

--- for Phenom II X6 ( kext only ).

ver. 1.0.4

 

Source is available (via subversion) at http://osx86drivers.sourceforge.net.

Link to comment
Share on other sites

Thaks i will try that.

I used voodoo minipower on my C2D in 10.5.

Itried iCPU, but it worked noz 100%. Showed pStates kooekt but didnt trottle or shows trotthling but CPU-X didnt (MSR isnt working in Snow i think).

I will report.

Link to comment
Share on other sites

hehe

 

I built genericintelcpupm for x32/x64 jsut fine and it links ok against unsupported.kext

 

just need to use two tricks

 

but then this kext sometimes gives kp during bootup in x64 :)

How do you get the load of all the cores ?

Link to comment
Share on other sites

Is it possible to change the throttling level?

Not now. How would you like to change ?

 

As I included source, you can do whatever you want.

If it is p-state max/min or update interval that you want to change, look into AppDelegate and modify them.

If it is voltage max/min, you can tweak them with kext's Info.plist (Intel only).

Link to comment
Share on other sites

Hi, i will test your new tool soon - i dont forget it ;)

Q: What do you think about that russian iCPU (now named voodoomonitor ) Snow Leo only - do you testet it?

http://www.applelife.ru/topic/20179-voodoo...-snow-leopard/

I have source 1.0.3 but it looks that no newer source of that is available (1.0.7)

The bad is, i cant russian, and i got an warning asking there (problem no mV changes seen) in english ;)

 

i attached the 1.0.3 source and 1.07 voodoomonitor , because you need to be registered to get the DL)

I think that has its ground in superhai´s voodoopower, but i am not sure.

Voodoomonitor_SLandiCPUSL_Src.zip

Link to comment
Share on other sites

Not now. How would you like to change ?

 

As I included source, you can do whatever you want.

If it is p-state max/min or update interval that you want to change, look into AppDelegate and modify them.

If it is voltage max/min, you can tweak them with kext's Info.plist (Intel only).

 

I mean, it there are higher needs it will make the Frequency step up quicker.

 

At Moment as an Example my Dock lags, it I click a Folder on the Dock it wont rise the Frequency.

Link to comment
Share on other sites

Hi, i will test your new tool soon - i dont forget it ;)

Q: What do you think about that russian iCPU (now named voodoomonitor ) Snow Leo only - do you testet it?

They have split VoodooPower into kext/app basically based on the same idea as mine.

However, 1.0.3 app does not do anything but monitoring user's slider control and notifying the change to kext. It does not check CPU workload, though later version (VoodooMonitor.app) may do. My app does monitor workload even though the algorithm might be rough.

As far as I understand, the 1.0.3 source is incomplete. For example, GlobalThermal is never initialized but written to msr register and it's scary to test ... forgive me if I am wrong.

I also found that AMD support is missing unlike mine.

 

 

I mean, it there are higher needs it will make the Frequency step up quicker.

 

At Moment as an Example my Dock lags, it I click a Folder on the Dock it wont rise the Frequency.

Solution may be shortening the interval ( currently 500 ms ? ) and lowering the threshold to raise p-state ( 0.8 ) of app.

As kext's looptimer interval is 200, you also may have to change the value .

Please tell me if you find good values by experiment.

 

Note: by clicking any of p-state values ( p-state tab ), you can stop throttling and fix p-state to a certain level in case you want maximum performance regardless of current state ( for example, in games ). Dock lags disappear by doing so ?

Link to comment
Share on other sites

Solution may be shortening the interval ( currently 500 ms ? ) and lowering the threshold to raise p-state ( 0.8 ) of app.

As kext's looptimer interval is 200, you also may have to change the value .

Please tell me if you find good values by experiment.

How to do it? In the source?

 

Note: by clicking any of p-state values ( p-state tab ), you can stop throttling and fix p-state to a certain level in case you want maximum performance regardless of current state ( for example, in games ). Dock lags disappear by doing so ?

The lag disappears then. It looks the lag appears with the lowest Pstate, 600Mhz for me.

Link to comment
Share on other sites

How to do it? In the source?

 

 

The lag disappears then. It looks the lag appears with the lowest Pstate, 600Mhz for me.

Yeah, you have to modify soruce ( PStateChangerAppDelegate.m ) and build. It is easy.

 

Loca the line:

updateTimer = [[NSTimer scheduledTimerWithTimeInterval:0.5
   target:self
   selector:@selector(updateInfo:)
   userInfo:nil
   repeats:YES] retain];

Change the value "0.5" to "0.2" for shorter interval. Any value less then 0.2 is meaningless unless kext is modified.

To change threshods, locate the code block:

	if(autoThrottle){
if(load > 0.95){	// up to highest
newState = 0;
} else if(load > 0.8){
if(newState > 0)
	newState -= 1;
} else if(load < 0.4){
newState += 1;
} else if(load < 0.1){	// down to lowest
newState = _pstateCount-1;
}

Then change the value "0.8" to "0.7", for example. In the case, you also should change "0.4" to "0.35".

 

600MHz is very low. What's your CPU ?

Link to comment
Share on other sites

600MHz is very low. What's your CPU ?

T7250 2Ghz with 7 (0-7) Pstates: 2000-1800-1600-1400-1200-1000-800-600. I disabled the EFI FSB in Info.plist, if its enabled, it gets wrong FSB - 183Mhz.

 

*With Coolbook it works fine with 600Mhz, the throttling level is set to very high.

 

 

With these settings it feels smooth.

 

scheduledTimerWithTimeInterval:0.2

 

 

		if(load > 0.95){	// up to highest
		newState = 0;
	} else if(load > 0.1){
		if(newState > 0)
			newState -= 1;
	} else if(load < 0.1){
		newState += 1;
	} else if(load < 0.1){	// down to lowest
		newState = _pstateCount-1;
	}

 

So the App has to run to get these changed Settings?

Link to comment
Share on other sites

T7250 2Ghz with 7 (0-7) Pstates: 2000-1800-1600-1400-1200-1000-800-600. I disabled the EFI FSB in Info.plist, if its enabled, it gets wrong FSB - 183Mhz.

 

*With Coolbook it works fine with 600Mhz, the throttling level is set to very high.

 

 

With these settings it feels it smooth.

 

scheduledTimerWithTimeInterval:0.2

 

 

		if(load > 0.95){	// up to highest
		newState = 0;
	} else if(load > 0.1){
		if(newState > 0)
			newState -= 1;
	} else if(load < 0.1){
		newState += 1;
	} else if(load < 0.1){	// down to lowest
		newState = _pstateCount-1;
	}

 

So the App has to run to get these changed Settings?

It's App which does throttling. So, p-state never changes if App is not running. Does p-state change to the lowest with such settings you made ( at workload = 10%, p-state is raised ) ?

Link to comment
Share on other sites

Tested pstate with C2D E7300 2.66 GHZ/266MHz*10 OC @ 3.0 GHZ / 333 MHz*9

Works !

BUT , major problem : In Voodoopower or minipower (leo 32 Bit) there is an key in .plist which can set Pstate Limit Highest higher than 0.

Means if set to 1, cpu never will set to P-State 0.

I need this (used with Leo minivoodoopower with success !) because if pstate is set to 0, 10* 333 is much to high = KP. 3330 MHz too high. In my BIOS FSB Multi set to 9.

Can you add this P-State high(low) Limits keys in .plist for usage in the new 64 Bit version too ?

Thanks

Bildschirmfoto_2009_09_28_um_20.07.58.jpg

Link to comment
Share on other sites

Can you add this P-State high(low) Limits keys in .plist for usage in the new 64 Bit version too ?

 

Thanks.

 

It is possible to put the limits into application preference rather than kext plist.

I will write some code to save limits, interval and thresholds in preference soon.

Link to comment
Share on other sites

I updated the donwload link in my first post.

It supports preference now.

 

THANKS!

 

But how can i set that PstateLimit High (fastest) to 1 ?

I started the Pstatechanger, PREFS and changed the P-Min (is that same as PstateLimitHigh in screenshoot i have in voodoopower?) but i only hear "DONG", error beep. If i leave the Pstatechanger and run again the vefore added new values are not saved. I clicked APPLY + SAVE but onl heared the DONG sound.

Also no .plist was created in the preferences (home).

 

I must have that Pstate Limit before i can load the .kext, because without that KP if short Pstate 0.

 

Can i put that key (which name ?) in the .kext itself as an workaround ?

 

Here the screenshoot of my voodoopower .plist, which works perfect chaning that Limit from 0 > 1

Bildschirmfoto_2009_10_01_um_20.38.44.jpg

Link to comment
Share on other sites

Maybe the calulation from the right VID to mV is other than expected.

For my knowledge there are 2 ways to calculate them , depends on cpu type.

Also an reason why for example MSR tool shows other mV than voodoopower , even both use same VID (hex)!

Link to comment
Share on other sites

THANKS!

 

But how can i set that PstateLimit High (fastest) to 1 ?

I started the Pstatechanger, PREFS and changed the P-Min (is that same as PstateLimitHigh in screenshoot i have in voodoopower?) but i only hear "DONG", error beep. If i leave the Pstatechanger and run again the vefore added new values are not saved. I clicked APPLY + SAVE but onl heared the DONG sound.

Also no .plist was created in the preferences (home).

 

I must have that Pstate Limit before i can load the .kext, because without that KP if short Pstate 0.

 

Can i put that key (which name ?) in the .kext itself as an workaround ?

 

Here the screenshoot of my voodoopower .plist, which works perfect chaning that Limit from 0 > 1

You hear "DONG" if you set pstate-min (highest) > p-state max (lowest). Did you change only pstate-min from default ?

Link to comment
Share on other sites

I only want to change PstateLimitHigh (so named in voodoopower .plist, Screenshoot 2 post above) from 0 > 1.

What the key name in the pref i must change ? One was 0 one was -1 by default.

Set p-state max to 1 ( default = 0 ) and leave p-state max as is ( default = 4 ? ).

Link to comment
Share on other sites

 Share

×
×
  • Create New...