ML: Native Ivy Bridge CPU and GPU Power Management

Discussion in 'Mountain Lion Desktop Support' started by toleda, Jan 4, 2013.

  1. toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Jan 4, 2013 at 2:39 AM #1
    toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Mountain Lion: Native Ivy Bridge CPU and GPU Power Management

    UPDATE - 6/28/13 - Added ML CPU Native Power Management System Definition Recommendations

    UPDATE - 2/11/13 - Includes PikeRAlpha's IB SSDT Generation Script
    (ssdtPRGen.sh)

    CPU Native Power Management System Definition Recommendations

    0. Previous generation processors (i.e., Core2...)
    0a. use native ssdt.
    0b. SysDef: macpro3,1
    1. !st Generation Core i processors Nehalem/Westmere (i.e., Core i7-875K)
    1a. use native ssdt
    1b. SysDefs: imac11,x, macbookpro6,x, macpro5,1 (2)
    2. 2nd Generation Core i processors/Sandy Bridge (i.e., Core i7-2600K)
    2a. use MultiBeast/Customization/SSDT Options/Sandy Bridge (4)
    2b. SysDefs: imac12,x, macmini5,x, mabookpro8,x
    3. 3nd Generation Core i processors/Ivy Bridge (i.e., Core i7-3770K) (3) (5)
    3a. processor specific ssdt required, see SSDT generation script (Ivybridge PM) (4)
    3b. SysDefs: imac13,x, macmini6,x, mabookpro9/10,x
    4. 4nd Generation Core i processors/Haswell (i.e., Core i7-4770K) (3) (5)
    4a. processor specific ssdt required, see SSDT generation script (Ivybridge PM) (4)
    4b. SysDefs: imac14,x, macbookairi6,x, mabookpro11,x

    Notes
    ():
    1. CPU PM applies to the installed processor (not relevant: motherboard series, OS X version, graphics, etc.)
    2. macpro5,1: remove S/L/E/AppleTyMCEDriver.kext to avoid KP on restart
    3. Using one of these sysdefs without a custom ssdt disables CPU PM
    4. SSDT generation script (Ivybridge PM) supports 2nd, 3rd and 4th generation Core i processors.
    5. If Ivy Bridge ssdt not installed, use Sandy Bridge ssdt and sysdef.
    Code (Text):

    [B]Processor/OS X version[/B]      
    [B]Gen[/B][B]    10.6    10.7   10.8   10.9
    [/B][B]Prev[/B].   All     All    All    All
    [B]1st[/B]     All     All    All    All
    [B]2nd[/B]    .6.8     All    All    All
    [B]3rd[/B]            .7.5    All    All
    [B]4th[/B]​                   .8.5    All
     
    Summary
    1. Ivy Bridge power management requires 10.8.2 or newer, edited SSDT, edited AppleGraphicsPowerManagement.kext and Ivy Bridge System Definitions: macmini6, imac13, macbookpro9/10 (Note: 10.8.2 Supplemental/Supplemental 2.0 Updates are not working)
    2. 3rd Gen/HD4000 processors without Ivy Bridge power management should use Sandy Bridge sysdefs: macmini5, imac12, macbookpro8 (Note: Sandy Bridge Power Management is working; ignore Console/WARNING: IOPlatformPluginUtil : getCPUIDInfo: this is an unknown CPU model 0x3a)
    3. 2nd Gen/HD3000 processors on a 7 Series motherboard should use Sandy Bridge Bridge sysdef. 4. macmini6 and macbookpro10 are working, imac13 is partially working. HD4000 is working with a kernel error.
    5. This guide enables native power management, optimizing CPU and GPU power management is left to the experts.

    Issues:
    1. iMac CPU power management partially working
    2. HD4000, 100% functional, kernel error

    A. Mountain Lion/Ivy Bridge CPU Power Management
    IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources/Mac-F65AE981FFA204ED.plist

    In all OS X systems up to and including Sandy Bridge, native power management was enabled by ACPI_SMC_PlatformPlugin.kext, a plugin in IOPlatformPluginFamily.kext. For Ivy Bridge processors, native power management is enabled with the X86PlatformPlugin.kext.
    HD3000 processors on a 7 Series motherboard should not use Ivy Bridge power management.

    The 10.8.2/X86PlatformPlugin.kext Resources folder contains the following
    Board-IDs (.plists):
    Mac-00BE6ED71E35EB86 - iMac13,1/i5-3335S
    Mac-2E6FAB96566FE58C - MacBookAir5,2/i5-3427U
    Mac-4B7AC7E43945597E - MacBookPro9,1/
    i7-3720QM
    Mac-6F01561E16C75D06 - MacBookPro9,2/i5-3210M
    Mac-7DF2A3B5E5D671ED -
    Mac-031AEE4D24BFF0B1 - Macmini6,1/i5-3210M
    Mac-66F35F19FE2A0D05 - MacBookAir5,1/i5-3317U
    Mac-AFD8A9D944EA4843 - MacBookPro10,2/i7-3520M
    Mac-C3EC7CD22292981F - MacBookPro10,1/i7-3720QM
    Mac-F65AE981FFA204ED - Macmini6,2/i7-3720QM
    Mac-FC02E91DDD3FA6A4 - iMac 13,2/i7-3770
    Source: RevoGirlEdit - 1/16/13, macmini6,1 and 6,2 corrected

    IOReg - P8Z77-I Deluxe/i7-3770K/HD4000/GTX 570 HD/10.8.2/MacMini6,2/Mac-F65AE981FFA204ED:
    X86PlatformPlugin
    To load X86PlatformPlugin.kext, plugin-type injection is included in the the Ivy Bridge SSDT.

    Ivy Bridge CPU Power Management edited SSDT
    Credit: PikeRAlpha

    See Post #1,
    SSDT generation script (Ivybridge PM)
    Download ssdtPR
    GenOpen ssdtPRGen
    Instructions: Post #211, SSDT generation script (Ivybridge PM) - Page 22

    Applications/Utilities/Terminal:$ ./ssdtPRGen.sh i7-3770K 4200
    ssdtPRGen.sh v5.5
    Copyright (c) 2013 by Pike R. Alpha
    ----------------------------------------------------------------
    Generating SSDT_PR.dsl for a Macmini6,2 [Mac-F65AE981FFA204ED]
    Ivy Bridge Core i7-3770K processor [0x0701] setup
    With a maximum TDP of 77 Watt, as specified by Intel
    Override value: Max Turbo Frequency, now using: 4200 MHz!
    Number logical CPU's: 8 (Core Frequency: 3500 MHz)
    Number of Turbo States: 7 (3600-4200 MHz)Number of P-States: 27 (1600-4200 MHz)
    Injected C-States for CPU0 (C1,C3,C6)
    Injected C-States for CPU1 (C1,C2,C3)
    Intel ACPI Component ArchitectureASL
    Optimizing Compiler version 20130117-64 [Jan 19 2013]
    Copyright (c) 2000 - 2013 Intel Corporation
    ASL Input: Desktop/SSDT_PR.dsl - 263 lines, 8558 bytes, 56 keywordsAML
    Output: Desktop/SSDT_PR.aml - 1662 bytes, 27 named objects, 29 executable opcodes
    Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
    Do you want to copy Desktop/SSDT_PR.aml to /Extra/SSDT.aml? (y/n)?y
    Password:$
    exit
    logout[Process completed]

    TextEdit - add boot flags:
    a. Chimera - Add DropSSDT=Yes to Extra/org.chameleon.Boot.plist
    b. Clover - Add DropOemSSDT=Yes to EFI/config.plist

    B. Mountain Lion/Ivy Bridge Graphics Power Management
    AppleGraphicsPowerManagement.kext/Contents/Info.plist

    Like the X86PlatformPlugin.lext, the board-id is used for product specific graphics power management. IGPU (integrated) and GFX0 (discrete) are the dsdt device names for the standard Mac configurations (Note, the ML HDMI audio edits rename the native device names to IGPU and GFX0).
    IGPU is only HD4000; HD3000 processors on a 7 Series motherboard should not use Ivy Bridge graphics power management. On the iMac and MacBookAir models, max power is half of MacBookPro. However, reducing max power does not reduce performance. A kernel error remains (AICPM failed to load ring table). The ring table is present in IOReg/X86PlatformPlugin.

    For optional discrete graphics (iMac13), the discrete graphics card device_id is used for graphics power management. Ivy Bridge graphics power management is significantly easier to implement. For Macs without discrete graphics (Mini), simply adding the device_id power profile to the appropriate board-id adds graphics power management (i.e., Vendor10deDevice1086).

    IOReg - P8Z77-I Deluxe/i7-3770K/HD4000/GTX 570 HD/10.8.2/MacMini6,2
    Mac-F65AE981FFA204ED:
    AGPMController
    Screen Shot 2013-02-26 at 7.01.29 PM.png

    IOReg - P8Z77-I Deluxe/i7-3770K/HD4000/GTX 570 HD/10.8.2/MacMini6,2
    Mac-F65AE981FFA204ED:
    IGPU/AGPM (HD4000)
    Screen Shot 2013-02-26 at 6.59.34 PM.png

    IOReg - P8Z77-I Deluxe/i7-3770K/HD4000/GTX 570 HD/10.8.2/MacMini6,2
    Mac-F65AE981FFA204ED:
    GFX0/AGPM (GTX 570)
    Screen Shot 2013-02-26 at 4.10.12 PM.png

    IOReg - P8Z77-I Deluxe/i7-3770K/HD4000/GTX 570 HD/10.8.2/MacMini6,2/Mac-F65AE981FFA204ED:
    AGPMController
    Info.plist:
    IGPU:
    HD4000
    Screen Shot 2013-01-21 at 7.56.45 PM.png

    AGPMController
    Info.plist:
    GFX0: Discrete Graphics/NvidiaB86 - iMac 13,1
    4ED - Macmini6,2 (edited)
    6A4 - iMac 13,2 (edited)
    Screen Shot 2013-01-08 at 8.54.40 PM.png
    GTX 570 HDIdle:...................................Load:..............................
    Screen Shot 2013-01-21 at 8.34.27 PM.png Screen Shot 2013-01-07 at 7.51.50 PM.png

    GFX0:
    Discrete Graphics/AMD
    Unknown

    C. Ivy Bridge Power Management Status
    Status - 1/21/13:
    Screen Shot 2013-01-20 at 8.48.54 PM.png
    macmini6,2/Clover
    CPU - working MSRDumper PStatesReached:
    12 16 17 19 21 22 32 37 38 39
    IGPU - working
    GFX0 (optional) - working
    GB - 13488

    Status - 1/8/13:
    macmini6,1
    CPU - workingMSRDumper PStatesReached: 12 16 19 22 32 37 38 39
    IGPU - working
    GFX0 (optional) - working

    Console:
    kernel[0] AppleIntelCPUPowerManagement: Turbo Ratios 2344kernel[0] AppleIntelCPUPowerManagement: (built 23:03:24 Jun 24 2012) initialization completekernel[0] AppleIntelCPUPowerManagementClient: ready
    kernel[0] X86PlatformPlugin::set
    RingTable - AICPM failed to load ring table with status 0x0: Get=0, Load=0, Install=0
    kernel[0] X86PlatformPlugin::configResourceHandler - Failed to set ring table!
    kernel[0] [AGPM Controller] build GPUDict by Vendor10deDevice1086

    macmini6,2
    CPU - workingMSRDumper PStatesReached: 12 16 19 22 32 37 38 39
    IGPU - workingGFX0 (optional) - working

    imac13,1
    CPU - not working
    MSRDumper PStatesReached: 12 16 37 38 39
    IGPU (optional) - working
    GFX0 - working

    imac13,2
    CPU - not working
    MSRDumper PStatesReached: 12 16 37 38 39
    IGPU (optional) - working
    GFX0 - working

    macbookpro10,1
    CPU - working
    MSRDumper PStatesReached: 12 16 22 32 37 38 39
    IGPU - working
    GFX0 - working

    Notes:
    1. Benchmarks/10.8.2
    (Ivy Bridge Sysdef/Ivy Bridge SSDT)
    1a. macmini5,1:
    msrdumper - 16 19 24 31 37 38 39, GB - 13112, Xbench - 463
    1b. macmini6,2:
    msrdumper - 12 16 24 32 37 38 39, GB - 13062, Xbench - 449
    1c. macmini6,2/Clover:
    msrdumper -
    12 16 17 19 21 22 32 37 38 39, GB - 13488, Xbench - 459

    2.
    Benchmarks/10.8.2 (Ivy Bridge Sysdef/Sandy Bridge SSDT)
    2a. macmini6,1 with Sandy Bridge SSDT - 800 MHz, GB < 2000

    3. Unique Heaven
    3a. macmini6,2: HD4000 - 4.7 fps, 117 score
    3b. macmini6,2: GTX 570 HD - 69.6 fps, 1752 score
     
  2. Going Bald

    Going Bald Moderator

    Joined:
    Aug 14, 2010
    Messages:
    21,878
    Mobo:
    GA-X58A-UD7 Rev.1 BIOS F7
    CPU:
    i7-920
    Graphics:
    Sapphire HD5770
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    iMac
    Jan 4, 2013 at 1:04 PM #2
    Going Bald

    Going Bald Moderator

    Joined:
    Aug 14, 2010
    Messages:
    21,878
    Mobo:
    GA-X58A-UD7 Rev.1 BIOS F7
    CPU:
    i7-920
    Graphics:
    Sapphire HD5770
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    iMac
    ML: Native Ivy Bridge Power Management

    If your Ivy Bridge system already has native power management is there any advantage to going this route?

    I no longer have the P8Z77-I build or I would test it on there.

    If I extract a DSDT from the MSI Z77A-GD65 using NullCPU and booting from the backup ROM on the original BIOS, make these edits to the DSDT do I need the SSDT?
     
  3. toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Jan 4, 2013 at 3:35 PM #3
    toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    ML: Native Ivy Bridge Power Management

    The Ivy Bridge advantage is lower power and slightly more performance. IB power management on IB processors delivers lower power. My 3770K idles at 1600 MHz with SB PM and idles at 1200 MHz with IB PM (can be set as low as 800 MHz). IB PM also manages the power on HD4000 graphics (13 steps from 700 MHz to 1300 MHz). SB PM does not support integrated graphics.

    IB PM does not address the locked register in the AMI BIOS. Patching the AMI BIOS for OS X is still required, regardless of the processor generation. As well, the native SSDT does not support OS X power management for SB or IB and the SB SSDT is different than the IB SSDT.
     
  4. Going Bald

    Going Bald Moderator

    Joined:
    Aug 14, 2010
    Messages:
    21,878
    Mobo:
    GA-X58A-UD7 Rev.1 BIOS F7
    CPU:
    i7-920
    Graphics:
    Sapphire HD5770
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    iMac
    Jan 4, 2013 at 11:16 PM #4
    Going Bald

    Going Bald Moderator

    Joined:
    Aug 14, 2010
    Messages:
    21,878
    Mobo:
    GA-X58A-UD7 Rev.1 BIOS F7
    CPU:
    i7-920
    Graphics:
    Sapphire HD5770
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    iMac
    ML: Native Ivy Bridge Power Management

    OK, updated to 10.8.2 with a side step to delete a certain OEMSMBIOS kext.

    I get this at boot: IMG_1177.JPG

    but it seems to have little effect as I get this from MSRDumper: Console.jpg

    In any case, here is a new ioreg

    View attachment MSI-3rd try.ioreg.zip
     
  5. toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Jan 5, 2013 at 12:12 AM #5
    toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    ML: Native Ivy Bridge Power Management

    The boot messages are the difference between i5 (4 threads) and i7 processors (8threads), no worries. To fix, remove cpu4, cpu5, cpu6 and cpu7. I think there is big difference between 2 p states and 7 p states. You have confirmed IB PM is working on your system, without a dsdt.
     
  6. toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Jan 22, 2013 at 3:33 AM #6
    toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Post #1 Updated - 1/21/03
     
  7. jonessl

    jonessl

    Joined:
    Nov 25, 2011
    Messages:
    214
    Mobo:
    HP Probook 4540s
    CPU:
    i5-3360m
    Graphics:
    Integrated HD4000
    Jan 25, 2013 at 1:32 AM #7
    jonessl

    jonessl

    Joined:
    Nov 25, 2011
    Messages:
    214
    Mobo:
    HP Probook 4540s
    CPU:
    i5-3360m
    Graphics:
    Integrated HD4000
    Toleda, could you please help me...

    When you say "use SandyBridge sysdefs", do you simply mean (in my case, where I have a 7 series MB with a 2nd gen i5-2450 processor) that I should use a MacBook Pro 8 for the smbios.plist file, or something more than that?

    Also, when you say "ignore Console", what does that mean, please?

    Hope you [or someone else] don't mind answering these questions for a newbie.[/
     
  8. toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Jan 25, 2013 at 2:19 AM #8
    toleda

    toleda Moderator

    Joined:
    May 20, 2010
    Messages:
    20,637
    Mobo:
    Asus Maximus VII Impact
    CPU:
    Core i7-4770K
    Graphics:
    HD7750 + HD4600
    Mac:
    iMac, MacBook Pro, Mac mini
    Classic Mac:
    512K, LC, Power Mac
    Mobile Phone:
    iOS
    Summary/Item 3 represents your situation:
    1. Use a Sandy Bridge sysdef: macmini5, imac12, macbookpro8
    2. You will not see the console message with a Sandy Bridge processor using Sandy Bridge power management.
    .

     
  9. jonessl

    jonessl

    Joined:
    Nov 25, 2011
    Messages:
    214
    Mobo:
    HP Probook 4540s
    CPU:
    i5-3360m
    Graphics:
    Integrated HD4000
    Jan 25, 2013 at 9:53 AM #9
    jonessl

    jonessl

    Joined:
    Nov 25, 2011
    Messages:
    214
    Mobo:
    HP Probook 4540s
    CPU:
    i5-3360m
    Graphics:
    Integrated HD4000
    Thanks!
     
  10. StarbucksSteve

    StarbucksSteve

    Joined:
    Jan 8, 2011
    Messages:
    261
    Mobo:
    Dell 7548
    CPU:
    Intel i7-5500U
    Graphics:
    Intel HD 5500
    Mac:
    MacBook, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    Jan 26, 2013 at 3:50 AM #10
    StarbucksSteve

    StarbucksSteve

    Joined:
    Jan 8, 2011
    Messages:
    261
    Mobo:
    Dell 7548
    CPU:
    Intel i7-5500U
    Graphics:
    Intel HD 5500
    Mac:
    MacBook, MacBook Pro, Mac mini
    Mobile Phone:
    iOS
    This isn't working yet but I am working on it, so to speak ... using the iMac13,1, as you noted, there are some issues. I have resolved one, I think, and maybe the info will spark other ideas. I am on a Dell 17R SE 3D, i7-3630QM and even at this juncture things are much better on start up using the iMac board ID.

    i had to add a method call behind the cpu1 thru cpu7 SSDT entry points for the ACST method just like the call for APSS - when I did that, the CStates table in the IOREG is now filled out (it was empty under cpu1 thru cpu7 before). Less messages (all of the unexpected data for C1, etc. are now gone) but same result at the moment, still no ring table.

    I did find my bug - when I updated your i7 table with my cpus values, I miskeyed one of the values so I had three values at the same level and it couldn't figure out which was the last normal pstate; fixed.
     

Share This Page