olarila.com

Mac OS X x86 - Hackintosh
It is currently 19 Jun 2013, 19:45

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 16 Aug 2012, 16:20 
User avatar
Staff

Joined: 05 Dec 2010, 21:49
Posts: 1123
If you are noticing low performance in your nVidia, the problem may be in AppleGraphicsPowerManagement kext. A good app to test is OpenGL Extensions Viewer.

In order to tune it, you can edit the kext's Info.plist, or use a legacy kext and keep the original AGPM.

How to edit Info.plist
viewtopic.php?f=18&t=1704

Legacy kext examples:

Laptop
LegacyAGPM.kext.zip [2.6 KiB]

Desktop
LegacyAGPM.kext.zip [2.59 KiB]

Edit: AGPM structure has changed in 10.8.2, here you find updated legacy examples
viewtopic.php?f=3&t=629&start=90#p22641

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>


How to find vendor and device ID
viewtopic.php?f=18&t=63

Change LogControl from 0 to 1 to see state changes in kernel log
Code:
Apr  8 18:29:18 MacBook-de-Cassio kernel[0]: AGPM: GPU = GFX0 G-state set to 1 from 2, ControlID = 17
Apr  8 18:29:19 MacBook-de-Cassio kernel[0]: AGPM: GPU = GFX0 G-state set to 0 from 1, ControlID = 17
Apr  8 18:30:30 MacBook-de-Cassio kernel[0]: AGPM: GPU = GFX0 G-state set to 1 from 0, ControlID = 17
Apr  8 18:30:32 MacBook-de-Cassio kernel[0]: AGPM: GPU = GFX0 G-state set to 2 from 1, ControlID = 17


If you choose the legacy kext, copy a key from original AGPM according to your hardware. For desktop use iMac or MacPro. For laptop use MacBook or MacBookPro.

Image


Top
 Profile  
 
PostPosted: 14 Sep 2012, 17:55 
GeekInTraining

Joined: 08 May 2012, 13:09
Posts: 12
Hi oldnapalm,

Like always an excellent guide.
But seems like my Nvidia 8600 M GT (256MB) is giving low performance since 10.8.1 update, I patched AGPM and G states seems to be working but performance is still very low compared to 10.8.0 any suggestions ?

This is my Open GL results with 10.8.0 (Non patched AGPM)
Attachment:
Open_GL_Benchmarks_10.8.0.png


This is my Open GL results with 10.8.1 (Patched AGPM) [Slightly better results than 10.8.1 without patched AGPM]
Attachment:
Open_GL_10.8.1.png


This is my kernel Log right after Open GL Test
Code:
Sep 14 22:20:06 localhost kernel[0]: AGPM: GPU = VID G-state set to 0 from 0, ControlID = 17. SW occupancy updated.
Sep 14 22:20:07 localhost kernel[0]: AGPM: updateGPUHwPstate(1, 0): fHwPstate = 0 fFB = 0xffffff800c42a000
Sep 14 22:20:07 localhost kernel[0]: AGPM: updateGPUHwPstate(): state = 1. Calling fFB->setAggressiveness()...
Sep 14 22:20:07 localhost kernel[0]: AGPM: GPU = VID G-state set to 1 from 0, ControlID = 17. SW occupancy updated.
Sep 14 22:20:09 localhost kernel[0]: AGPM: updateGPUHwPstate(2, 0): fHwPstate = 1 fFB = 0xffffff800c42a000
Sep 14 22:20:09 localhost kernel[0]: AGPM: updateGPUHwPstate(): state = 2. Calling fFB->setAggressiveness()...
Sep 14 22:20:09 localhost kernel[0]: AGPM: GPU = VID G-state set to 2 from 1, ControlID = 17. SW occupancy updated.


This is my patch in the AGPM,
Code:
<key>MacBookPro7,1</key>
               <dict>
            <key>LogControl</key>
            <integer>1</integer>
            <key>Vendor10deDevice0407</key>
            <dict>
               <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>
               <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>1</integer>
                  <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>100</integer>
                  </array>
               </dict>
               <key>control-id</key>
               <integer>17</integer>
            </dict>
         </dict>


P.S - Installed CUDA Drive 5.0.24, does not help in performance. Awaiting your suggestions.


You do not have the required permissions to view the files attached to this post.

_________________
Rig I: OSX 10.6.8
Pentium D 3.4 GHz ,250 Gb HDD,2GB 667MHz RAM, Nvidia 7600GT XXXgraphics card, 16:9 LCD display,dual webcams,Bluetooth.
Rig II:OSX 10.8.1
Dell inspiron 1520,Core2duo T7250, 4GB 667MHz RAM,NV 8600GTM, BCM 4322 (Rebranded to Apple Extreme).


Top
 Profile  
 
PostPosted: 24 Jan 2013, 16:54 
Noob

Joined: 12 Jun 2012, 22:43
Posts: 2
Code:
            <key>iMac11,3</key>
            <dict>
               <key>GFX0</key>
               <dict>
                  <key>control-id</key>
                  <integer>17</integer>
               </dict>
               <key>LogControl</key>
               <integer>0</integer>
            </dict>


Image
Image

Gigabyte GeForce GTS 250, 10.8.3 (12D54)


Top
 Profile  
 
PostPosted: 05 Feb 2013, 16:31 
Noob

Joined: 09 Dec 2011, 12:15
Posts: 2
Here with MacBookPro5,5 SMBios works native on Acer Aspire 6930G with nVidia GeForce 9600M GT DDR2 (0x10de0649) :D

Attachment:
Schermata 2013-02-05 alle 16.28.03.png


EDIT:

With overclocked bios mod

Attachment:
Schermata 2013-02-07 alle 12.50.31.png


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: 15 Feb 2013, 05:45 
Noob

Joined: 12 Jun 2012, 22:43
Posts: 2
oldnapalm,
What responsible for ControlID :?:
17 / 18


Top
 Profile  
 
PostPosted: 22 Apr 2013, 08:15 
Noob

Joined: 17 Apr 2013, 07:12
Posts: 1
CPU: Pentium T3200 2GHz
Motherboard: acer 5730zg laptop
GPU: Geforce 9600M
Hello everyone.

I have followed the steps provided in the beginning of the thread, but after editing Info.plist and pasting the right Vendor and Device ID in the right section, GPU switches only between 2 power states. But 3 have to be available, the lowest power state is not set at all.

Code:
22.04.13 8:51:14,000 kernel[0]: AGPM: updateGPUHwPstate(1, 0): fHwPstate = 1 fFB = 0xffffff800c029000
22.04.13 8:55:05,000 kernel[0]: AGPM: updateGPUHwPstate(0, 0): fHwPstate = 0 fFB = 0xffffff800c029000


I am using MacBookPro5.1 SMBIOS, Vendor10deDevice0648 I have set instead of the GFX0 string in AppleGraphicsPowerManagement Info.plist (Nvidia GeForce 9600M GS). I have tried to edit treshold values but it doesnt matter what I set. It always switches only between two highest power states even if I delete the excessive one (there are values 0-3, so I deleted the 3 and tried to correct treshold values but it does not change anything). I tried LegacyAGPM.kext but it does not help at all (looks like it ignores it at all)

When I use default AGPM with GFX0 string instead of specifiying Vendor and Device ID, everything is working and GPU switches its power states as it has to, but after monitor sleep, it brokes, sets its highest power state and no more switching again.

Running on Acer 5730ZG laptop (default with Nvidia GF9300M GS, but I replaced it for 9600M GS). AppleGraphicsPowerManagement.kext is default from system

Thanks for your help


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group