Contribute
Register

ML: Native Ivy Bridge CPU and GPU Power Management

Status
Not open for further replies.
Joined
Nov 29, 2012
Messages
96
Motherboard
Gigabyte GA-Z77-DS3H
CPU
i7-3770K
Graphics
HD 4000 & RX 580
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. Power Mac
  2. SE/30
Mobile Phone
  1. iOS
Hi, after all the business updating to Mavericks I've been looking at my hack to try and optimize it properly...

I'm wondering though :

1a) With a HD7950 is a MacMini 6,2 definition instead of a MacPro 3,1 really the best choice?
Seing how there isn't a discrete GPU in the ApplePowerManagement.kext for the MacMini

1b) When modifying APM.kext, can I add My own card info from System Information (Vendor1002Device679a)?

2) Lately when I tried modifying AGPM.kext I had a boot error about it not being properly signed,
the same with removing the GPU sensor from FakeSMC.kext (not booting with it). How to sign a modified kext so it doesn't bother me at boot?
 
Joined
Mar 9, 2011
Messages
676
Motherboard
Gigabyte Z390 UD
CPU
i9-9900K
Graphics
MS RX 6800 XT Trio
Mac
  1. iMac
  2. MacBook Pro
  3. Mac Pro
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
1- You can use the iMac 13,1 or 13,2 and try and match the GPU chipset as much as you can from the ones available. I have a GTX 650 as an example and I now use the 13,2 with the GTX 660 that has the same GK107 as the one I got. You can make the edit on another card but better to keep it in the Nvidia or AMD bracket.

2- You can, but like I said it's better to get as close as possible to the chipset you card uses. If the iMac AGPM doesn't have the same try and look at other SMBIOS'

3- The AGPM not being signed doesn't matter, you can't sign it yourself but even though it's not signed it will still get loaded, for now...


Hi, after all the business updating to Mavericks I've been looking at my hack to try and optimize it properly...

I'm wondering though :

1a) With a HD7950 is a MacMini 6,2 definition instead of a MacPro 3,1 really the best choice?
Seing how there isn't a discrete GPU in the ApplePowerManagement.kext for the MacMini

1b) When modifying APM.kext, can I add My own card info from System Information (Vendor1002Device679a)?

2) Lately when I tried modifying AGPM.kext I had a boot error about it not being properly signed,
the same with removing the GPU sensor from FakeSMC.kext (not booting with it). How to sign a modified kext so it doesn't bother me at boot?
 
Joined
Aug 17, 2012
Messages
16
Motherboard
Gigabyte Z77X-UP5TH
CPU
i7-3770K
Graphics
HD4000
Mac
  1. MacBook Air
  2. MacBook Pro
Classic Mac
Mobile Phone
  1. iOS
I am feeling like a complete tool having to post here but have exhausted everything i can think of...and am likely just needing an extra set of eyes to look at this.

Hardware:
Gigabyte GA-Z77X-UP5 TH
i7-3770K (configured for OC to 4.42GHz with 43 x 103MHz base clock)
GTX 650 (GeForce GTX 650 OC GV-N650OC-2GI)

I had full power management working under 10.8 with the MacMini5,3 definition: MSRDumper PStatesReached: 16 22 29 36 40 43 44

I have since upgraded to Mavericks (primarily to to Work incompatibility issues) and have lost SSDT. During various testing attempts I've tried various system definitions and regenerating the SSDT.aml file. I have tried my original SSDT file and generating a new one with no real change. At least I am getting higher than .8GHz currently, but it is only getting 2 states 16x and 35x. I've tried MacPro 3,1 and the MacMini6,2 and a few others but so far no luck.

I have looked for the common items but can't seem to find what is going on here. First hope is to get CPU speeds working and then I'll worry about GPU PM.

org.chameleon.plist
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DropSSDT</key>
    <string>Yes</string>
    <key>EthernetBuiltIn</key>
    <string>Yes</string>
    <key>GenerateCStates</key>
    <string>No</string>
    <key>GeneratePStates</key>
    <string>No</string>
    <key>Kernel</key>
    <string>mach_kernel</string>
    <key>Kernel Flags</key>
    <string>darkwake=0</string>
    <key>Legacy Logo</key>
    <string>Yes</string>
    <key>Timeout</key>
    <string>5</string>
    <key>UseKernelCache</key>
    <string>Yes</string>
    <key>device-properties</key>
    <string>7f0000000100000001000000730000000200000002010c00d041030a000000000101060000027fff04002c0000004100410050004c002c00690067002d0070006c006100740066006f0072006d002d006900640000000800000005006201140000006800640061002d0067006600780000000d0000006f6e626f6172642d31</string>
</dict>
</plist>

AppleACPIPlatform
Code:
   12    1 0xffffff7f8238e000 0x5f000    0x5f000    com.apple.driver.AppleACPIPlatform (2.0) <11 10 7 6 5 4 3 1>

sdtPRGen.sh
Code:
./ssdtPRGen.sh 4420sdtPRGen.sh v6.7 Copyright (c) 2013 by Pike R. Alpha
----------------------------------------------------------------
Processor Declaration(s) Found in DSDT (ACPI 1.0 compliant)
Generating ssdt_pr.dsl for a Macmini6,2 [Mac-F65AE981FFA204ED]
Ivy Bridge Core i7-3770K processor [0x306A9] setup [0x0701]
With a maximum TDP of 77 Watt, as specified by Intel
Override value: Max Turbo Frequency, now using: 4420 MHz!
Number logical CPU's: 8 (Core Frequency: 3500 MHz)
Number of Turbo States: 9 (3600-4420 MHz)
Number of P-States: 29 (1600-4420 MHz)
Injected C-States for CPU0 (C1,C3,C6)
Injected C-States for CPU1 (C1,C2,C3)


Intel ACPI Component Architecture
ASL Optimizing Compiler version 20130117-64 [Jan 19 2013]
Copyright (c) 2000 - 2013 Intel Corporation


ASL Input:     /Users/user/Desktop/ssdt_pr.dsl - 264 lines, 8777 bytes, 57 keywords
AML Output:    /Users/user/Desktop/ssdt_pr.aml - 1731 bytes, 27 named objects, 30 executable opcodes


Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

IOReg
View attachment Xipper-Dec11-1403.zip

I hate to waste anyone's time, but have spent a lot of time on this and am hoping someone else sees an obvious error.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I am feeling like a complete tool having to post here but have exhausted everything i can think of...and am likely just needing an extra set of eyes to look at this.

Hardware:
Gigabyte GA-Z77X-UP5 TH
i7-3770K (configured for OC to 4.42GHz with 43 x 103MHz base clock)
GTX 650 (GeForce GTX 650 OC GV-N650OC-2GI)

I had full power management working under 10.8 with the MacMini5,3 definition: MSRDumper PStatesReached: 16 22 29 36 40 43 44

I have since upgraded to Mavericks (primarily to to Work incompatibility issues) and have lost SSDT. During various testing attempts I've tried various system definitions and regenerating the SSDT.aml file. I have tried my original SSDT file and generating a new one with no real change. At least I am getting higher than .8GHz currently, but it is only getting 2 states 16x and 35x. I've tried MacPro 3,1 and the MacMini6,2 and a few others but so far no luck.

I have looked for the common items but can't seem to find what is going on here. First hope is to get CPU speeds working and then I'll worry about GPU PM.

org.chameleon.plist
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DropSSDT</key>
    <string>Yes</string>
    <key>EthernetBuiltIn</key>
    <string>Yes</string>
    <key>GenerateCStates</key>
    <string>No</string>
    <key>GeneratePStates</key>
    <string>No</string>
    <key>Kernel</key>
    <string>mach_kernel</string>
    <key>Kernel Flags</key>
    <string>darkwake=0</string>
    <key>Legacy Logo</key>
    <string>Yes</string>
    <key>Timeout</key>
    <string>5</string>
    <key>UseKernelCache</key>
    <string>Yes</string>
    <key>device-properties</key>
    <string>7f0000000100000001000000730000000200000002010c00d041030a000000000101060000027fff04002c0000004100410050004c002c00690067002d0070006c006100740066006f0072006d002d006900640000000800000005006201140000006800640061002d0067006600780000000d0000006f6e626f6172642d31</string>
</dict>
</plist>

AppleACPIPlatform
Code:
   12    1 0xffffff7f8238e000 0x5f000    0x5f000    com.apple.driver.AppleACPIPlatform (2.0) <11 10 7 6 5 4 3 1>

sdtPRGen.sh
Code:
./ssdtPRGen.sh 4420sdtPRGen.sh v6.7 Copyright (c) 2013 by Pike R. Alpha
----------------------------------------------------------------
Processor Declaration(s) Found in DSDT (ACPI 1.0 compliant)
Generating ssdt_pr.dsl for a Macmini6,2 [Mac-F65AE981FFA204ED]
Ivy Bridge Core i7-3770K processor [0x306A9] setup [0x0701]
With a maximum TDP of 77 Watt, as specified by Intel
Override value: Max Turbo Frequency, now using: 4420 MHz!
Number logical CPU's: 8 (Core Frequency: 3500 MHz)
Number of Turbo States: 9 (3600-4420 MHz)
Number of P-States: 29 (1600-4420 MHz)
Injected C-States for CPU0 (C1,C3,C6)
Injected C-States for CPU1 (C1,C2,C3)


Intel ACPI Component Architecture
ASL Optimizing Compiler version 20130117-64 [Jan 19 2013]
Copyright (c) 2000 - 2013 Intel Corporation


ASL Input:     /Users/user/Desktop/ssdt_pr.dsl - 264 lines, 8777 bytes, 57 keywords
AML Output:    /Users/user/Desktop/ssdt_pr.aml - 1731 bytes, 27 named objects, 30 executable opcodes


Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

IOReg
View attachment 76293

I hate to waste anyone's time, but have spent a lot of time on this and am hoping someone else sees an obvious error.

AppleIntelCPUPowerManagement is not loaded. Maybe you deleted it from /S/L/E or have a kernel cache built without it.
 
Joined
Aug 17, 2012
Messages
16
Motherboard
Gigabyte Z77X-UP5TH
CPU
i7-3770K
Graphics
HD4000
Mac
  1. MacBook Air
  2. MacBook Pro
Classic Mac
Mobile Phone
  1. iOS
AppleIntelCPUPowerManagement is not loaded. Maybe you deleted it from /S/L/E or have a kernel cache built without it.

:oops: That would be an obvious error. I installed the kext directly from the Mavericks install media, it is now loading:

Code:
 106    0 0xffffff7f8241f000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (216.0.0) <7 6 5 4 3 1>
 113    0 0xffffff7f820bf000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (216.0.0) <7 6 5 4 3 1>

The system now is stuck at 832MHz clock speed

New IOReg (with OEM version of kext in place) View attachment Xipper-Dec11-1747.zip

I also tried installing the patched kext for 10.9.0 from Multibeast but didn't seem to produce any change vs the Mavericks default build. If I delete the SSDT.aml I get back to the 2 clock speeds of 16x and 35x.

*edit after more testing*
If I use the OEM Kext and the SSDT.aml from Multibeast it works (with MacMini5,2) , the custom generated SSDT fails and the system stays at 832MHz.

So it seems I can get Sandy Bridge PM to work without a real OC, but I cannot get the Ivy Bridge SSDT to function.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
:oops: That would be an obvious error. I installed the kext directly from the Mavericks install media, it is now loading:

Code:
 106    0 0xffffff7f8241f000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (216.0.0) <7 6 5 4 3 1>
 113    0 0xffffff7f820bf000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (216.0.0) <7 6 5 4 3 1>

The system now is stuck at 832MHz clock speed

New IOReg (with OEM version of kext in place) View attachment 76301

I also tried installing the patched kext for 10.9.0 from Multibeast but didn't seem to produce any change vs the Mavericks default build. If I delete the SSDT.aml I get back to the 2 clock speeds of 16x and 35x.

*edit after more testing*
If I use the OEM Kext and the SSDT.aml from Multibeast it works (with MacMini5,2) , the custom generated SSDT fails and the system stays at 832MHz.

So it seems I can get Sandy Bridge PM to work without a real OC, but I cannot get the Ivy Bridge SSDT to function.

I think it is quite likely the X86PlatformPlugin profile for MacMini is not setup for an overclock situation. It probably sees your SSDT, is unable to correlate it with the plist data, throws up its hands, and gives up.

While it may be possible to edit the plist in X86PlatformPlugin, there is a lot of binary data in these files where the structure is not documented and therefore not understood.

Have you tried using XCPM (kernel power management)? You can enable it for Ivy CPUs with "-xcpm" kernel flag.
 
Joined
Aug 17, 2012
Messages
16
Motherboard
Gigabyte Z77X-UP5TH
CPU
i7-3770K
Graphics
HD4000
Mac
  1. MacBook Air
  2. MacBook Pro
Classic Mac
Mobile Phone
  1. iOS
I think it is quite likely the X86PlatformPlugin profile for MacMini is not setup for an overclock situation. It probably sees your SSDT, is unable to correlate it with the plist data, throws up its hands, and gives up.

While it may be possible to edit the plist in X86PlatformPlugin, there is a lot of binary data in these files where the structure is not documented and therefore not understood.

Have you tried using XCPM (kernel power management)? You can enable it for Ivy CPUs with "-xcpm" kernel flag.

You are a life saver, that did the trick. And for follow up for anyone else following/seeking help.

Hardware:
i7-3770K with Corsair liquid cooling
GA-Z77X-UP5 TH
Mavericks 10.9.0

I used the Gigabyte Windows over clock utility to find the "peak" stable clock and accepted it as good enough. I am not using any patched kexts as it relates to power management, this is a vanilla install of Mavericks with only adding drivers as needed for my hardware (audio, USB3, SATA). I made sure that no NullCPUPowerManagement was in place from any other installers.

I created an SSDT.aml file using the ssdtPRGen.sh v6.7 utility and placed it in /Extra. I then modified my org.chameleon.Boot.plist to add the -xcpm flag:
Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>DropSSDT</key>
	<string>Yes</string>
	<key>EthernetBuiltIn</key>
	<string>Yes</string>
	<key>Kernel</key>
	<string>mach_kernel</string>
	<key>Kernel Flags</key>
	<string>[B]-xcpm[/B] darkwake=0</string>
	<key>Legacy Logo</key>
	<string>Yes</string>
	<key>Timeout</key>
	<string>5</string>
	<key>UseKernelCache</key>
	<string>Yes</string>
	<key>device-properties</key>
	<string>7f0000000100000001000000730000000200000002010c00d041030a000000000101060000027fff04002c0000004100410050004c002c00690067002d0070006c006100740066006f0072006d002d006900640000000800000005006201140000006800640061002d0067006600780000000d0000006f6e626f6172642d31</string>
</dict>
</plist>

It appears I am getting full Ivy Bridge SSDT at this time:
Code:
MSRDumper PStatesReached: 16 25 30 35 40 44 45 46


Geekbench 32-bit shows a score of ~15,356. My next step is to modify get the GPU PM operational, but that will have to wait a few days as I have actual work to get done now that I have a fully operational desktop again.

I appreciate all of the help.
 
Joined
May 6, 2012
Messages
63
Motherboard
Asus Maximus GENE V z77
CPU
Intel Core i3 3570k
Graphics
Nvidia GTX 770
Mac
Classic Mac
Mobile Phone
Hey guys I need your help!

I'm trying to get rid of Youtube/Flash acceleration issues (green-pink artefacts). Hardware acceleration in other apps, like Quicktime or just flash games works.

Config:

I5 3570K not over clocked
Asus Gene V z77 with pached BIOS
Inno3d gtx 770 2 gb
8 Gigs Corsair ram
Samsung 840 Pro SSD

I installed Mountain Lion 10.8.5 + Mac mini 6.2 SmBIOS. I'm using a DSDT( compiled with MaciASL ) and SSDT (ssdtPRGen).

I tried to inject the agpm from iMac 14,2 ( Mac-27ADBB7B4CEE8E61) because it uses 780mx graphics to MacMINI6.2 (Mac-F65AE981FFA204ED), renaming device_id to 1184.
Then i installed the modified kext using Kext Utility… The AGMP kext is being successfully loaded:

12/15/13 5:19:54.000 PM kernel[0]: [AGPM Controller] build GPUDict by Vendor10deDevice1184

But the flash issues are still there…. DOES the issues have something to do with the AGPM? because power management works very well!

i can fix it with Mac Pro 3.1 smbios, but i lose some p-states, i got only 16 17 18 19 20 38, HW shows 34,35,37 too….

Can anyone help me?
 

Attachments

  • AppleGraphicsPowerManagement.kext.zip
    51.7 KB · Views: 102
  • ssdt_pr.aml
    1.3 KB · Views: 134
Joined
Oct 27, 2011
Messages
157
Motherboard
HP h9-1350
CPU
i7 3770
Graphics
GTX 650TI
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. Other
I have been working on this issue too......

It has to do with
1) OS X and hardware acceleration for video(s) - you can turn off flash hardware acceleration in your browser(right click the video)
2) Using a dedicated graphics card with a macmini profile can cause video errors (real mini's only have integrated graphics)

I just switched to a iMac 13,1 profile and mades some adjustments

(From my post) http://www.tonymacx86.com/mountain-...oard-ipmmb-fm-hp-phoenix-h9-1350-no-dsdt.html

Update 2 (12/15/13) - Testing iMac 13,1 System Definition

** Macmini uses intergrated graphics and limits/hampers the use of dedicated graphics
** iMac profile limits speed-stepping of CPU (until now?)

1) Changed System Definition to iMac 13,1
2) Modified AGPM.kext (Changed device ID to my GPU - iMac 13,1)
3) Modified IOPlatformFamily.kext
--Contents/Plugins/x86PlatformPlugin.kext/Contents/Resources

the text in
Mac-00BE6ED71E35EB86.plist (iMac 13,1)
has been replaced with a copy of the text in
Mac-F65AE981FFA204ED.plist (Mac Mini 6,2)

Results:
A) All Video and the few games that I tested work without errors/freezing
B) 7 speedstep states achieved now instead of 2

*Make sure you put your Graphics's Card ID into the agpm.kext
*make sure the info you copy/patch is similar to your type of card (AMD/Nvidia/Intel)

I hope this helps you or at last gives you a few more ideas on how to tackle the problem

Cheers
 
Joined
May 6, 2012
Messages
63
Motherboard
Asus Maximus GENE V z77
CPU
Intel Core i3 3570k
Graphics
Nvidia GTX 770
Mac
Classic Mac
Mobile Phone
pizzamac

Thank you!
can you tell my, what p-states do you have?


ADDED:


WOW, just WOW pizzamac! it works! :) i created an ssdt for iMac, because without it agpm wouldn't load and i was getting only 2 p-states.
i'm getting now 16 21 28 34 37 38!! p-states ( just like Mac mini! ), youtube works, games work, gpu-power management works ! you're the best.
 
Status
Not open for further replies.
Top