Jump to content
InsanelyMac Forum
camoguy

Fermi Graphics Power Management

Recommended Posts

post-642937-1311706905_thumb.png

 

I'd like to find the optimal power saving settings on my GTX 560 Ti. I'd like to hear some other peoples feedback and testing on their optimal settings in AppleGraphicsPowerManagment

 

Once I got my card recognized in Lion, it still didn't perform well. It was being throttled to a maximum power saving state.

 

I started by opening /S/L/E/AppleGraphicsPowerManagement.kext/Contents/Info.plist

Then located my Mac identifier which was MacPro4,1... It's burried inside IOKitPersonalities > AGPM > MacPro4,1

I copied one of the entries labeled Vendor10deDevice05e2, and pasted it as a child of MacPro4,1 (or in other words a sibling of Vendor10deDevice05e2) Ive also found that the iMac12,1 has a good scheme that will work.

 

If you add the SensorOption 1, then your video card's power saving function will work, it will switched from all the different modes. If you leave it out, then you will be running in power state zero, which is least amount of power savings, but better performance for scrolling/launchpad.

 

Then we renamed the entry to match my graphics card device id "Vendor10deDevice1200" <-GTX 560Ti

update:

 

(I've found you can replace VendorXXXXDeviceXXXX with GFX0 or GFX3 or whatever your motherboard enumerates your primary video card as) GFX0 is the default for iMacs, but it won't work on my motherboard because it's enumerated as GFX3.

Settings

 

I've enabled log control so it will print to the log each time my graphics card changes it's power state. I also have a kilowatt power meter which also shows me that it's actually working.

 

From another forum, as suggested, I increased the IdleInterval to 500, so it doesn't switch unnecessarily and frequently. Edit: I've switched back to 100 to continue further study.

 

I removed the sensorsamplerate entry, and it's been fine without it so far.

 

Then we have to adjust the Threshold_High and Threshold_Lows.

 

I don't want to go into explaining all this on this post so I'll include a couple links where it's all been talked about before. Those numbers basically tell the operating system when to switch power saving states. Those numbers represent what I believe to be GPU % IDLE. So 100 meaning the GPU is completely idle and not being used. 0 = GPU has no idling and is working 100%.

 

http://www.insanelymac.com/forum/index.php...t&p=1667641

http://www.tonymacx86.com/viewtopic.php?f=15&t=20367

 

My settings are not finalized yet, but they are working. I'm still testing and I'd like to get some feedback about what others are doing / testing.

 

Side note, It seems that in windows 7 and xp, the video driver takes it's cue to switch into higher gear from directx or the software. This is my theory of course, I would like to find out.

 

Thanks

Camoguy

post-642937-1313741885_thumb.png

Share this post


Link to post
Share on other sites
Advertisement
IT also have a GTX 560ti But I'm not getting optimal performance. Its post your files?

 

You can get optimal performance, but for me to help you get it right, I'll need you to do a few things.

 

1. get your GFX number, GFX0 or GFX2 GFX3 etc

 

Do this in terminal (that's a lowercase L):

ioreg -l|grep attached-gpu

Should say something like:

 

"attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/PEG3@3/IOPCI2PCIBridge/GFX3@0/NVDA,Display-A@0/NVDA/AGPM"

 

That is mine, what I'm looking for is the GFX number, mine is GFX3 for my primary video card and display.

 

2. Your model identifier as found in /Extra/smbios.plist under <key>SMproductname</key>

example: MacPro4,1 iMac12,1

 

3. Then make a backup of /S/L/E/AppleGraphicsPowerManagement.kext

We'll refer to this as AGPM from hereon

 

4. Open AGPM by right click and show package contents. Go inside Contents folder, and edit Info.plist with PlistEdit pro.

 

5. Locate IOKitPersonalities and expand > Expand AGPM > Locate your Mac model identifier here as found in step 2.

 

6. Empty the contents of this entry

 

7. Locate iMac12,1, expand, copy GFX0 and LogControl inside your (2) Mac model identifier entry so now it should be basically a duplicate of iMac12,1 but under your own mac id.

 

8. Go back to your mac id entry which should now have GFX0 and LogControl inside it, and rename GFX0 to whatever we found it was in step 1. GFX?

 

9. Expand GFX? > Expand Heuristics > Right click IdleInterval > New Sibling

 

10. Name it SensorOption, Class Number, Value 1

 

11. Change LogControl to 1 if you wish

 

12. Save

 

13. Run kext utility for Lion

 

14. Reboot

 

Here's what mine looks like as a reference.

 

Info.plist for AGPM

 

Here I've setup the MacPro4,1 model to work with the GTX 560 Ti as GFX3 and mac model identifier MacPro4,1.

Share this post


Link to post
Share on other sites

Just as a quick verification (and for those who do this in the future):

 

X:~ x$ ioreg -l|grep attached-gpu

| | | | | "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P1@1/IOPCI2PCIBridge/GFX@0/NVDA,Display-A@0/NVDA/AGPM"

 

There's no number displayed, so I would assume its GFX0? Or just GFX?

Lastly, where is the LogControl file found?

Share this post


Link to post
Share on other sites

Camoguy, I used the command "ioreg -l|grep attached-gpu", but I do not return anything! I used your Info.plist in my AGPM and changed my SMBIOS to MacPro4,1, but my Lauchpad continued to lag.

Use in iMac10, 1, remove AGPM, but to have a great performance have to put at rest and wake up!

I do not know what to do...

Share this post


Link to post
Share on other sites

for nvidia cards using iMac12,1 or 12,2 you don't need to include the PEG or GFX string (on my hack it's showing as PEG, not GFX). simply include Vendor10deDevice#### key and it'll recognize your card.

 

also, here are my Threshold_High and Threshold_Low settings that i've settled on for my card. Cinebench scores have increased by 12 FPS using these settings, and the interface is buttery smooth. i've set the lowest p-state to 999, which effectively disables it, hence the performance increase both in 3D games and in Finder. since these cards relatively cool, you shouldn't have an issues with heat.

 

					<key>Heuristic</key>
				<dict>
					<key>ID</key>
					<integer>0</integer>
					<key>IdleInterval</key>
					<integer>500</integer>
					<key>SensorOption</key>
					<integer>1</integer>
					<key>TargetCount</key>
					<integer>5</integer>
					<key>Threshold_High</key>
					<array>
						<integer>25</integer>
						<integer>97</integer>
						<integer>100</integer>
						<integer>999</integer>
					</array>
					<key>Threshold_Low</key>
					<array>
						<integer>0</integer>
						<integer>20</integer>
						<integer>95</integer>
						<integer>999</integer>
					</array>
				</dict>

hope this helps!

Share this post


Link to post
Share on other sites

scorcho, I made this change you indicated and changed my SMBIOS to MacPro4,1.

But for me to have maximum performance, no lag in Lauchpad, I have to add a widget with the effect of water!

I ran the command with SMBIOS MacPro4,1

 

Mac-Pro-de-Thiago:~ Thiago$ ioreg -l|grep attached-gpu
| |   |   | |   "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/pci-bridge@3/IOPCI2PCIBridge/display@0/NVDA,Display-A@0/NVDA/AGPM"

Share this post


Link to post
Share on other sites
Just as a quick verification (and for those who do this in the future):

 

 

 

There's no number displayed, so I would assume its GFX0? Or just GFX?

Lastly, where is the LogControl file found?

 

In your case I would go with GFX. That's an oddball, very interesting.

 

LogControl.jpg

 

scorcho, I made this change you indicated and changed my SMBIOS to MacPro4,1.

But for me to have maximum performance, no lag in Lauchpad, I have to add a widget with the effect of water!

I ran the command with SMBIOS MacPro4,1

 

Mac-Pro-de-Thiago:~ Thiago$ ioreg -l|grep attached-gpu
| |   |   | |   "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/pci-bridge@3/IOPCI2PCIBridge/display@0/NVDA,Display-A@0/NVDA/AGPM"

 

 

Just curious, have you by chance tried updating your DSDT from tonymac's database? http://www.tonymacx86.com/dsdt.php

Also, I'm not suggesting you change your mac model identifier to mine, I just want to show you mine as an example. I think there is a language barrier. English is my second language also.

 

You see what that widget does is like the old fermi freeze problem was about. It keeps the video card busy so it doesn't invoke power saving state 3. Once it goes to that third state, it reduces it's clock frequency down to 50 i believe which isn't enough power to keep things smooth.

 

for nvidia cards using iMac12,1 or 12,2 you don't need to include the PEG or GFX string (on my hack it's showing as PEG, not GFX). simply include Vendor10deDevice#### key and it'll recognize your card.

 

also, here are my Threshold_High and Threshold_Low settings that i've settled on for my card. Cinebench scores have increased by 12 FPS using these settings, and the interface is buttery smooth. i've set the lowest p-state to 999, which effectively disables it, hence the performance increase both in 3D games and in Finder. since these cards relatively cool, you shouldn't have an issues with heat.

 

I'm experimenting with the possibilities of using GFX0 or such to replace the Vendorid. Vendorid seems to work, but this also worked for me, so I'm asking others to try it and give me some feedback.

 

Take a screenshot of that setup in Plistedit, which install method you use? [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] xpc efi [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url], vanilla

Share this post


Link to post
Share on other sites

camoguy, excuse my mistakes. I am using Google Translator. My main language is Portuguese.

I took a picture of the Info.plist who asked:

7FuyX.png

Posted my AGMP, NVDAGF100Hal, SMBIOS, org.chameleon.Boot.plist:

http://cl.ly/3l081H0h0e1W2O3a2W3Q

My installation method and my boot is Chameleon. My DSDT is updated.

 

Gtx 560 Ti

Vendor: NVIDIA (0x10de)

Device ID: 0x1200

Revision ID: 0x00A1

ROM Revision: 70.24.11.00.01

Share this post


Link to post
Share on other sites
camoguy, excuse my mistakes. I am using Google Translator. My main language is Portuguese.

I took a picture of the Info.plist who asked:

Posted my AGMP, NVDAGF100Hal, SMBIOS, org.chameleon.Boot.plist:

http://cl.ly/3l081H0h0e1W2O3a2W3Q

My installation method and my boot is Chameleon. My DSDT is updated.

 

Gtx 560 Ti

Vendor: NVIDIA (0x10de)

Device ID: 0x1200

Revision ID: 0x00A1

ROM Revision: 70.24.11.00.01

 

Smbios looks fine, GF100Hal is okay, I don't use that many arguments with my gtx 560ti to get booted. All I have is graphicsenabler=y

 

You have, the blank graphics mode fix, -v npci=0x2000, pciroot 1, and use kernel cache. I haven't ever seen that last one. Whats that for? If you would remove those "fixes" from chameleon, what happens to your system?

 

I've made a few mods to the applegpm info.plist. Here you go.

Info.plist.zip

 

Once you modify a kernel extension file remember to:

sudo chown -R 0:0 /System/Library/Extensions
sudo chmod -R 755 /System/Library/Extensions
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

Good luck

Share this post


Link to post
Share on other sites

Get nothing from ioreg but: Denniss-iMac:~ dennis$ ioreg -l|grep attached-gpu

| | | | | "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P$

 

 

 

Great thread, i really thought everything was working ok, seems the graphic card is not doing its work though.

My system identifier is: iMac12,2. I tried to put in "Vendor10deDevice1200" with the strings you have attached as a screenshot in iMac12,2. rebuilded caches etc. and rebooted. Think it's working now! 4951 frames in GL view 4.0, openGL 2.0... is that ok? The fans does'nt spin up at all, they do that when im running windows, guess i might overheat at some point?

 

 

The now shows nothing at all, when i type: ioreg -l|grep attached-gpu, not even the: ioreg -l|grep attached-gpu

| | | | | "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P$

 

 

 

If i look in my console it says:

 

9/19/11 2:18:04.221 AM PluginProcess: AVF error: AGPMGetPowerState: returned err= 0x10000003 (vp4)

 

and:

 

9/19/11 2:18:01.932 AM PluginProcess: AVF error: AGPMGetManagedPortForAccelerator returned 0x4 for VP4

 

 

What does it mean?

 

Quicktime is still stuttering a bit when i go from window mode to full screen, anyone else who have the same problem?

 

Thank you again for a great thread!

Share this post


Link to post
Share on other sites
Get nothing from ioreg but: Denniss-iMac:~ dennis$ ioreg -l|grep attached-gpu

| | | | | "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P$

 

 

 

Great thread, i really thought everything was working ok, seems the graphic card is not doing its work though.

My system identifier is: iMac12,2. I tried to put in "Vendor10deDevice1200" with the strings you have attached as a screenshot in iMac12,2. rebuilded caches etc. and rebooted. Think it's working now! 4951 frames in GL view 4.0, openGL 2.0... is that ok? The fans does'nt spin up at all, they do that when im running windows, guess i might overheat at some point?

 

 

The now shows nothing at all, when i type: ioreg -l|grep attached-gpu, not even the: ioreg -l|grep attached-gpu

| | | | | "attached-gpu-control-path" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P$

 

 

 

If i look in my console it says:

 

9/19/11 2:18:04.221 AM PluginProcess: AVF error: AGPMGetPowerState: returned err= 0x10000003 (vp4)

 

and:

 

9/19/11 2:18:01.932 AM PluginProcess: AVF error: AGPMGetManagedPortForAccelerator returned 0x4 for VP4

 

 

What does it mean?

 

Quicktime is still stuttering a bit when i go from window mode to full screen, anyone else who have the same problem?

 

Thank you again for a great thread!

 

Fascinating, okay first off, in your signature, add your system spec details etc, so we have an understanding of what kind of platform youre on.

 

It seems to me like you're not seeing the entire output of ioreg, try increasing the window size. Other than that, you could try ioregistryexplorer. Navigate around there till you find the entry for your pci2pcibridge that your video adapter is plugged into. Might provide some insight.

 

Those screenshots in the first post are kinda old, since then I've adjusted for more optimized settings. Try these for threshold values in heuristics. Should eliminate some of the stuttering transitions, it will keep the video card in power state 2 for the most part. Which is still reasonably good power savings, about a 15 watt difference on my machine.

 

High

0: 25

1: 40

2: 60

3: 100

Low

0: 0

1: 75

2: 90

3: 98

 

You'll want to enable logcontrol for debugging, to see if you're actually switching to different power saving states on the video adapter.

 

Double check your plist, see if you have control id 17, SensorOption 1, Targetcount 5. Perhaps attach your plist zipped up to the forums so I can take a look or screenshot.

 

What score you get from running the opengl test in cinebench? http://www.maxon.net/downloads/cinebench.html

That might get the fan spinning...

 

Thanks for the acknowledgment!

Share this post


Link to post
Share on other sites

Hi again

 

Got my g-state working:

 

 

9/19/11 8:41:49.000 AM kernel: AGPM: GPU = display G-state set to 0 from 3, ControlID = 17

9/19/11 8:41:55.000 AM kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 17

9/19/11 8:42:00.000 AM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 17

9/19/11 8:42:05.000 AM kernel: AGPM: GPU = display G-state set to 3 from 2, ControlID = 17

 

The stuttering while playing quicktime videos in full screen fixed (kinda), i'm running dual screen so it's like dragging the background on the second screen under the video which cause the stuttering. It's ok when i just run on a single screen.

 

The fans are still not running at 100%, i will try to find a 3d game or something.

 

Still cant find my device ID, tried to look at ioregistry but im not able to find it there (dont know where to look).

Do i need to install: Nvidia plugin and Nvidia fermi OpenCL enabler from [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] Lion edition?

 

cinebench openGL: 37,92 FPS

4951 frames in GL view 4.0, openGL 2.0

 

Attached: DSDT.aml, info.plist, NVDAGF100Hal.kext, org.chameleon.boot.plist, smbios.plist

send.zip

Share this post


Link to post
Share on other sites

All looks good to to me, but I would possibly remove some of the boot.plist settings like arch=x86_64 pmVersion=23 and UseKernelCache. As far as I know, my system doesn't need those two settings, and it still achieves the same result. Unless you know you need it then I wouldn't bother. Always backup before you do though.Those cinebench results are great, that's above average id say.

Share this post


Link to post
Share on other sites
All looks good to to me, but I would possibly remove some of the boot.plist settings like arch=x86_64 pmVersion=23 and UseKernelCache. As far as I know, my system doesn't need those two settings, and it still achieves the same result. Unless you know you need it then I wouldn't bother. Always backup before you do though.Those cinebench results are great, that's above average id say.

 

 

Looked in system report found this:

 

GeForce GTX 560 Ti:

 

Chipset Model: GeForce GTX 560 Ti

Type: GPU

Bus: PCIe

Slot: Slot-1

PCIe Lane Width: x16

VRAM (Total): 1024 MB

Vendor: NVIDIA (0x10de)

Device ID: 0x1200

Revision ID: 0x00a1

ROM Revision: 70.24.11.00.G0

 

Dont know why i cant see it when typing the terminal command... it's weird

Do you have the nvidia fermu opencl enabler and the fakesmc nvidia plugin?

Share this post


Link to post
Share on other sites

9/19/11 8:33:04.613 AM PluginProcess: AVF error: AVAHDGPURendererVP2VP3BoostVP3: AGPMSetBoost code = 0 returned 0xe00002c2 (ig)

 

 

What's this?

Share this post


Link to post
Share on other sites
carmoguy, have ypu had any problems with the Fermi freeze? Mine freezes every now and then for up to 20 seconds.

 

See Link

 

 

Hi, no, not having any freezing problems. And no I don't have to use nvidia smc and I haven't enabled opencl yet, don't see any reason to at the moment, rather keep as much as I can vanilla.

 

 

No idea what that pluginprocess error is about. Only thing on my mind would be to try switching your machine to MacPro, or remove the BoostPstate BoostTime from the plist, those aren't required.

Share this post


Link to post
Share on other sites

Using these Thresholds:

 

High

0: 25

1: 40

2: 60

3: 100

Low

0: 0

1: 75

2: 90

3: 98

 

And I am getting only 17 fps in Cinebench, Camoguy what are your current thresholds that give you 35fps?

Share this post


Link to post
Share on other sites
Using these Thresholds:

 

High

0: 25

1: 40

2: 60

3: 100

Low

0: 0

1: 75

2: 90

3: 98

 

And I am getting only 17 fps in Cinebench, Camoguy what are your current thresholds that give you 35fps?

 

Got the same threshold as you, getting: 36,85 FPS. Funny thing is that i can't see my log any more (had to reinstall a couple of hours ago), logging is enables but the states doesn't show up.

 

Can you see your APGM states in console?

 

What mac identifier are you using?

 

apple menu/about this mac/system report/... hardware model name

Share this post


Link to post
Share on other sites

Well I am getting ONLY 17 fps, and before doing this process I was getting like 8 fps... (I get 50 fps in Windows 7). I should be getting like 30 something...

Mine is MacPro4,1

 

Are you getting 36??? that is excellent... I wonder why I have so much difference in FPS... ;)

I have not turned the LOG on, I will be doing that...

 

Got the same threshold as you, getting: 36,85 FPS. Funny thing is that i can't see my log any more (had to reinstall a couple of hours ago), logging is enables but the states doesn't show up.

 

Can you see your APGM states in console?

 

What mac identifier are you using?

 

apple menu/about this mac/system report/... hardware model name

Share this post


Link to post
Share on other sites
Using these Thresholds:

 

High

0: 25

1: 40

2: 60

3: 100

Low

0: 0

1: 75

2: 90

3: 98

 

And I am getting only 17 fps in Cinebench, Camoguy what are your current thresholds that give you 35fps?

 

 

Check your console, make sure you're in g state zero. Those are my thresholds too.

 

Well I am getting ONLY 17 fps, and before doing this process I was getting like 8 fps... (I get 50 fps in Windows 7). I should be getting like 30 something...

Mine is MacPro4,1

 

Are you getting 36??? that is excellent... I wonder why I have so much difference in FPS... ;)

I have not turned the LOG on, I will be doing that...

 

 

There's a couple things in /S/L/E/AppleGraphicsPowerManagement/Contents/Info.plist to check

 

1. vendor10dedevice1200 or GFX(number) entry mismatch

 

2.mac identifier mismatch also plausible

 

3. control id should be 17, at least it's 17 for my gtx 560ti as macpro41. Might try 18...

 

4. sensoroption 1, must be there also in heuristics

 

5.rebuild caches, after each change, and reboot

 

6.thresholds could be incorrect

 

post your kext if you can't get it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



×