Contribute
Register

macOS Native Discrete GPU Power Management

toleda

Moderator
Joined
May 20, 2010
Messages
24,459
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
macOS (nearly) Native Discrete GPU Power Management

Native macOS discrete graphics power management delivers the best combination of graphics performance and efficiency. AppleGraphicsPowerManagement.kext is not natively supported on non native hardware (except, iMacPro1,1/Vega). A graphics card specific AppleGraphicsPowerManagement injector kext is required. To be clear, native discrete graphics power management is not mandatory. Without discrete graphics power management, maximum performance is not possible. The consequences can be severe; excessive power consumption and temperature throttling are likely.

Change Log
v1.0 - 3/7/18: Initial Release

Requirements
  1. macOS/10.10 or newer
  2. Intel 3rd Generation Processor/Core i-3xxx/Ivy Bridge and newer
  3. Discrete GPU (macOS recognized and enabled)
    • AMD (7xxx and newer) or
    • Nvidia (6xx and newer)
Recipe
  1. Valid System Definition/board-id (consistent with installed processor generation)
  2. CPU XCPM enabled (x86PlatformPlugin loaded)
  3. Installed graphics card with ACPI device: GFX0
  4. Non native AGPM injection
Not Considered
  1. Multiple discrete graphics cards
Table 1: Native AppleGraphicsPowerManagement.kext (AGPM)
Processor
Generation
Desktop
GFX0 required, unless noted
Laptop
GFX0 required
Discrete
Graphics
(D/L)
9th: Core i-9xxx
Coffee Lake
Mac-63001698E7A34814
iMac19,2
Mac-937A206F2EE63C01
MacBookPro15,1
AMD Pro/Vega
8th: Core i-8xxx
Coffee Lake
Mac-BE088AF8C5EB4FA2
iMac18,3
Mac-7BA5B2DFE22DDD8C
Macmini8,1
Mac-937A206F2EE63C01
MacBookPro15,1
AMD Pro/Vega
Xeon W ............
Skylake
Mac-7BA5B2D9E42DDD94
iMacPro1,1 (No GFX0)
AMD
Vega
7th: Core i-7xxx
Kaby Lake
Mac-BE088AF8C5EB4FA2
iMac18,3
Mac-551B86E5744E2388
MacBookPro14,3
AMD
Pro 5xx
6th: Core i-6xxx
Skylake
Mac-65CE76090165799A
iMac17,1
Mac-A5C67F76ED83108C
MacBookPro13,3
AMD
R9 M3xx/Pro 4xx
5th: Core i-5xxx
Broadwell
NA
4th: Core i-4xxx
Haswell
Mac-FA842E06C61E91C5
iMac15,1
Mac-06F11F11946D27C5
MacBookPro11,5
AMD
R9 M2xx/M3xx
Xeon E5_v2 ......
Ivy Bridge
Mac-F60DEB81FF30ACF6
MacPro6,1 (GFX2)
AMD
FirePro Dx00
4th: Core i-4xxx
Haswell
Mac-27ADBB7B4CEE8E61
Mac14,2
Mac-2BD1B31983FE1663
MacBookPro11,3
Nvidia
7xx
3rd: Core i-3xxx
Ivy Bridge
Mac-FC02E91DDD3FA6A4
Mac13,2
Mac-4B7AC7E43945597E
MacBookPro10,1
Nvidia
6xx

I. Before You Start - Discrete GPU Power Management
  1. Confirm installed processor generation with System Definition
    1. System Information/Hardware/Model Identifier
      • Note System Definition (Model Identifier)
      • Confirm with Native AppleGraphicsPowerManagement.kext (Table 1)
      • Screen Shot 2018-03-06 at 8.31.29 PM.png
    2. If not correct:
      • Set to correct System Definition
      • Restart
  2. Confirm macOS recognized and enabled graphics
    1. System Information/Hardware/Graphics ...
      • Screen Shot 2018-03-06 at 8.41.54 PM.png
    2. If not enabled, full stop; post to Graphics
  3. Confirm XCPM Enabled
    1. Use: III. Tools/1. IORegistryExplorer
    2. Baseline, IOReg/File/Save a Copy as .../Baseline
    3. IOReg/Search: x86
      • Confirm X86PlatformPlugin
      • Screen Shot 2018-03-06 at 8.33.10 PM.png
    4. If no X86PlatformPlugin
  4. Confirm discrete graphics card ACPI name
    1. IOReg/Search: display
      • Screen Shot 2018-03-08 at 11.15.45 AM.png
    2. ACPI Name: PEGP (System Definition/.../PCI0@0/.../PEG0@1/.../PEGP@0)
      • Other examples: GFX0, , GFX1, H000, etc
    3. Calculate hex value of ACPI Name
      • Use: II. Tools/4. ASCII To Hex
      • ex., PEGP/ASCII = 50454750/hex
    4. Note ACPI Name/ASCII and ACPI Name/hex
II. Installation - Discrete GPU Power Management
  1. Confirm Graphics card install ACPI device GFX0(only one condition applies)
    1. If System Definition is iMacPro1,1 and Vega56 or Vega64 installed
      1. See 5. Working AppleGraphicsPowerManagement.kext
    2. If System Definition is MacPro6,1, use GFX2 (select one method)
      1. Clover dsdt patch
        • Download/config-audio_cloverHDMI+.plist.zip
        • Copy: config.plist/ACPI/DSDT/Patches/Item 2/AMD/Nvidia GPU PM- Rename PEGP to GFX2 ...
        • Paste: to config.plist/ACPI/DSDT/Patches/
        • If not PEGP
          • Edit Find from 47465850 to ASCI Name/hex (above)
      2. Custom ssdt
        • Edit ssdt from GFX1 (example) to GFX2
      3. Save and install (all methods)
      4. See 2. Confirm native AppleGraphicsPowerManagement.kext support
    3. if ACPI Name = GFX0
      1. See 2. Confirm native AppleGraphicsPowerManagement.kext support
    4. If ACPI Name not GFX (select one method):
      1. Clover dsdt patch
        • Use: III. Tools/2. Xcode
        • Download/config-audio_cloverHDMI+.plist.zip
        • Copy: config.plist/ACPI/DSDT/Patches/Item 1/AMD/Nvidia GPU PM- Rename PEG0 to GFX0
        • Paste: to config.plist/ACPI/DSDT/Patches/
        • If not PEG0
          • Edit Find from 47465830 to ASCI Name/hex (above)
      2. AppleHDA HDMI Audio/Post #1/cloverHDMI
      3. Install kext:
      4. Custom ssdt
        • Edit ssdt from GFX1 (example) to GFX0
      5. Save and install (all methods)
  2. Confirm native AppleGraphicsPowerManagement.kext support
    1. AMD
      • MacPro6,1, iMac15,1, iMac17,1,i Mac18,1, iMacPro1,1
      • MacBookPro11,5, MacBookPro13,3, MacBookPro14,3
    2. Nvidia
      • iMac13,2, iMac14,2
      • MacBookPro10,1, MacBookPro11,3
    3. If native support, see 4. Restart
  3. Add AppleGraphicsPowerManagement.kext support
    1. From Table 1/System Definition, copy board-id
    2. Download: dAGPM.kext.zip
    3. Edit Info.plist
      1. Finder/Show Package Contents: S/L/E/AppleGraphicsPowerManagement.kext/Contents/Info.plist
      2. Use: III. Tools/2. Xcode
      3. Xcode/File/Open/Info.plist
      4. Info.plist/IOKitPersonalities/AGPM/Machines/
      5. Find board-id
      6. Copy IGPU, if present
      7. Finder/Show Package Contents: dAGPM.kext/Contents/Info.plist
      8. Xcode/File/Open/Info.plist
      9. AMD:
        • Select "Mac-AMD", paste IGPU on "Mac-AMD"
        • Copy board-id
        • Paste board-id over "Mac-AMD"
      10. Nvidia:
        • Select "Mac-Nvidia", paste IGPU on "Mac-Nvidia"
        • Copy board-id
        • Paste board-id over "Mac-Nvidia"
        • Screen Shot 2018-03-06 at 6.23.03 PM.png
    4. Save
    5. Install dAGPM.kext to EFI/CLOVER/kexts/Other
  4. Restart
  5. Working AppleGraphicsPowerManagement.kext
  1. IOReg/AGPMController
    • Screen Shot 2018-03-06 at 9.16.26 PM.png
  2. IOReg/AGPM/AMD/Heuristic-ID: ff ff ff ff
    • Screen Shot 2018-03-06 at 8.55.22 PM.png
  3. IOReg/AGPM/Nvidia/Heuristic-ID: 4
    • Screen Shot 2018-03-06 at 9.45.16 PM.png
  4. Verify Heuristic ID
    • If no match, AGPM not working, see Problem Reporting
    • If match, AGPM working, success
III. Tools
  1. IORegistryExplorer_v2.1.zip (select View Raw, double click)
  2. Xcode on the Mac App Store
  3. DPCIManager
  4. ASCII to Hex - Free text conversion tools
IV. Problem Reporting (Post to this thread will requested files attached)
  1. Description of problem
  2. OS X version/motherboard model/BIOS version/processor/graphics
  3. Procedure/Guide Used
  4. Copy of IOReg/File/Save a Copy As…, verify file (no ioreg.txt, screenshots)
    • Baseline
    • IOReg, current with problem.
  5. Screenshots
    • System Information/Hardware/Graphics/Displays
  6. Clover (files only, no text pasted to Post)
    • EFI/CLOVER/config.plist
    • DPCIManager/Misc/Boot Log
    • EFI/CLOVER/ACPI/Patched/dsdt (if installed)
    • EFI/CLOVER/ACPI/Patched/ssdt (all)
    • EFI/CLOVER/kexts/Other/ (all)
 
Last edited:
Joined
Jan 10, 2018
Messages
94
Motherboard
Clevo N155RF1
CPU
i7-6700HQ HM170
Graphics
HD530 GTX965M
Thanks for your work!
 

toleda

Moderator
Joined
May 20, 2010
Messages
24,459
Motherboard
Asus Maximus VII Impact
CPU
Core i7-4770K
Graphics
RX 560 + HD4600
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
512K, LC, Power Mac
Mobile Phone
iOS
It is a number, represented as hex (base16) rather
Shouldn't that max-value be ending with a number?
0x means hexadecimal. Use Calculator/View/Programmer to convert 0xf to decimal
 
Joined
Dec 30, 2015
Messages
64
Mac
MacBook Pro
Classic Mac
iMac
Mobile Phone
iOS
So, I spoke with vit9696, who is involved with NvidiaGraphicsFixup, and I was told that experiments indicated that the methods detailed here brought no visible effects to Kepler and newer Nvidia GPUs. If anyone has any information about using this native discrete graphics power management on Kepler and newer, please let us know. Thanks!
 
Joined
Mar 29, 2011
Messages
230
Motherboard
GA-Z170X-UD3 (F23g)
CPU
Intel Core i5-7400
Graphics
Asus Radeon RX 560 4GB
It is a number, represented as hex (base16) rather
0x means hexadecimal. Use Calculator/View/Programmer to convert 0xf to decimal
Ok, I understood where the difference was. Without PEG0 to GFX0 I had 0x3, now looks like this
AGPM.jpg
The only thing missing is Heuristic-ID: 4. That means GPU Power Management is not working?
If anyone has any information about using this native discrete graphics power management on Kepler and newer, please let us know. Thanks!
How do we test it? That CurrentPowerState value doesn't change in my current setup. Is it supposed to change if GPU Power Management is working?
 
Top