Mac OS: AGPM Editing with a sleeping GPU and AppleGraphicsPowerManagement.kext

  • Post published:August 13, 2013

OS X 8.X:
1. Backup /System/Library/Extensions/AppleGraphicsPowerManagement.kext
2. “Right click” on AppleGraphicsPowerManagement.kext and select “Show Package Contents”
3. Open Contents folder and Info.plist
4. Locate a line according to your SMBios.plist entry (for example MacPro5,1) in the Info.plist:

</dict>
<key>MacPro5,1</key>
<dict>

<key>Threshold_High</key>
<array>
<integer>55</integer>
<integer>75</integer>
<integer>99</integer>
<integer>100</integer>
</array>

<key>Threshold_Low</key>
<array>
<integer>0</integer>
<integer>87</integer>
<integer>87</integer>
<integer>87</integer>
</array>

5. Change it to (for example):

<key>Threshold_High</key>
<array>
<integer>0</integer>
<integer>45</integer>
<integer>75</integer>
<integer>100</integer>
</array>

<key>Threshold_Low</key>
<array>
<integer>0</integer>
<integer>85</integer>
<integer>99</integer>
<integer>100</integer>
</array>

6. Save
Explanation:
The problem happens because the GPU stays at its lowest G-state (lowest performance for energy saving).
G-states are defined in keys Threshold_High and Threshold_Low, for example:

Code:
<key>Threshold_High</key>
<array>
<integer>57</integer>
<integer>70</integer>
<integer>88</integer>
<integer>100</integer>
</array>

<key>Threshold_Low</key>
<array>
<integer>0</integer>
<integer>68</integer>
<integer>75</integer>
<integer>95</integer>
</array>

It means when the GPU is 95 to 100 % idle, it must engage state 3 (more energy saving).
75 to 88 % idle, state 2.
68 to 70 % idle, state 1.
0 to 57 % idle, state 0 (max performance).

To activate G-state switching we need to specify the GPU’s vendor and device ID under the key with the model identifier (SMproductname) used in SMBIOS.

Example:
Code:
<key>MacBookPro6,2</key>
<dict>
<key>LogControl</key>
<integer>0</integer>
<key>Vendor10deDevice0df0</key>
<dict>…</dict>
</dict>

Change LogControl from 0 to 1 to see state changes in kernel log!