Jump to content

64bit p-state


  • Please log in to reply
128 replies to this topic

#61
hnak

hnak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 285 posts
  • Gender:Male

yes... v1.0.3 uses twice the cpu %.

You check the cpu % with Performance monitor ?

It can be caused by the default timer interval difference if you use the default preference values.
If you use the same timer interval, the difference may be due to doc icon update.
The only other difference is releasing memory in 1.0.3 to fix memory leak bug.

#62
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,874 posts
  • Gender:Male
  • Location:Stuttgart / Germany
Hint:
You can set the interval of refreshing / sec of the controller app in his Pref.
Simple set higher value from 400 mS to 1000mS. 1 refresh / sec is enough to show changes.
For my knowledge this didnt change the speed of trotthling, its only cosmetic for showing faster/slower (less cpu %) the results.

I found an key in the .kext .plist which may do also change cpu % usage of the trottling background .kext itself.
There is an default of 100 . I believe that stands for 100mS interval checking cpu load and compute to throttle or not throtthle. 10 times / sec (100 mS) maybe very fast (and noticable cpu usage of the kext itself !) . I switched to 200 (ms), means 5 times / Sec . Even 300 may be fast enough (3 times / Sec) to check+do throttling. The higher that value the slower the reaction of thotthling if cpu load changed.
But 200 - 300 mS may fast enough to avoid noticable system slowness if cpu load rised and throttling up was a bit to slow.

#63
pug999

pug999

    InsanelyMac Protégé

  • Members
  • Pip
  • 11 posts
good job !!! ;) :P :P

In your new ver.

I have no sleep problem.

and

How about add menu bar funtion?

I think it will better than dock icon....

#64
hnak

hnak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 285 posts
  • Gender:Male

In your new ver.

I have no sleep problem.

It's strange.
As my systems have never succeeded in sleep, I have no way to investigate it.

How about add menu bar funtion?

I think it will better than dock icon....

As the menu bar is regarded as Apple-reserved, they discourage using it as far as I know.
If you ( or someone else ) are interested in building a menubar app, http://www.makeuseof...ations-for-mac/ might be a good reference.

#65
haraldschmidt

haraldschmidt

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
Hey hnak,

thanks sooo much ! Great work ! I was using voodoopower and stayed in 32 bit mode due to powermanagement and leaking driver support for my 3g modem (usb stick)...

But now completly in 64 bit mode with fast system reaction and even cooler temps...

Everything runs sooo cool around mid 30 degree temps...

QUESTION: can I rely on the temps in the control app? What TjMax Temp is used? I'm running a T8300 should be 105 or 100 degrees I think...

I really love the undervolting part, can't wait to see how my battery lifetime will develop...



Thanks a lot,

Harry

PS: for menubar integration maybe superhai is a help, his control.app had a hide to bar functionality

#66
hnak

hnak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 285 posts
  • Gender:Male

QUESTION: can I rely on the temps in the control app? What TjMax Temp is used? I'm running a T8300 should be 105 or 100 degrees I think...

PS: for menubar integration maybe superhai is a help, his control.app had a hide to bar functionality

About TjMax, please check the code ( intel.cpp ). I just modified VoodooPower's code to return absolute temperature instead of a value relative to TjMax. TjMax extraction code is untouched.

For menubar, I am just lazy enough to be satisfied with doc icon or using spaces to make it disappear for now.
I will think about UI after Core i5.

#67
marionez

marionez

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 425 posts
1.0.3 SL download link on first post is not working

#68
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,268 posts
  • Gender:Male
I've found that on my laptop (dell studio xps 1340) the super-lfm pstates cause the system to lock-up hard as soon as voodoopstate or voodoopower is run. I reported this to superhai with a fix a while back but he didn't integrate any support into voodoopower. Linux&windows don't have a problem with p-states on this laptop, but linux and apparently windows just pick up the min-max levels from the ACPI dynamic pstate tables (_PSS in the dynamic SSDT tables), which for this laptop, don't include the super-lfm states.

So here is a patch for VoodooPState that disables the super-lfm p-states if broken_lfm is set. I think it would be nice to make this a config option in Info.plist.

PS: Thanks for picking up where voodoopower left off; I think voodoopstate is really handy.

Edit: Better diffs included in my next post, 2 posts below.

#69
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,874 posts
  • Gender:Male
  • Location:Stuttgart / Germany
Hi, i see that teh 64 Bit version does also shows the 0.5 * Pstates (screenshoot) in SL.
With same dsdt (here my Pstates) in Leo + Leo Version of Pstates that also x.5 Steps are not shown , means not 7 Pstates (dsdt) only 4 with x.0 stepsshown.

Can the dev look into the codes if Leo Version code has some differences that it cant show that x.5 Pstates.
Also would be nice to know its only an cosmetic problem (not showing that x.5 steps) but using them, or also not using them if not shown.

mitchs Pstates with also x.5 * FSB Steps / SL.

Attached Files



#70
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,268 posts
  • Gender:Male
Here's a new version of my super-LFM patch. It also includes a fix for a rounding error in intel_probe(), where cumulative rounding errors in vidstep causes the p-states to use higher frequencies than necessary.

The rounding problem is independent of the LFM problem, and also exists in the VoodooPower version of this code.

With this change, my 6x p-state runs with .0125v less :)

*** intel.orig.cpp	2009-10-20 00:03:32.000000000 -0700
--- intel.cpp	2009-11-06 13:49:04.145023634 -0800
***************
*** 92,97 ****
--- 92,99 ----
  
  bool intel_probe(VoodooPState* vp)
  {
+	 bool broken_lfm = true;
+ 
	  // assign callbacks
	  vp->VoodooReadProc = IntelReadProc;
	  vp->VoodooWriteProc = IntelWriteProc;
***************
*** 304,317 ****
	  if (vp->PStateControl) {
		  vp->PStateCount = Maximum.cid - Minimum.cid + 1;
		  if (vp->PStateCount > PStateCountMax) vp->PStateCount = PStateCountMax;
-		 UInt8 vidstep;
		  UInt8 i = 0, invalid = 0;
!		 vidstep = ((Maximum.vid << 2) - (Minimum.vid << 2)) / (vp->PStateCount - 1);
		  for (UInt8 u = 0; u < vp->PStateCount; u++) {
			  i = u - invalid;
			  vp->PState[i].cid = Maximum.cid - u;
			  vp->PState[i].fid = (vp->PState[i].cid >> 1);
			  if (vp->PState[i].fid < 0x6) {
				  if (vp->Intel_DynamicFSB) vp->PState[i].fid = (vp->PState[i].fid << 1) | 0x80;
			  } else {
				  if (vp->NonIntegerBusRatio) vp->PState[i].fid = vp->PState[i].fid | (0x40 * (vp->PState[i].cid & 0x1));
--- 306,336 ----
	  if (vp->PStateControl) {
		  vp->PStateCount = Maximum.cid - Minimum.cid + 1;
		  if (vp->PStateCount > PStateCountMax) vp->PStateCount = PStateCountMax;
		  UInt8 i = 0, invalid = 0;
!		 UInt8 u, cid;
! 
!		 if (broken_lfm) {
!			 /* Subtract off super lfm P-state entries */
!			 for (u = 0; u < vp->PStateCount; u++) {
!				 cid = Maximum.cid - u;
!				 if ((cid >>1) < 0x6) {
!					 break;
!				 }
!			 }
!			 if (u) {
!				 Minimum.cid = cid+1;
!				 vp->PStateCount = Maximum.cid - Minimum.cid + 1;
!			 }
!		 }
		  for (UInt8 u = 0; u < vp->PStateCount; u++) {
			  i = u - invalid;
			  vp->PState[i].cid = Maximum.cid - u;
			  vp->PState[i].fid = (vp->PState[i].cid >> 1);
			  if (vp->PState[i].fid < 0x6) {
+				 if (broken_lfm) {
+					 invalid++;
+					 continue;
+				 }
				  if (vp->Intel_DynamicFSB) vp->PState[i].fid = (vp->PState[i].fid << 1) | 0x80;
			  } else {
				  if (vp->NonIntegerBusRatio) vp->PState[i].fid = vp->PState[i].fid | (0x40 * (vp->PState[i].cid & 0x1));
***************
*** 321,333 ****
					  invalid++;
				  }
			  }
-			 vp->PState[i].vid = ((Maximum.vid << 2) - (vidstep * u)) >> 2;
		  }
		  vp->PStateCount -= invalid;
		  if (!vp->PStateCount) {
			  ErrorLog("Insane P-State values");
			  return false;
		  }
	  } else {
		  return false;
	  }
--- 340,357 ----
					  invalid++;
				  }
			  }
		  }
		  vp->PStateCount -= invalid;
		  if (!vp->PStateCount) {
			  ErrorLog("Insane P-State values");
			  return false;
		  }
+		 /* Avoid cumulative roundoff errors in vidstep by computing
+			delta directly */
+		 for (i = 0; i < vp->PStateCount; i++) {
+			 vp->PState[i].vid = Maximum.vid -
+				 ((Maximum.vid - Minimum.vid)*i / (vp->PStateCount - 1));
+		 }
	  } else {
		  return false;
	  }


#71
cparm

cparm

    InsanelyMac Legend

  • Retired
  • 997 posts
  • Gender:Male
guys, i move it to: The X labs > intel speedstep

#72
Brewers

Brewers

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
Hey,

I still encounter cursor jumping when the tool changes the Pstate. Interval is set to 250ms. Did anyone else encounter this problem?

#73
mitch_de

mitch_de

    InsanelyMacaholic

  • Local Moderators
  • 2,874 posts
  • Gender:Male
  • Location:Stuttgart / Germany

Here's a new version of my super-LFM patch. It also includes a fix for a rounding error in intel_probe(), where cumulative rounding errors in vidstep causes the p-states to use higher frequencies than necessary.

The rounding problem is independent of the LFM problem, and also exists in the VoodooPower version of this code.

With this change, my 6x p-state runs with .0125v less :)

[code=auto:0] *** intel.cpp 2009-10-20 00:03:32.000000000 -0700
--- intel.cpp.new2 2009-11-05 15:38:00.913023711 -0800
***************
*** 92,97 ****
--- 92,99 ----

bool intel_probe(VoodooPState* vp)
{
+ bool broken_lfm = true;
+


Can you upload scuh an modded ready to run build somewhere.
Doe this also is for Leo version of VoodooPstate ?
Thanks

#74
Smith@@™

Smith@@™

    InsanelyMac LOL

  • Retired
  • 2,928 posts
  • Gender:Male
  • Location:Somewhere over the rainbow...ITALIA!
  • Interests:Dark matter and dark energy. E basta. HD3000. E basta.
Is there a new kext for pstate? I don't understand. If yes, when it will possible to download?

#75
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,268 posts
  • Gender:Male

Can you upload scuh an modded ready to run build somewhere.
Doe this also is for Leo version of VoodooPstate ?

I've posted a build of just my modified voodoopstate.kext, based upon hnak's 1.0.3 version, in this thread, specifically here's the kext
Update: New version, v4, here

I built with hnak's default settings, which means it's a 10.6 only bundle. 10.5.x kexts would have to be built separately.

#76
Smith@@™

Smith@@™

    InsanelyMac LOL

  • Retired
  • 2,928 posts
  • Gender:Male
  • Location:Somewhere over the rainbow...ITALIA!
  • Interests:Dark matter and dark energy. E basta. HD3000. E basta.
I have try the voodooPstate v2 and it works, but with this version i have lost one pstate; with the "original" version, i have 4 pstate and all 4 pstate work well, looking cpu-x and voodoomonitor, but with v2 i have lost the 3 pstate, the lower, that with multiplier lower (in this case that with multiplier 6), now it is normal or I must come back to voodoopstate unmodded, "original" ? (Original pstate with unmodded version are with multiplier 7.5, 7, 6.5 and 6)

Thank you for answer and sorry for my english -_-

Ciao

#77
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,268 posts
  • Gender:Male

I have try the voodooPstate v2 and it works, but with this version i have lost one pstate; with the "original" version, i have 4 pstate and all 4 pstate work well, looking cpu-x and voodoomonitor, but with v2 i have lost the 3� pstate, the lower, that with multiplier lower (in this case that with multiplier 6), now it is normal or I must come back to voodoopstate unmodded, "original" ? (Original pstate with unmodded version are with multiplier 7.5, 7, 6.5 and 6)

Ah, I wasn't careful enough with non-integer multipliers. I've made a new version that should handle that (though I cannot test it with my osx laptop). Will also update the diffs in my prior post in a sec...

#78
hnak

hnak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 285 posts
  • Gender:Male

I built with hnak's default settings, which means it's a 10.6 only bundle. 10.5.x kexts would have to be built separately.

Attached File  VoodooPState_leo.xcodeproj.zip   14.58KB   28 downloads
Here is the xcode project file to build 10.5 kext.

#79
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,268 posts
  • Gender:Male

Attached File  VoodooPState_leo.xcodeproj.zip   14.58KB   28 downloads
Here is the xcode project file to build 10.5 kext.

Great. So what do you think, an info.plist entry such as "UseLFM" that can be set to false for systems that lock up on LFM p-states? I can add parsing for that.

#80
rals2007

rals2007

  • Members
  • PipPipPipPipPipPipPip
  • 625 posts
  • Gender:Male
bcc9


With your build, will it work even without using the monitoring app ?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy