Contribute
Register

Quick Guide to Generate a SSDT for CPU Power Management

I'm hoping for some help.

Had a working system on 10.12.4 but had to update yesterday to use some new XCODE files. Anyway upon updating I've lost turbo boost. The CPU just sticks at 3.2 Ghz. I haven't changed anything yet incase I break something. Do I need to update my SSDT?

I noticed after running AppleIntelInfo.kext I'm not generating any CSTATES. I'll post my results below.

When I updated from 10.11 to 10.12 I had the same issue which I fixed by deleting the NullCPUPowerManagement kext.

I'm running on a X79 mobo with a 3930k. I usually overclock to 4.5 Ghz also.


Settings:
------------------------------------
logMSRs............................: 1
logIGPU............................: 0
logIntelRegs.......................: 1
logCStates.........................: 1
logIPGStyle........................: 1
InitialTSC.........................: 0x216278097354
MWAIT C-States.....................: 135456

Model Specific Regiters
------------------------------------
MSR_CORE_THREAD_COUNT......(0x35) : 0x6000C
MSR_PLATFORM_INFO..........(0xCE) : 0xC0070012000
MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x1E000400
MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x10414
IA32_MPERF.................(0xE7) : 0x983CB867EA2
IA32_APERF.................(0xE8) : 0x9834F7796DB
MSR_FLEX_RATIO.............(0x194) : 0xE0000
MSR_IA32_PERF_STATUS.......(0x198) : 0x245900002000
MSR_IA32_PERF_CONTROL......(0x199) : 0x2000
IA32_CLOCK_MODULATION......(0x19A) : 0x0
IA32_THERM_STATUS..........(0x19C) : 0x88230000
IA32_MISC_ENABLES..........(0x1A0) : 0x850089
MSR_MISC_PWR_MGMT..........(0x1AA) : 0x400000
MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x2323232324252626
IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x0
MSR_POWER_CTL..............(0x1FC) : 0x2504005B
MSR_RAPL_POWER_UNIT........(0x606) : 0xA1003
MSR_PKG_POWER_LIMIT........(0x610) : 0x69F40005A9F40
MSR_PKG_ENERGY_STATUS......(0x611) : 0xB4A5EA6D
MSR_PKG_POWER_INFO.........(0x614) : 0x1A80410
MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x141494800007F8
MSR_PP0_POWER_LIMIT........(0x638) : 0x0
MSR_PP0_ENERGY_STATUS......(0x639) : 0xE2FDF9E5
MSR_PP0_POLICY.............(0x63a) : 0x0
MSR_PKGC6_IRTL.............(0x60b) : 0x0
MSR_PKGC7_IRTL.............(0x60c) : 0x0
MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x0
MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x0
MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0
MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x0
IA32_TSC_DEADLINE..........(0x6E0) : 0x21627A930F5C
PCH device.................: 0x1D418086

CPU Ratio Info:
------------------------------------
CPU Low Frequency Mode.............: 1200 MHz
CPU Maximum non-Turbo Frequency....: 3200 MHz
CPU Maximum Turbo Frequency........: 3800 MHz
CPU P-States [ (32) ]
bash-3.2#​
 
Today I upgraded and prepped High Sierra for some new hardware (GA-H270N-WIFI and i7-7700K). Everything felt very sluggish... scrolling on a web page, minimizing and maximizing windows, switching tabs in various applications, clicking on contacts in Skype, switching desktops, etc... CPU and GPU benchmarks all passed with flying colors

All of these symptoms shared an attribute: it only happens when a CPU intensive task begins and only for a split second...almost like we only have a couple P states being utilized. I spun up a single-threaded encode with ffmpeg and everything magically felt buttery-smooth again. Removed NullCPUPowerManagement.kext (this alone did not resolve the issue), installed the auto-generated SSDT (thanks to Piker-Alpha/ssdtPRGen.sh), and rebooted...BOOM we're in business! This is one of the best communities!

TLDR: High Sierra with i7-7700K was sluggish af. Removed NullCPUPowerManagement.kext and installed proper SSDT.


EDIT: It turns out that the problem was deeper than the CPU power management. I ended up installing SSDT-XCPM.aml for native power management and that has so far been far better than the generated SSDT. However, there were still issues following that...turns out it's a display scaling / hidpi memory leak with High Sierra using UHD resolution. The second I disable display scaling, everything finally felt like I had actually upgraded my hardware. After doing some research, I believe this issue should be fixed in 10.13.2. Side note: this was an issue with a few previous versions of OSX...so hopefully it's a quick fix.
 
Last edited:
So when X86PlatformPlugin loads and FrequencyVectors are used, where does XCPM gets the min/max ratios? From the FrequencyVectors?

Because if I edit my max multiplier in my BIOS, it does affect max freqs, and if max freqs were coming from the vectors, it shouldn't.

FrequencyVectors is certainly a contribution, provided there is a match for your CPU in the plist.
Other factors, such as BIOS actions may come into play.
 
I Have Gigabyte x79-UP4 with i7 3820...
and here is my result

Settings:

------------------------------------

logMSRs............................: 1

logIGPU............................: 0

logIntelRegs.......................: 1

logCStates.........................: 1

logIPGStyle........................: 1

InitialTSC.........................: 0x1d4bc07981ff

MWAIT C-States.....................: 135456


Model Specific Regiters

------------------------------------

MSR_CORE_THREAD_COUNT......(0x35) : 0x40008

MSR_PLATFORM_INFO..........(0xCE) : 0xC0070012400

MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x1E008407

MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x10414

IA32_MPERF.................(0xE7) : 0x737ED64FA8C

IA32_APERF.................(0xE8) : 0x6D00A81F32C

MSR_FLEX_RATIO.............(0x194) : 0xC0000

MSR_IA32_PERF_STATUS.......(0x198) : 0x28D500002500

MSR_IA32_PERF_CONTROL......(0x199) : 0x2500

IA32_CLOCK_MODULATION......(0x19A) : 0x0

IA32_THERM_STATUS..........(0x19C) : 0x882E0000

IA32_MISC_ENABLES..........(0x1A0) : 0x850089

MSR_MISC_PWR_MGMT..........(0x1AA) : 0x1

MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x2525252525252626

IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x0

MSR_POWER_CTL..............(0x1FC) : 0x2504005B

MSR_RAPL_POWER_UNIT........(0x606) : 0xA1003

MSR_PKG_POWER_LIMIT........(0x610) : 0x5EFFD0005EEA82

MSR_PKG_ENERGY_STATUS......(0x611) : 0xF616C5B1

MSR_PKG_POWER_INFO.........(0x614) : 0x1400410

MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x1814149400001F40

MSR_PP0_POWER_LIMIT........(0x638) : 0x5EFFD0

MSR_PP0_ENERGY_STATUS......(0x639) : 0xB2412B0A

MSR_PP0_POLICY.............(0x63a) : 0x0

MSR_PKGC6_IRTL.............(0x60b) : 0x0

MSR_PKGC7_IRTL.............(0x60c) : 0x0

MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x0

MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x0

MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0

MSR_PKG_C7_RESIDENCY.......(0x3fa) : 0x0

IA32_TSC_DEADLINE..........(0x6E0) : 0x1D4BC1675E27

PCH device.................: 0x1D418086


CPU Ratio Info:

------------------------------------

CPU Low Frequency Mode.............: 1200 MHz

CPU Maximum non-Turbo Frequency....: 3600 MHz

CPU Maximum Turbo Frequency........: 3800 MHz

CPU P-States [ (12) 35 37 ]

CPU P-States [ 12 32 35 (37) ]

CPU P-States [ (12) 32 35 36 37 ]

CPU P-States [ 12 31 32 35 36 (37) ]

CPU P-States [ (12) 29 31 32 35 36 37 ]

CPU P-States [ (12) 29 30 31 32 35 36 37 ]

CPU P-States [ 12 29 30 31 32 34 35 36 (37) ]

bash-3.2#


it`s that normal ?? thank you
 
I'm having some slowness when switching tabs/full-screen apps for instance that I suspect is the CPU running at 800mhz all of sudden needing more juice, but I'm not sure. What should I do? Is disabling speedstep on CPU the proper way? Can I change the LFM to a higher value?

Here's the kext cpu info output:

Settings:
------------------------------------
logMSRs............................: 1
logIGPU............................: 0
logIntelRegs.......................: 1
logCStates.........................: 1
logIPGStyle........................: 1
InitialTSC.........................: 0x2708a597c7a
MWAIT C-States.....................: 1319200

Model Specific Regiters
------------------------------------
MSR_CORE_THREAD_COUNT......(0x35) : 0x40004
MSR_PLATFORM_INFO..........(0xCE) : 0x80838F1012600
MSR_PMG_CST_CONFIG_CONTROL.(0xE2) : 0x1E000000
MSR_PMG_IO_CAPTURE_BASE....(0xE4) : 0x31814
IA32_MPERF.................(0xE7) : 0x9AF179A773
IA32_APERF.................(0xE8) : 0xAC6E7E79FA
MSR_FLEX_RATIO.............(0x194) : 0xE0000
MSR_IA32_PERF_STATUS.......(0x198) : 0x2F00
MSR_IA32_PERF_CONTROL......(0x199) : 0x2F00
IA32_CLOCK_MODULATION......(0x19A) : 0x0
IA32_THERM_STATUS..........(0x19C) : 0x883B0000
IA32_MISC_ENABLES..........(0x1A0) : 0x850089
MSR_MISC_PWR_MGMT..........(0x1AA) : 0x401CC1
MSR_TURBO_RATIO_LIMIT......(0x1AD) : 0x2F2F2F2F
IA32_ENERGY_PERF_BIAS......(0x1B0) : 0x1
MSR_POWER_CTL..............(0x1FC) : 0x3C005F
MSR_RAPL_POWER_UNIT........(0x606) : 0xA0E03
MSR_PKG_POWER_LIMIT........(0x610) : 0x42FFFF001BFFFF
MSR_PKG_ENERGY_STATUS......(0x611) : 0x6249BDD
MSR_PKG_POWER_INFO.........(0x614) : 0x2D8
MSR_PP0_CURRENT_CONFIG.....(0x601) : 0x0
MSR_PP0_POWER_LIMIT........(0x638) : 0x0
MSR_PP0_ENERGY_STATUS......(0x639) : 0x0
MSR_PP0_POLICY.............(0x63a) : 0x0
MSR_PKGC6_IRTL.............(0x60b) : 0x8876
MSR_PKG_C2_RESIDENCY.......(0x60d) : 0x0
MSR_PKG_C3_RESIDENCY.......(0x3f8) : 0x0
MSR_PKG_C6_RESIDENCY.......(0x3f9) : 0x0
IA32_TSC_DEADLINE..........(0x6E0) : 0x2709299F060

CPU Ratio Info:
------------------------------------
CPU Low Frequency Mode.............: 800 MHz
CPU Maximum non-Turbo Frequency....: 3800 MHz
CPU Maximum Turbo Frequency........: 4700 MHz
CPU P-States [ 8 42 (47) ]
CPU C3-Cores [ 2 3 ]
CPU C6-Cores [ 0 1 3 ]
CPU P-States [ (8) 42 43 47 ]
CPU C3-Cores [ 1 2 3 ]
CPU C6-Cores [ 0 1 2 3 ]
CPU C3-Cores [ 0 1 2 3 ]
CPU P-States [ (8) 30 42 43 47 ]
CPU P-States [ (8) 30 32 42 43 47 ]
CPU P-States [ 8 28 30 32 (38) 42 43 47 ]
CPU P-States [ (8) 28 30 32 38 42 43 44 47 ]
CPU P-States [ 8 28 30 32 (38) 42 43 44 46 47 ]
CPU P-States [ (8) 28 30 32 38 42 43 44 45 46 47 ]
CPU P-States [ 8 25 28 30 32 (38) 42 43 44 45 46 47 ]
CPU P-States [ (8) 25 26 28 30 32 38 42 43 44 45 46 47 ]
CPU P-States [ (8) 24 25 26 28 30 32 38 42 43 44 45 46 47 ]
CPU P-States [ (8) 24 25 26 27 28 30 32 38 42 43 44 45 46 47 ]
CPU P-States [ (8) 24 25 26 27 28 30 31 32 38 42 43 44 45 46 47 ]
CPU P-States [ 8 21 24 25 26 27 28 30 31 32 (38) 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 24 25 26 27 28 30 31 32 35 38 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 24 25 26 27 28 30 31 32 35 36 38 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 23 24 25 26 27 28 30 31 32 35 36 38 42 43 44 45 46 47 ]
CPU P-States [ 8 21 22 23 24 25 26 27 28 30 31 32 35 36 (38) 42 43 44 45 46 47 ]
CPU P-States [ 8 21 22 23 24 25 26 27 28 30 31 32 35 36 (38) 41 42 43 44 45 46 47 ]
CPU P-States [ 8 21 22 23 24 25 26 27 28 30 31 32 35 36 38 40 41 42 43 44 45 46 (47) ]
CPU P-States [ (8) 21 22 23 24 25 26 27 28 30 31 32 34 35 36 38 40 41 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 38 40 41 42 43 44 45 46 47 ]
CPU P-States [ 8 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 (38) 40 41 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 44 45 46 47 ]
CPU P-States [ (8) 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]
CPU P-States [ (8) 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]
 
I'm having trouble compiling my ddst for my i5-660 oc to 4 ghz

After putting
i5-660,73,1200,3330,3600,2,4,0,133
In the user Define.cgf file and run:
~/ssdtPRGen.sh -p i5-660 -f 4000 -bclk 166

I get this output
Code:
ssdtPRGen.sh v0.9 Copyright (c) 2011-2012 by † RevoGirl
v6.6 Copyright (c) 2013 by † Jeroen
v21.5 Copyright (c) 2013-2017 by Pike R. Alpha

Bugs > https://github.com/Piker-Alpha/ssdtPRGen.sh/issues <

System information: Mac OS X 10.12.6 (16G29)
Brandstring: "Intel(R) Core(TM) i5 CPU 660 @ 3.33GHz"

Override value: (-p) processor model, now using: i5-660!
Override value: (-f) clock frequency, now using: 4000 MHz!
Override value: (-bclk) frequency, now using: 166 MHz!

Version: models.cfg v171 / User Defined.cfg v-1

Scope (_PR_) {320 bytes} with ACPI Processor declarations found in DSDT (ACPI 1.0 compliant)
Notice: Downloading Restrictions.cfg ...
Generating ssdt.dsl for a 'iMac12,1' with board-id [Mac-F60DEB81FF30ACF6]
Unknown Core i5-660 processor [0x20652] setup [0x]
With a maximum TDP of 73 Watt, as specified by Intel
Number logical CPU's: 4 (Core Frequency: 4000 MHz)
Number of Turbo States: 0
Number of P-States: 19 (1200-3600 MHz)
Injected C-States for ._PR (C1,C3,C6)

Warning: 'board-id' [Mac-F60DEB81FF30ACF6] is not supported by Unknown power management
Warning: 'system-type' may be set improperly (1 instead of 0)
- Clover users should read https://clover-wiki.zetam.org/Configuration/ACPI#acpi_smartupsNotice: Downloading iasl.zip ...

Compiling: ssdt_pr.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140926-64 [Nov 6 2014]
Copyright (c) 2000 - 2014 Intel Corporation

Compiler aborting due to parser-detected syntax error(s)
/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 20: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 20: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 20: External (_PR_.._PR, DeviceObj)
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting ')' ^

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 21: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 21: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 21: External (_PR_.._PR, DeviceObj)
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting ')' ^

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 22: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 22: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 22: External (_PR_.._PR, DeviceObj)
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting ')' ^

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 23: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 23: External (_PR_.._PR, DeviceObj)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 23: External (_PR_.._PR, DeviceObj)
Error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting ')' ^

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 25: Scope (_PR_.._PR)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 25: Scope (_PR_.._PR)
Error 6126 - ^ Invalid character (0x2E), expecting ASL keyword or name

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 25: Scope (_PR_.._PR)
Error 6126 - ^ syntax error, unexpected PARSEOP_NAMESEG, expecting ')'

/Users/Phoenix/Library/ssdtPRGen/ssdt.dsl 132:
Error 6126 - syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

ASL Input: /Users/Phoenix/Library/ssdtPRGen/ssdt.dsl - 132 lines, 4530 bytes, 24 keywords

Compilation complete. 16 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
Error: IASL status: 255 (Failed)

What i'm doing wrong?
 
Is this guide still up to date? I'm guessing I don't have power management, so I'm using more power than I should most of the time. My hackintosh has the iMac 14,2 SMBIOS but I have the i5 3570K Ivy Bridge CPU and it has been working just fine (though I think only at steady 3,41GHz).
 
Hi all,
I have a problem, I've generated the ssdt file and put it in clover -> ACPI -> patched, restarted the system but the speedstep still doesn't work, the CPU frequency is always stuck at 3.7 GHz. I'm using osx 10.10.5 on my Desktop. Do you have some advice for me? Which could be the problem?

Thanks you
 
Back
Top