Jump to content

[GUIDE] Edit AppleGraphicsPowerManagement.kext to unleash nvidia's GTX 570/580 full power and save energy at the same time.


Jordan2Delta
 Share

77 posts in this topic

Recommended Posts

  • 3 weeks later...

EDIT:

I am on 10.7.3 and I am using the MacPro 5,1 SMBios def.

I have modified AGPM via Plist.app, editing values of an entry found under MacPro 5,1.

According to Kext Wizard, AGPM loads, yet I cannot find it working looking at the console's report.

 

The problem is that I am experiencing random crashes, in which the video glitches while the mouse pointer and audio keep working.

Link to comment
Share on other sites

  • 4 weeks later...

i'm using the macpro 5.1 entry as well for my gt 520 i have it in console log

12-04-28 6:20:02.000 PM kernel: NVDAGF100HAL loaded and registered.

12-04-28 6:20:02.000 PM kernel: AGPM: GPU = display Initialized, Control ID 18

...running smooth...but many state changes in log

12-04-28 6:41:51.000 PM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18

12-04-28 6:41:53.000 PM kernel: AGPM: GPU = display G-state set to 3 from 2, ControlID = 18

12-04-28 6:41:55.000 PM kernel: AGPM: GPU = display G-state set to 0 from 3, ControlID = 18

12-04-28 6:42:00.000 PM kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18

12-04-28 6:42:03.000 PM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18

12-04-28 6:42:05.000 PM kernel: AGPM: GPU = display G-state set to 3 from 2, ControlID = 18

12-04-28 6:42:08.000 PM kernel: AGPM: GPU = display G-state set to 0 from 3, ControlID = 18

12-04-28 6:42:11.000 PM kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18

12-04-28 6:42:14.000 PM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18

12-04-28 6:42:16.000 PM kernel: AGPM: GPU = display G-state set to 3 from 2, ControlID = 18

12-04-28 6:42:17.000 PM kernel: AGPM: GPU = display G-state set to 0 from 3, ControlID = 18

12-04-28 6:42:21.000 PM kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18

12-04-28 6:42:24.000 PM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18

...i'll try the settings from the first post next....but stay in the macpro 5.1 profile

Link to comment
Share on other sites

  • 3 weeks later...

I'm using Retail_270.00.00f06 Nvidia Driver for my GF 560ti-448 card in my MacPro 4,1 (original).

Power state switching works well after reboot and sleep, but when returning from sleep, the fan of the GF560ti-448 runs at full speed and is not lowered.

 

PXS1 is my GF560ti-448

PXS3 is apple GF120

 

Before sleep:

 

17.05.12 21:50:21,000 kernel: AGPM: GPU = PXS1 G-state set to 3 from 2, ControlID = 18

17.05.12 21:50:25,000 kernel: AGPM: GPU = PXS3 G-state set to 2 from 1, ControlID = 18

...

 

After sleep:

 

18.05.12 05:34:01,000 kernel: AGPM: GPU = PXS1 G-state set to 3 from 3, ControlID = 18

18.05.12 05:34:02,000 kernel: AGPM: GPU = PXS3 G-state set to 3 from 3, ControlID = 18

 

but fan of the 560ti-448 is not lowering its rpm.

 

 

Any idea?

Link to comment
Share on other sites

  • 4 weeks later...

Hi I am having a devil of a time with this.

 

First Off Installed 10.7.4 with offsite software(appologies, didnt see the disclaimer about posting offsite software), nVidia 10.7.2/10.7.3 Combo, I didnt install the FakeSMC Nvidia kext as some people didnt either, and set custom iMac12,2).

When I rebooted for the first time and logged into Lion, my GTX 570 was registering in About My Mac/System Info showing the correct 1280MB RAM. I then installed the latest nVidia CUDA drivers,

ran Heaven Benchmark and was getting like 4fps with medium settings. Cinebench could not find my GTX 570, and LuxMark 2 couldnt locate an OpenCL Capable Device.

 

I switched my profile to MacPro3,1 and rebooted. All of a sudden Cinebench registered my card and spit out a score of 38.5fps, LuxMark 2 registered my card and gave me a score of 442, but heaven on medium settings was giving me 20fps ( that cant be right).

 

I then switched back to iMac12,2 and rebooted. Cinebench, LuxMark 2, and Heaven were still registering my GTX570, but Cinebench score went down to 35,5, and Luxmark went down a few points also. Heaven score decreased to 18fps.

 

I would like to know how to properly edit the AGPM info.plist, but that file doesnt exist within my AGPM kext. Do I create a new one? What does this file look like edited for GTX570, because the files Ive seen floating around have a ton more stuff listed than just the OP's code on the first page. There are like header and footer sections, and other informational properties that I dont know wether to delete or keep.

 

My Build:

ASUS Sabertooth Z77

Intel Core i7-3770 3.4Ghz

CM Hyper-212 Evo CPU Heatsink/Fan

G.Skill 16GB (4x4GB) DDR3 1600

Crucial M4 128GB MLC SATAIII SSD - OSX Drive

Crucial M4 256GB MLC SATAIII SSD - Win7 Drive

WD Caviar 1TB 7200RPM 6Gb/s - Auxiliary Drive

Corsair HX750 PSU

EVGA GeForce GTX 570 1280MB (ID=1081)

Link to comment
Share on other sites

  • 2 months later...

Hi.

 

Can i use this values for GTX 285?

 

I guess the default values are crazy

 

 

<integer>87</integer>

<integer>87</integer>

<integer>87</integer>

<integer>100</integer>

</array>

<key>Threshold_Low</key>

<array>

<integer>0</integer>

<integer>87</integer>

<integer>87</integer>

<integer>87</integer>

</array>

 

 

 

 

Tks

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Idea:

Has anyone tried to test if AGPM really reduces GPU speed Ghz in the lowered GPU Pstates?

I can see (in the console) AGPM is working (steps up down) but complete unsure if the gpu really switches - or simple not follow that OS X AGPM settings.

 

An way to check that, would be to make an test AGPM with fixed lowered gpu Pstate at lowest GHz (or step obove lowest GHz) by editing that AGPM setting.

After that check FPS Benches - normally if AGPM works the FPS would be much less with fixed lowend gpu PState setting than with full speed/working normal AGPM setting.

Link to comment
Share on other sites

I'm using Kozlek's HWSensors branch of FakeSMC and it comes with a menubar app which (amongst other things) shows the power state of the graphics card. You could use this to check the card.

 

I'm not using AGPM here at all (MacPro3,1 smbios) and HWMonitors shows my card idling at 50MHz and running at 699MHz under load.

Link to comment
Share on other sites

Yep, but (since beginning of the gpumonitor) the GPu Core + GPU VRAM MHZ never changed in my system (9600GT). Means always fixed max MHz.

Sure, the gpu temp is much down with no gpu load - thats normal. Even high clocked without gpu load temp is low.

Even if AGPM log shows Pstate switching up/down by GPU load / idle!!!

 

09.10.12 10:45:25,000 kernel[0]: AGPM: updateGPUHwPstate(2, 0): fHwPstate = 3 fFB = 0xffffff800b536000

09.10.12 10:45:25,000 kernel[0]: AGPM: updateGPUHwPstate(): state = 2. Calling fFB->setAggressiveness()...

09.10.12 10:45:25,000 kernel[0]: AGPM: GPU = display G-state set to 2 from 3, ControlID = 17. SW occupancy updated.

09.10.12 10:45:34,000 kernel[0]: AGPM: updateGPUHwPstate(1, 0): fHwPstate = 2 fFB = 0xffffff800b536000

09.10.12 10:45:34,000 kernel[0]: AGPM: updateGPUHwPstate(): state = 1. Calling fFB->setAggressiveness()...

09.10.12 10:45:34,000 kernel[0]: AGPM: GPU = display G-state set to 1 from 2, ControlID = 17. SW occupancy updated.

 

So thats my idea, that AGPM switching seems to "work"- in detail AGPM gives commands to gpu /bios but gpu doesnt do anything with that pstates commands.

 

In screenshoot you see gpu with low gpu load and max gpu load. Temp changes , gpu + VRAM MHz always same over the time.

Bildschirmfoto 2012-10-09 um 10.45.54.jpg

Link to comment
Share on other sites

  • 2 weeks later...

someone can help me with my hacbook asus k53sd, hd3000 + nvidia geforce 610m 2gb (VEN: 10de ; ID: 1058 ), i've tried a lot solution but i need use efi string to see correct information, also i can boot with last nvidia release adding my device id and deleting geforce.kext and i see it like nvidia preset 1.1.0

Link to comment
Share on other sites

  • 1 month later...

I thought I'd share my experience with AGPM. I have a GeForce GTX 570 1.2GB. There are a few things I learned that might help others.

 

First is that the way AGPM works changed between Lion and ML, at least for cards like the GTX 570 which only has three power states. In Lion, power state 1 is the highest performance state, power state 3 is the lowest performance state, and going between states 1 and 0 does nothing. However, in ML, power state 0 is the highest performance state, power state 2 is the lowest, and going between power states 2 and 3 does nothing. So depending on whether one is using Lion or ML, the modifications needed for cards with fewer than 4 power states is going to be different.

 

Something else I learned is that AGPM can fail silently, it can issue the command to switch to a power state yet the GPU does nothing. This is most obvious on NVIDIA cards when using two monitors. Until recently, NVIDIA cards are unable to transition to lower power states while using two or more monitors. This was recently fixed with the 300 series of drivers for Windows. Unfortunately, based on my testing, the version 304 driver for OS X available from NVIDIA still does not enable power savings features for my card at least while using two monitors.

 

Finally, it might be helpful to some to know that adding devices to AGPM can work with a separate plist-only kext. You don't have to modify the AppleGraphicsPowerManagement.kext itself. This is nice in case the kext is updated, in which case your modifications to AGPM.kext may be lost, but if you provide a separate kext it won't be touched. For example, for my GTX 570 I created an NVDAGF100AGPM.kext containing only the below Info.plist file placed on NVDAGF100AGPM.kext/Contents/

 

<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.atomatica.NVDAGF100AGPM</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>NVDAGF100AGPM</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>IOKitPersonalities</key>
<dict>
 <key>AGPM</key>
 <dict>
  <key>CFBundleIdentifier</key>
  <string>com.apple.driver.AGPM</string>
  <key>IOClass</key>
  <string>AGPMController</string>
  <key>IONameMatch</key>
  <string>AGPMEnabler</string>
  <key>IOProbeScore</key>
  <integer>25000</integer>
  <key>IOProviderClass</key>
  <string>IOPlatformPluginDevice</string>
  <key>Machines</key>
  <dict>
   <key>MacPro5,1</key>
   <dict>
 <key>Vendor10deDevice1081</key>
 <dict>
  <key>Heuristic</key>
  <dict>
   <key>ID</key>
   <integer>0</integer>
   <key>IdleInterval</key>
   <integer>250</integer>
   <key>SensorOption</key>
   <integer>1</integer>
   <key>SensorSampleRate</key>
   <integer>4</integer>
   <key>TargetCount</key>
   <integer>5</integer>
   <key>Threshold_High</key>
   <array>
    <integer>70</integer>
    <integer>85</integer>
    <integer>100</integer>
    <integer>100</integer>
   </array>
   <key>Threshold_Low</key>
   <array>
    <integer>0</integer>
    <integer>80</integer>
    <integer>95</integer>
    <integer>100</integer>
   </array>
  </dict>
  <key>LogControl</key>
  <integer>1</integer>
  <key>control-id</key>
  <integer>18</integer>
 </dict>
   </dict>
  </dict>
 </dict>
</dict>
<key>OSBundleRequired</key>
<string>Safe Boot</string>
</dict>
</plist>

 

All you have to do is add your device id to a separate plist like so, place it in /S/L/E/ and rebuild cache.

Link to comment
Share on other sites

  • 1 month later...

Sorry for my ignorance.

I have a GTX 560.

A copy and paste and changing the vendor thing to Vendor10deDevice1084 should work for me?

This is my AppleGraphicsPowerManagement.kext.

http://d.pr/f/hEjx

Did I do it right?

 

edit - yeah, im pretty sure I did it wrong.

The same games are just doing horribly compared to how they do on Windows.

Help?

Link to comment
Share on other sites

Sorry for my ignorance.

I have a GTX 560.

A copy and paste and changing the vendor thing to Vendor10deDevice1084 should work for me?

This is my AppleGraphicsPowerManagement.kext.

http://d.pr/f/hEjx

Did I do it right?

 

edit - yeah, im pretty sure I did it wrong.

The same games are just doing horribly compared to how they do on Windows.

Help?

 

Check with CPU-Z in windows to see how many states does your card have, and if it has only 3 states, you need to edit the first three states, the forth would be something like 110 on both high and low, it only uses the first three ones.

Try something like : HIGH : 45 , 75 , 100 , 110

LOW : 0 , 87 , 98 , 110

 

And use MacPro 5,1 (delete AppleTyMCEDriver.kext)

Link to comment
Share on other sites

Check with CPU-Z in windows to see how many states does your card have, and if it has only 3 states, you need to edit the first three states, the forth would be something like 110 on both high and low, it only uses the first three ones.

Try something like : HIGH : 45 , 75 , 100 , 110

LOW : 0 , 87 , 98 , 110

 

And use MacPro 5,1 (delete AppleTyMCEDriver.kext)

This is what it shows for cpu-z

post-103263-0-66523000-1360046507_thumb.png

Link to comment
Share on other sites

Changed it to

   <key>MacPro5,1</key>
   <dict>
 <key>Vendor10deDevice05e2</key>
 <dict>
  <key>Heuristic</key>
  <dict>
   <key>ID</key>
   <integer>0</integer>
   <key>IdleInterval</key>
   <integer>250</integer>
   <key>SensorOption</key>
   <integer>1</integer>
   <key>SensorSampleRate</key>
   <integer>4</integer>
   <key>TargetCount</key>
   <integer>5</integer>
   <key>Threshold_High</key>
   <array>
    <integer>45</integer>
    <integer>75</integer>
    <integer>100</integer>
    <integer>110</integer>
   </array>
   <key>Threshold_Low</key>
   <array>
    <integer>0</integer>
    <integer>87</integer>
    <integer>98</integer>
    <integer>110</integer>
   </array>
  </dict>
  <key>LogControl</key>
  <integer>0</integer>
  <key>control-id</key>
  <integer>18</integer>
 </dict>

 

for my GTX560, non ti card, and deleted AppleTyMCEDriver.kext

I'm all set?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

I added

<key>BoostPState</key>
    <array>
        <integer>0</integer>
        <integer>1</integer>
        <integer>2</integer>
        <integer>3</integer>
    </array>
    <key>BoostTime</key>
    <array>
        <integer>3</integer>
        <integer>3</integer>
        <integer>3</integer>
        <integer>3</integer>
    </array>

to remove this error:

 

AVF error: AVAHDGPURendererVP2VP3BoostVP3: AGPMSetBoost code = 0 returned 0xe00002c2 (ig)

Sure this won't enable VDA but one error less in log.

Link to comment
Share on other sites

  • 2 weeks later...

Has anyone looked into editing the AGPM Info.plist for the newer NVidia Kepler GPUs such as the GTX 660 ti, 670 or 680?

 

Samples from the iMac13,2 show that the options have changed significantly.

 

I've been using a combination of Apples settings for the GTX 675mx and GTX 680m for my GTX 670 SuperClocked but would like to optimize the PM for the desktop model GPU as a posed to using Apples iMac13,2 mobile settings.

 

[/font]
[font=courier new,courier,monospace]<dict>
<key>BoostPState</key>
<array>
 <integer>12</integer>
 <integer>12</integer>
 <integer>12</integer>
 <integer>12</integer>
</array>
<key>BoostTime</key>
<array>
 <integer>1</integer>
 <integer>1</integer>
 <integer>1</integer>
 <integer>1</integer>
</array>
<key>Heuristic</key>
<dict>
 <key>EnableEnergyPstate</key>
 <integer>1</integer>
 <key>EnergyDOWNThreshold</key>
 <integer>60</integer>
 <key>EnergyPstate</key>
 <integer>8</integer>
 <key>EnergyUPThreshold</key>
 <integer>80</integer>
 <key>EngineDOWNThreshold</key>
 <integer>15</integer>
 <key>EngineUPThreshold</key>
 <integer>30</integer>
 <key>ID</key>
 <integer>0</integer>
 <key>MemDOWNThreshold</key>
 <integer>30</integer>
 <key>MemUPThreshold</key>
 <integer>50</integer>
 <key>MinP0P1</key>
 <integer>11</integer>
 <key>MinP5</key>
 <integer>12</integer>
 <key>MinP8</key>
 <integer>13</integer>
 <key>MinVP0</key>
 <integer>11</integer>
 <key>MinVP1</key>
 <integer>23</integer>
 <key>MinVP5</key>
 <integer>34</integer>
 <key>MinVP8</key>
 <integer>36</integer>
 <key>NumOfPstates</key>
 <integer>14</integer>
 <key>NumOfVPstates</key>
 <integer>37</integer>
 <key>P0Table</key>
 <array>
  <integer>0</integer>
  <integer>1</integer>
  <integer>2</integer>
  <integer>3</integer>
  <integer>4</integer>
  <integer>5</integer>
  <integer>6</integer>
  <integer>7</integer>
  <integer>8</integer>
  <integer>9</integer>
  <integer>10</integer>
  <integer>11</integer>
  <integer>34</integer>
  <integer>36</integer>
 </array>
 <key>P1Table</key>
 <array>
  <integer>12</integer>
  <integer>13</integer>
  <integer>14</integer>
  <integer>15</integer>
  <integer>16</integer>
  <integer>17</integer>
  <integer>18</integer>
  <integer>19</integer>
  <integer>20</integer>
  <integer>21</integer>
  <integer>22</integer>
  <integer>23</integer>
  <integer>34</integer>
  <integer>36</integer>
 </array>
</dict>
<key>control-id</key>
<integer>17</integer>
</dict>[/font]
[font=courier new,courier,monospace]
Edited by mrengles
Link to comment
Share on other sites

I'd like to know about editing AGPM for kepler as well. I tried editing the entry for the 675MX for my 670 EX OC but on reboot the display shut down when the driver loaded, so I just removed my edit.

 

It felt like less of an issue with 10.8.2 as I'm pretty sure the card clocked down correctly there. However with 10.8.3 when the card ramps up (like for a benchmark) it seems to take forever for the temps to come back down and typically it never drops below 38, while it was idling at 27-28 before the benchmark.

  • Like 1
Link to comment
Share on other sites

@R Freeman

 

I don't know if the cards not ramping down or it's a problem with FakeSMC/HWSensors displaying the GPU sensor info. Because with LogControl=1 I see the GPU getting to State 3 on idle.

Link to comment
Share on other sites

I'd like to know about editing AGPM for kepler as well. I tried editing the entry for the 675MX for my 670 EX OC but on reboot the display shut down when the driver loaded, so I just removed my edit.

 

It felt like less of an issue with 10.8.2 as I'm pretty sure the card clocked down correctly there. However with 10.8.3 when the card ramps up (like for a benchmark) it seems to take forever for the temps to come back down and typically it never drops below 38, while it was idling at 27-28 before the benchmark.

 

Try monitoring the core voltage, core frequency, and memory frequency of the GPU to see if it's really not clocking down, or if the temperatures are staying high for some other reason. I'm not sure if HWSensors displays this info, but using the latest iStatMenus I'm able to see what appears to be correct values for the GPU clocks and voltages being reported by GPUSensors.

Link to comment
Share on other sites

 Share

×
×
  • Create New...