syscl / CPUTune

An open source kernel extension enables dynamic CPU performance tuning at runtime for macOS.
165 stars 37 forks source link

for syscl #7

Closed christophe-duc closed 4 years ago

christophe-duc commented 4 years ago

Hi, sorry don't know how to contact you directly to have a chat :)

I am still trying to understand why Turboboost needs to be off when battery is out, and I have analyzed some of the IOPlatformPlugins and especially X86PlatformShim, where I think the problem is coming from.

Would you be able to share what you see from the IOReg with a battery and turboboost disabled for the following keys (they are under the X86PlatformPlugin)?

Screen Shot 2020-06-03 at 16 30 21

Thanks

syscl commented 4 years ago

@christophe-duc tldr, just saw this message. Are you still in need of my ioreg? I can try to attach it here

christophe-duc commented 4 years ago

If you have time, it would be great.

I am thinking of creating a slack or discord so we can talk more interactively, any preference for you?

On 9Jun, 2020, at 14:17, syscl notifications@github.com wrote:

@christophe-duc https://github.com/christophe-duc tldr, just saw this message. Are you still in need of my ioreg? I can try to attach it here

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/syscl/CPUTune/issues/7#issuecomment-641457537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4E7VYFM4MFHVB65VD6EFLRVZVEPANCNFSM4NR6Z2EA.

syscl commented 4 years ago

@christophe-duc slack sounds good to me :)

syscl commented 4 years ago

@christophe-duc here's the info with turbo disabled with battery image

here's the running log

CPUInfo:47: cpu model: 0x9e, supported HWP, number of cores: 6, turbo ratio limit permission: RW
DEBUG getProperty:68: cpu-tune-panic not existed in NVRAM property
init:64: Update time interval 1000 ms per cycle
init:67: succeeded!
disableTurboBoost:288: change 0x850089 to 0x4000850089 in MSR_IA32_MISC_ENABLE(0x1a0)
disableProcHot:299: change 0x64005f to 0x64005e in MSR_IA32_POWERCTL(0x1fc)
enableSpeedShift:322: 0x1 in MSR_IA32_PM_ENABLE(0x770) remains the same
start:152: registerService
stop:349: restore MSR_IA32_POWER_CTK from 0x64005e to 0x64005f
stop:353: restore MSR_IA32_MISC_ENABLE from 0x4000850089 to 0x850089
stop:362: restore MSR_IA32_PM_ENABLE from 0x1 to 0x0