Contribute
Register

how i got my 560 Ti working... a quick guide

Status
Not open for further replies.
Joined
Sep 30, 2010
Messages
45
Motherboard
GA-77X-UD3H
CPU
i7 3770K
Graphics
GTX670
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
hey guys..

so i've pooled all the info i've gathered from around here and other sites to come up with this. i find that using my method, there's no hex editing & very minimal manual kext modification. This guide assumes you are running 10.7.2 and have the MacPro4,2 smbios.plist.

First step - adding your device ID to NVDAGF100Hal.kext/Info.plist

Copy and paste the following into a terminal window:
Code:
sudo perl -pi -e '$c++ if s|\x31\x32\x34\x30\x31\x30\x64\x65|\x31\x32\x30\x30\x31\x30\x64\x65|; END { unless ($c) { warn "No substitutions made\n"; $? =1 } }' /System/Library/Extensions/NVDAGF100Hal.kext/Contents/Info.plist
Description: what this command does is find device ID 124010de and simply replace it with the 560 Ti's device ID of 120010de. If no modifications are performed on Info.plist, it will tell you (ie No substitutions made).

Second step - modifying GeForceGLDriver to allow OpenCL

Copy and paste the following into a terminal window:
Code:
sudo perl -pi -e '$c++ if s|\xeb\xa8\x83\xf8\x02\x7c\x15|\xeb\xa8\x83\xf8\x03\x7c\x15|; s|\x78\xe8\x83\xf8\x02\x7c\x11|\x78\xe8\x83\xf8\x03\x7c\x11|; END { unless ($c) { warn "No substitutions made\n"; $? =1 } }' /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver
Description: what this command does is find the the following two hex strings and replaces them with the appropriate ones as per netkas's site. If no modifications are performed on Info.plist, it will tell you (ie No substitutions made).

EB A8 83 F8 02 7C 15 replaced by EB A8 83 F8 03 7C 15
78 E8 83 F8 02 7C 11 replaced by 78 E8 83 F8 03 7C 11

from: http://netkas.org/?p=794#comment-173693

Third step - modifying libclh.dylib to allow OpenCL 2.0
Copy and paste the following into a terminal window:
Code:
sudo perl -pi -e '$c++ if s|\x8b\x87\x1c\x0c\x00\x00\x89\x06\x8b\x87\x20\x0c\x00\x00\x89\x02|\x31\xc0\xff\xc0\xff\xc0\x89\x06\x31\xc0\x89\x02\x90\x90\x90\x90|; END { unless ($c) { warn "No substitutions made\n"; $? =1 } }' /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib
Description: what this command does is find the the following hex string and replaces it with the appropriate one as per cmf's post on insanleymac. Apples OpenCL compiler is only (directly) supporting cards up to sm_20 (Quadro 4000, GTX 480/470/580/570). If it's higher than this it will fallback to sm_10 or sm_11. This modification tricks Mac into thinking we have a sm_2.0 card... allowing us to run OpenCL benchmarks with no errors. If no modifications are performed on Info.plist, it will tell you (ie No substitutions made).

8B 87 1C 0C 00 00 89 06 8B 87 20 0C 00 00 89 02
replaced by:
31 C0 FF C0 FF C0 89 06 31 C0 89 02 90 90 90 90

From: http://www.insanelymac.com/forum/index. ... pic=266318

Forth step - AppleGraphicsPowerManagement.kext for power management

This one needs to be done manually. You'll need to edit /System/Library/Extensions/AppleGraphicsPowerManagement.kext/Contents/Info.plist

I've replaced this section:
Code:
			<key>MacPro4,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>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>
					</dict>
					<key>LogControl</key>
					<integer>0</integer>
					<key>control-id</key>
					<integer>18</integer>
				</dict>

with this:

Code:
			<key>MacPro4,1</key>
			<dict>
				<key>Vendor10deDevice1200</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>60</integer>
							<integer>60</integer>
							<integer>60</integer>
							<integer>100</integer>
						</array>
						<key>Threshold_Low</key>
						<array>
							<integer>0</integer>
							<integer>75</integer>
							<integer>90</integer>
							<integer>98</integer>
						</array>
					</dict>
					<key>LogControl</key>
					<integer>1</integer>
					<key>control-id</key>
					<integer>18</integer>
				</dict>

This change will allow your card to conserve power, run cooler and automatically adjust as required. It will never go into sate 3 but will move freely between 0 and 2.

from: http://www.tonymacx86.com/viewtopic.php?t=20367

Final step - rebuilding caches

Run the following 3 command from a terminal window:
Code:
sudo rm -rf /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches

This will clean and rebuild the boot caches.

Testing:
[*]To test OpenCL: Download LuxMark and run it. You should get no errors and a score after it has completed testing.
[*]To test AGPM: Open console.app and search for AGPM. You should see some lines like these to confirm that powermanagement is switching as required:

Code:
15/10/11 4:59:41.000 PM kernel: AGPM: GPU = display Initialized, Control ID 18
15/10/11 4:59:57.000 PM kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18
15/10/11 5:00:03.000 PM kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18
15/10/11 5:41:44.000 PM kernel: AGPM: GPU = display G-state set to 0 from 2, ControlID = 18

I know this may all seem overwhelming, but there's only a few commands that you can copy/paste into terminal. You can even chuck them into a script to make it easier.

There's only 1 issue I'm having. When AGPM is working, after waking the system from sleep - the graphics card locks up and freezes the system. If I remove the AGPM.kext, machine sleeps and wakesup fine. Not sure if any of you smarter guys can work out why...

The only thing i've noticed is that after waking from sleep with AGPM active - i see the following in the console:



any ideas?

edit: actually.. exact same problem as this guy: viewtopic.php?p=177158#p177158
 
Good Tut. :thumbup: But can you upload please your modified Info.plist of graphics power management kext and both OpenCL extensions. For some reason I cannot enable OpenCL via terminal :oops:
 
are you running 10.7.2? because they wont work on 10.7.1
 
I have this one. Is a Gigabyte version, the model is GV-N560OC-1GI. I added the ID to NVDAGF100Hal.kext. I edited with Hex Fiend the two files in GeForceGLDriver.bundle. Installed the last CUDA driver for Mac OS. And edited AppleGraphicsPowerManagement.kext with this:

Code:
			<key>iMac12,2</key>
			<dict>
				<key>LogControl</key>
				<integer>1</integer>
				<key>Vendor10deDevice1200</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>0</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>5</integer>
						<key>Threshold_High</key>
						<array>
							<integer>60</integer>
							<integer>60</integer>
							<integer>60</integer>
							<integer>100</integer>
						</array>
						<key>Threshold_Low</key>
						<array>
							<integer>0</integer>
							<integer>75</integer>
							<integer>90</integer>
							<integer>98</integer>
						</array>
					</dict>
					<key>LogControl</key>
					<integer>1</integer>
					<key>control-id</key>
					<integer>18</integer>
				</dict>
				<key>default-control-id</key>
				<integer>18</integer>
			</dict>

In console I can see this about AGPM:

16/10/11 01:43:57,000 kernel: AGPM: GPU = display G-state set to 0 from 2, ControlID = 18
16/10/11 01:44:00,000 kernel: AGPM: GPU = display G-state set to 0 from 0, ControlID = 18
16/10/11 01:44:00,000 kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18
16/10/11 01:44:00,000 kernel: AGPM: GPU = display G-state set to 0 from 1, ControlID = 18
16/10/11 01:44:03,000 kernel: AGPM: GPU = display G-state set to 0 from 0, ControlID = 18
16/10/11 01:44:05,000 kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18
16/10/11 01:44:10,000 kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18
16/10/11 01:46:19,000 kernel: AGPM: GPU = display G-state set to 0 from 2, ControlID = 18
16/10/11 01:46:22,000 kernel: AGPM: GPU = display G-state set to 0 from 0, ControlID = 18
16/10/11 01:46:22,000 kernel: AGPM: GPU = display G-state set to 1 from 0, ControlID = 18
16/10/11 01:46:28,000 kernel: AGPM: GPU = display G-state set to 2 from 1, ControlID = 18

Is this fine?
 

Attachments

  • Sin título2.jpg
    Sin título2.jpg
    784.3 KB · Views: 5,418
Just happen to be cruising board and ran into this. I just checked this out on my gtx460 and open CL wasnt working.

What changes would i need to make for a 460 and for SMBIOS 3.1 as well ?
 
I got my gtx 560 Ti working with this code in AGPM:


  • <key>Vendor10deDevice1200</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>55</integer>
    <integer>40</integer>
    <integer>60</integer>
    <integer>100</integer>
    </array>
    <key>Threshold_Low</key>
    <array>
    <integer>0</integer>
    <integer>75</integer>
    <integer>90</integer>
    <integer>98</integer>
    </array>
    </dict>
    <key>LogControl</key>
    <integer>1</integer>
    <key>control-id</key>
    <integer>17</integer>
Now i get 5500 luxmark and its more stable when switching from g-states
 
Are we supposed to reboot after rebuilding the caches or between any more steps too?
 
And how to determine what kind of mac i have in hackintosh? (sorry for noob question)
 
ferchoman123 said:
I got my gtx 560 Ti working with this code in AGPM:


  • <key>Vendor10deDevice1200</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>55</integer>
    <integer>40</integer>
    <integer>60</integer>
    <integer>100</integer>
    </array>
    <key>Threshold_Low</key>
    <array>
    <integer>0</integer>
    <integer>75</integer>
    <integer>90</integer>
    <integer>98</integer>
    </array>
    </dict>
    <key>LogControl</key>
    <integer>1</integer>
    <key>control-id</key>
    <integer>17</integer>
Now i get 5500 luxmark and its more stable when switching from g-states

games works nice?? all works?
 
Status
Not open for further replies.
Back
Top