Contribute
Register

Quick Guide to Generate a SSDT for CPU Power Management

1st Scenario:

I run this commands and I get the next output:

Mac-Pro-de-pablo-2:~ pablo$ kextstat|grep -y x86plat

Mac-Pro-de-pablo-2:~ pablo$ kextstat|grep -y null

13 0 0xffffff7f80eb5000 0x2000 0x2000 org.tgwbd.driver.NullCPUPowerManagement (1.0.0d2) 93D39664-55FB-9220-39AD-A436B33DB160 <7 4 3>

Mac-Pro-de-pablo-2:~ pablo$ sudo cat /tmp/AppleIntelInfo.dat

AppleIntelInfo.kext v1.8c Copyright © 2012-2016 Pike R. Alpha. All rights reserved

Settings:
------------------------------------------
logMSRs..................................: 1

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

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

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

Warning: Clover hw.busfrequency error detected : 17d78400

InitialTSC...............................: 0x1423b723760e (671 MHz)

MWAIT C-States...........................: 8480


Processor Brandstring....................: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz


Processor Signature..................... : 0x306F2

------------------------------------------
- Family............................... : 6

- Stepping............................. : 2

- Model................................ : 0x3F (63)

Model Specific Registers (MSRs)

------------------------------------------
MSR_CORE_THREAD_COUNT............(0x35) : 0x0
------------------------------------------

- Core Count........................... : 6

- Thread Count......................... : 12


MSR_PLATFORM_INFO................(0xCE) : 0x20080C3BF3812100

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

- Maximum Non-Turbo Ratio.............. : 0x21 (3300 MHz)

- Ratio Limit for Turbo Mode........... : 1 (programmable)

- TDP Limit for Turbo Mode............. : 1 (programmable)

- Low Power Mode Support............... : 1 (LPM supported)

- Number of ConfigTDP Levels........... : 1 (additional TDP level(s) available)

- Maximum Efficiency Ratio............. : 12

- Minimum Operating Ratio.............. : 8


MSR_PMG_CST_CONFIG_CONTROL.......(0xE2) : 0x8400

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

- I/O MWAIT Redirection Enable......... : 1 (enabled, IO read of MSR(0xE4) mapped to MWAIT)

- CFG Lock............................. : 1 (MSR locked until next reset)

- C3 State Auto Demotion............... : 0 (disabled/unsupported)

- C1 State Auto Demotion............... : 0 (disabled/unsupported)

- C3 State Undemotion.................. : 0 (disabled/unsupported)

- C1 State Undemotion.................. : 0 (disabled/unsupported)

- Package C-State Auto Demotion........ : 0 (disabled/unsupported)

- Package C-State Undemotion........... : 0 (disabled/unsupported)


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

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

- LVL_2 Base Address................... : 0x414

- C-state Range........................ : 1 (C6 is the max C-State to include)

IA32_MPERF.......................(0xE7) : 0x13FF2195C5

IA32_APERF.......................(0xE8) : 0xF5FA125F5


MSR_FLEX_RATIO...................(0x194) : 0xE0000

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


MSR_IA32_PERF_STATUS.............(0x198) : 0x1F7100002200

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

- Current Performance State Value...... : 0x2200 (3400 MHz)


MSR_IA32_PERF_CONTROL............(0x199) : 0x2400

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

- Target performance State Value....... : 0x2400 (3600 MHz)

- Intel Dynamic Acceleration........... : 0 (IDA engaged)


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

IA32_THERM_STATUS................(0x19C) : 0x88420000


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

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

- Fast-Strings......................... : 1 (enabled)

- Automatic Thermal Control Circuit.... : 1 (enabled)

- Performance Monitoring............... : 1 (available)

- Enhanced Intel SpeedStep Technology.. : 1 (enabled)


MSR_TEMPERATURE_TARGET...........(0x1A2) : 0x690A00

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

- Turbo Attenuation Units.............. : 0

- Temperature Target................... : 105

- TCC Activation Offset................ : 0


MSR_MISC_PWR_MGMT................(0x1AA) : 0x400001

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

- EIST Hardware Coordination........... : 1 (disabled)


MSR_TURBO_RATIO_LIMIT............(0x1AD) : 0x2222222222222424

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


IA32_ENERGY_PERF_BIAS............(0x1B0) : 0x5

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

- Power Policy Preference...............: 5 (balanced performance and energy saving)


MSR_POWER_CTL....................(0x1FC) : 0x2904005B

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

- C1E Enable............................: 1


MSR_RAPL_POWER_UNIT..............(0x606) : 0xA0E03

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

- Power Units.......................... : 3 (1/8 Watt)

- Energy Status Units.................. : 14 (61 micro-Joules)

- Time Units .......................... : 10 (976.6 micro-Seconds)


MSR_PKG_POWER_LIMIT..............(0x610) : 0x7FFF80015FFF8

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

- Package Power Limit #1............... : 4095 Watt

- Enable Power Limit #1................ : 1 (enabled)

- Package Clamping Limitation #1....... : 1 (allow going below OS-requested P/T state during Time Window for Power Limit #1)

- Time Window for Power Limit #1....... : 10 (2560 milli-Seconds)

- Package Power Limit #2............... : 4095 Watt

- Enable Power Limit #2................ : 1 (enabled)

- Package Clamping Limitation #2....... : 1 (allow going below OS-requested P/T state setting Time Window for Power Limit #2)

- Time Window for Power Limit #2....... : 3 (20 milli-Seconds)

- Lock................................. : 0 (MSR not locked)


MSR_PKG_ENERGY_STATUS............(0x611) : 0x52F70B

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

- Total Energy Consumed................ : 331 Joules (Watt = Joules / seconds)


MSR_PKG_POWER_INFO...............(0x614) : 0x1280460

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

- Thermal Spec Power................... : 140 Watt

- Minimum Power........................ : 0

- Maximum Power........................ : 0

- Maximum Time Window.................. : 0


MSR_PP0_POWER_LIMIT..............(0x638) : 0x0


MSR_PP0_ENERGY_STATUS............(0x639) : 0x0


MSR_TURBO_ACTIVATION_RATIO.......(0x64C) : 0x0


MSR_CONFIG_TDP_NOMINAL...........(0x648) : 0x21

MSR_CONFIG_TDP_LEVEL1............(0x649) : 0x940000001E0460

MSR_CONFIG_TDP_LEVEL2............(0x64a) : 0x94000000000000

MSR_CONFIG_TDP_CONTROL...........(0x64b) : 0x0

MSR_TURBO_ACTIVATION_RATIO.......(0x64c) : 0x0

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

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

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


IA32_TSC_DEADLINE................(0x6E0) : 0x1423BBE0DC84


CPU Ratio Info:

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

Base Clock Frequency (BLCK)............. : 100 MHz

Maximum Efficiency Ratio/Frequency.......: 12 (1200 MHz)

Maximum non-Turbo Ratio/Frequency........: 33 (3300 MHz)

Maximum Turbo Ratio/Frequency............: 36 (3600 MHz)

P-State ratio * 100 = Frequency in MHz

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

CPU P-States [ (12) 26 34 ]

CPU C6-Cores [ 0 3 4 7 9 10 ]

CPU P-States [ (12) 14 26 34 ]

CPU C6-Cores [ 0 2 3 4 6 7 8 9 10 ]

CPU P-States [ (12) 13 14 26 34 ]

CPU P-States [ (12) 13 14 15 26 34 ]

CPU C6-Cores [ 0 1 2 3 4 6 7 8 9 10 ]

CPU P-States [ (12) 13 14 15 17 26 34 ]

CPU P-States [ (12) 13 14 15 17 20 26 34 ]

CPU P-States [ (12) 13 14 15 16 17 20 26 34 ]

CPU C6-Cores [ 0 1 2 3 4 6 7 8 9 10 11 ]

CPU P-States [ (12) 13 14 15 16 17 20 21 26 34 ]

CPU P-States [ (12) 13 14 15 16 17 20 21 23 26 34 ]

CPU P-States [ (12) 13 14 15 16 17 19 20 21 23 26 34 ]

CPU P-States [ 12 13 14 15 16 17 19 20 21 23 26 (33) 34 ]

CPU C6-Cores [ 0 1 2 3 4 5 6 7 8 9 10 11 ]

CPU P-States [ (12) 13 14 15 16 17 18 19 20 21 23 26 33 34 ]

CPU P-States [ (12) 13 14 15 16 17 18 19 20 21 23 25 26 33 34 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 23 25 26 30 (33) 34 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 23 25 26 30 33 34 (36) ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 23 25 26 30 32 (33) 34 36 ]

CPU P-States [ (12) 13 14 15 16 17 18 19 20 21 23 25 26 27 30 32 33 34 36 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 23 25 26 27 28 30 32 (33) 34 36 ]

CPU P-States [ (12) 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 30 32 33 34 36 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 32 (33) 34 36 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 31 32 33 34 (36) ]

CPU P-States [ (12) 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 ]

CPU P-States [ 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 (35) 36 ]

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


For my custom CPU SSDT that is always, on 1st and on 2nd scenarios, located on clover ACPI/patched folder. I also add -x 0 on ssdtPRgen.sh but no effect. With my real CPUID, the XCPM is always active.

------------------------------------------------------------------------------------------------------------------------------------------------
Mac-Pro-de-pablo-2:~ pablo$ sysctl machdep.xcpm

machdep.xcpm.mode:
1
 
Last edited:
XCPM Performance fall solution (Asus x99 Pro USB3.1 + i7 5820K, Haswell-E):

I've applied the next steps to fix the performance problem I described (low perf. on XCPM vs high perf. on NullCPUPowerManagement.kext + FakeCPUID)

Works on both (Sierra and El Capitan):

0.-No clover kernelPM, Asus AICPUPM, Haswell-E, or similar predefined Clover's patches. No FakeCPUID and delete NullCPUPowerManagement and AppleIntelCPUPowerManagement and AppleIntelCPUPowerManagementClient kexts.

1.- frecuencyVectors.sh for MacPro 6,1 on Haswell-E, patched by the script suggested on ssdtPRgen.sh output.

2.- on ACPI clover section, SmartUPS to YES and reboot. After that I don't have the warning 'system-type 1 instead of 3' on ssdtPRgen.sh. I generated my SSDT then I copied to EFI/Clover/ACPI/Patched location. No DropOEM checked but I have these entries on Clover's DropTables array from ACPI section:

<key>DropTables</key>
<array>
<dict>
<key>Signature</key>
<string>SSDT</string>
<key>TableId</key>
<string>CpuPm</string>
</dict>
<dict>
<key>Signature</key>
<string>DMAR</string>
</dict>
<dict>
<key>Signature</key>
<string>SSDT</string>
<key>TableId</key>
<string>Cpu0Ist</string>
</dict>
</array>


3.-Apply the next patches on clover KernelToPatch section.

<key>KernelToPatch</key>

<array>
<dict>
<key>Comment</key>
<string>_xcpm_pkg_scope_msr © Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>vgcAAAAx0uiU/P//</data>
<key>Replace</key>
<data>vgcAAAAx0pCQkJCQ</data>
</dict>
<dict>
<key>Comment</key>
<string>_xcpm_core_scope_msrs © Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>vgIAAAAx0uhs/P//</data>
<key>Replace</key>
<data>vgIAAAAx0pCQkJCQ</data>
</dict>
<dict>
<key>Comment</key>
<string>XCPM_idle fix by Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>ILniAAAADzA=</data>
<key>Replace</key>
<data>ILniAAAAkJA=</data>
</dict>
<dict>
<key>Comment</key>
<string>xcpm performance fix 1 (wrsmr fix to get CPU max) © okrasit</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>idjB4Ai5mQE=</data>
<key>Replace</key>
<data>uAD/AAC5mQE=</data>
</dict>
<dict>
<key>Comment</key>
<string>cpuid_set_info 10.11.6 (c) Pike R. Alpha</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>XX8ojUi7g/kC</data>
<key>MatchOS</key>
<string>10.11.x</string>
<key>Replace</key>
<data>XX8ojUi4g/kC</data>
</dict>
<dict>
<key>Comment</key>
<string>_xcpm_bootstrap Sierra (c) Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>g8PEg/si</data>
<key>MatchOS</key>
<string>10.12.x</string>
<key>Replace</key>
<data>g8PBg/si</data>
</dict>
<dict>
<key>Comment</key>
<string>_xcpm_bootstrap 10.11.6 (c) Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>g8O7g/sJ</data>
<key>MatchOS</key>
<string>10.11.x</string>
<key>Replace</key>
<data>g8O4g/sJ</data>
</dict>
<dict>
<key>Comment</key>
<string>_cpuid_set_info Sierra (c) Pike R. Alpha</string>
<key>Disabled</key>
<true/>
<key>Find</key>
<data>D7bEg8Dpg/hH</data>
<key>MatchOS</key>
<string>10.12.x</string>
<key>Replace</key>
<data>D7bEg8Dmg/hH</data>
</dict>
<dict>
<key>Comment</key>
<string>reboot fix Sierra (c) Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>VUiJ5UFXQVZBVUFUU1BBidZBifdIiftFhf8PhA==</data>
<key>MatchOS</key>
<string>10.12.x</string>
<key>Replace</key>
<data>w5CJ5UFXQVZBVUFUU1BBidZBifdIiftFhf8PhA==</data>
</dict>
<dict>
<key>Comment</key>
<string>reebot fix 10.11.6 (c) Pike R. Alpha</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>VUiJ5UFXQVZBVUFUU1BBidZBifdIiftFhf8PhA==</data>
<key>MatchOS</key>
<string>10.11.x</string>
<key>Replace</key>
<data>w0iJ5UFXQVZBVUFUU1BBidZBifdIiftFhf8PhA==</data>
</dict>
</array>

Now I can play my logic project and no problems. Like at the begining with NullCPU but with a lower CPU temp and power consumption than before and now with turbo frecuencies...

You can see that cpuid_set_info patches are disabled because Picker Alpha says on his blog that this values are included now on Kernel by Apple.


Thanks to Piker-Alpha
 
Last edited:
Working like a charm now, my 6700K is throttling down to 800Mhz and Turboing to 4.4Ghz just like it should.

Thanks PikerAlpha
 
My CPU is mentioned in supported but still i'm getting this
Code:
System information: Mac OS X 10.11.6 (15G1004)

Brandstring 'Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz'


Error: Unknown processor model ...

      Visit http://ark.intel.com to gather the required data:

      Processor Number

      TDP

      Low Frequency Mode (use AppleIntelInfo.kext)

      Base Frequency

      Max Turbo Frequency

      Cores

      Threads

Aborting ...

Done.

Download the script manually from his Github page, replace the version you've already got with the version you manually downloaded then follow the guide again (obviously skipping the part where you download the script). Worked for me :)
 
Rank SSDT newb here (sorry). I just upgraded to Sierra, and the generated OC SSDT appears to be limited to 4200. I'm OC'd to 4600. So, I tried the Pike-Alpha ssdtPRGen.sh to generate a new SSDT, and used the -f 4600 option. Dropped the resulting file into the proper location, but on reboot got 3900, by system non-OC default as the top speed.

Here's the output, where I notice a motherboard error and a system 1,2 error, but compilation is error-free:

System information: Mac OS X 10.12 (16A323)
Brandstring: "Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz"

Override value: (-f) clock frequency, now using: 4600 MHz!

Version: models.cfg v160 / Ivy Bridge.cfg v150


Scope (_PR_) {222 bytes} with ACPI Processor declarations found in DSDT (ACPI 1.0 compliant)
Generating ssdt.dsl for a 'iMac14,2' with board-id [Mac-27ADBB7B4CEE8E61]
Ivy Bridge Core i7-3770K processor [0x306A9] setup [0x0704]
With a maximum TDP of 77 Watt, as specified by Intel
Number logical CPU's: 8 (Core Frequency: 4600 MHz)
Number of Turbo States: 0
Number of P-States: 24 (1600-3900 MHz)
Injected C-States for CPU0 (C1,C3,C6,C7)
Injected C-States for CPU1 (C1,C2,C3)

Error: board-id [Mac-27ADBB7B4CEE8E61] not supported by Ivy Bridge – check SMBIOS data / use the -target option

Do you want to continue (y/n)? y
Warning: 'system-type' may be set improperly (1 instead of 2)
- Clover users should read https://clover-wiki.zetam.org/Configuration/ACPI#acpi_smartups
Compiling: ssdt_pr.dsl
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140926-64 [Nov 6 2014]
Copyright (c) 2000 - 2014 Intel Corporation

ASL Input: /Users/tracyv/Library/ssdtPRGen/ssdt.dsl - 329 lines, 10190 bytes, 73 keywords
AML Output: /Users/tracyv/Library/ssdtPRGen/ssdt.aml - 2256 bytes, 28 named objects, 45 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
Mine is a old, reliable system, so: is it the errors that are keeping me from getting 4.6? The 4.2 SSDT is working of course, but it would be nice to get back my 4.6.

I'm new to using ssdtPRGen.sh, so I'm not sure what to do to fix the issue, or even what it might be. Comments and suggestions greatly welcomed.
 
I don't really know what the first instruction means: "Configure system with appropriate SMBIOS for your CPU using Clover Configurator"

I have the latest clover configurator but I don't know what would be an appropriate SMBIOS and what would not be.
 
I went ahead with the Sierra install recommended smbios sys def of 14,2, however I'm using an old Sandy Bridge i5. 14,2 iMacs are Haswell. Is that why I'm having trouble? I followed the process to copy the ssdt.aml, however I couldn't follow the process to check functionality because terminal says

bash-3.2# sudo -s

bash-3.2# chown -R 0:0 ~/Desktop/AppleIntelInfo.kext

bash-3.2# chmod -R 755 ~/Desktop/AppleIntelInfo.kext

bash-3.2# kextload ~/Desktop/AppleIntelInfo.kext

/Volumes/Data/TOA/Desktop/AppleIntelInfo.kext failed to load - (libkern/kext) authentication failure (file ownership/permissions); check the system/kernel logs for errors or try kextutil(8).

bash-3.2# kextload ~/Desktop/AppleIntelInfo.kext

/Volumes/Data/TOA/Desktop/AppleIntelInfo.kext failed to load - (libkern/kext) authentication failure (file ownership/permissions); check the system/kernel logs for errors or try kextutil(8).

bash-3.2#
 
I went ahead with the Sierra install recommended smbios sys def of 14,2, however I'm using an old Sandy Bridge i5. 14,2 iMacs are Haswell. Is that why I'm having trouble? I followed the process to copy the ssdt.aml, however I couldn't follow the process to check functionality because terminal says

bash-3.2# sudo -s

bash-3.2# chown -R 0:0 ~/Desktop/AppleIntelInfo.kext

bash-3.2# chmod -R 755 ~/Desktop/AppleIntelInfo.kext

bash-3.2# kextload ~/Desktop/AppleIntelInfo.kext

/Volumes/Data/TOA/Desktop/AppleIntelInfo.kext failed to load - (libkern/kext) authentication failure (file ownership/permissions); check the system/kernel logs for errors or try kextutil(8).

bash-3.2# kextload ~/Desktop/AppleIntelInfo.kext

/Volumes/Data/TOA/Desktop/AppleIntelInfo.kext failed to load - (libkern/kext) authentication failure (file ownership/permissions); check the system/kernel logs for errors or try kextutil(8).

bash-3.2#

Recommended for your system is iMac 13,2.
 
I tried 13,2 and got the same result in terminal. Do I just keep trying lower and lower system definitions until I get a different response from that terminal command? How low can I go with iMac or Mac Pro in order to keep Sierra?
 
I tried 13,2 and got the same result in terminal. Do I just keep trying lower and lower system definitions until I get a different response from that terminal command? How low can I go with iMac or Mac Pro in order to keep Sierra?

What exactly is the problem?
 
Back
Top