Contribute
Register

[TUTORIAL] How to install nVidia drivers on Mac

Joined
Jul 11, 2012
Messages
2
Motherboard
Gigabyte GA-G41MT-S2P
CPU
Intel Core 2 Duo E6300, 1866 MHz
Graphics
nVidia GeForce 8800 GS
Mac
Classic Mac
Mobile Phone
BEFORE WE START

This method is for the ones who didn't get their video cards working properly after installing (normally) the official nVidia driver. In my case, after installation, my screen was turning off during the start, just after the loading gray screen with the Apple logo. After a lot of research, I got my video card working and decided to share my experience. Hope this tutorial help someone!

Install the Mac OS X Combo Update 10.7.4;

OBS¹: My experience was under the version 10.7.4, but I think the method described in this tutorial works under 10.7.3 too. You just have to download the right system version of the nVidia driver.

OBS²: I don't know if this tutorial works under Mountain Lion (10.8), so if you want to try, don't blame me if you get any kind of problem, try it at your own risk!

OBS³: In the software I used to generate the EFI string for my card (OSX86Tools), there are some ATI cards listed. So... PERHAPS, this tutorial can also work with ATI cards. If you want to give it a try, remember to make a backup of your system before.

[Optional] I think that it's a good thing to make a backup using Time Machine before proceeding in this tutorial. It's just an advice.

So... let's download everything we will need along this tutorial:

• Download OSX86Tools: http://code.google.com/p/osx86tools/

• Download and install LSPCI: http://www.osx86.net/downloads.php?do=file&id=1643

• Download, extract and get the NVDAGF100Hal.kext file, located in “GeForce GTX 550 Ti Files/System/Library/Extensions” folder: http://www.osx86.net/view/1816-geforce_gtx_550_ti_for_lion_-_opengl-efi_...html

• Download the latest nVidia driver:​

MODIFYING THE NVDAGF100Hal.kext FILE

Open Finder, go to this directory /System/Library/Extensions/ and locate the NVDAGF100Hal.kext file. Just for security, right-click it and click on Get Info, be sure that the box Hide extension is unchecked and rename the file to NVDAGF100Hal.kext.bak, select to maintain the .bak. After that, go to the folder where you just downloaded the custom NVDAGF100Hal.kext, then right-click it and select the option “Show Package Contents”. Open the “Contents” folder and open the Info.plist file with the text editor. Locate this text in the file:

<key>IOPCIPrimaryMatch</key>
<string>
NUMBER
</string>

Now delete any number in between the <string> tags. Afterwards, open the Terminal and type this command: lspci -nn. You will get a list of devices with their names and numeric ID's. Locate the line related to your graphic card. Example:

Code:
00:00.0 Host bridge [0600]: Intel Corporation 4 Series Chipset DRAM Controller [8086:2e30] (rev 03)
00:01.0 PCI bridge [0604]: Intel Corporation 4 Series Chipset PCI Express Root Port [8086:2e31] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 01)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 [8086:27d0] (rev 01)
00:1c.2 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 [8086:27d4] (rev 01)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 [8086:27c8] (rev 01)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 [8086:27c9] (rev 01)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 [8086:27ca] (rev 01)
00:1d.3 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 [8086:27cb] (rev 01)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller [8086:27cc] (rev 01)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev e1)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge [8086:27b8] (rev 01)
00:1f.2 IDE interface [0101]: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller [8086:27c0] (rev 01)
00:1f.3 SMBus [0c05]: Intel Corporation 82801G (ICH7 Family) SMBus Controller [8086:27da] (rev 01)
[color="green"][b]01:00.0 VGA compatible controller [0300]: nVidia Corporation G92 [GeForce 8800 GS] [[color="red"]10de[/color]:[color="blue"]0606[/color]] (rev a2)[/b][/color]
03:00.0 Ethernet controller [0200]: Attansic Technology Corp. Unknown device [1969:1083] (rev c0)
The number in blue is the Device ID and the number in red is the Vendor ID. Now, go back to the text editor and put the information below in the place where you erased the numbers before:

0xDeviceIDVendorID&amp;0xffc0ffff

So, in my case, the edited part of the file would be like this:

<key>IOPCIPrimaryMatch</key>
<string>
0x060610de&amp;0xffc0ffff​
</string>​

If you can't get neither the DeviceID nor the Vendor ID using that command on the Terminal, then you can search around the Internet to get this information. (http://www.pcidatabase.com/search.php?device_search_str=geforce)

To finish the edition, close the text editor. Then copy and paste this file into your /System/Library/Extensions/ folder (give the necessary permission).

OBS: You might get a pop-up saying that the NVDAGF100Hal.kext was installed improperly. Don't worry about that, just press OK.

Reboot your system.

GENERATING AN EFI STRING FOR YOU VIDEO CARD

Open the OSX86Tools and click on the Add EFI Strings/Boot Flag button. Click on the GFX Strings tab and choose your current graphics card. If your video card is not listed, you must choose the option “Custom Geforce” and fill spaces with the correct information about your video card. (If you need any help, search around the Internet. I can't give you the right way of doing this, because I didn't need to do that.) Now you have the Hexadecimal EFI String.

EDITING THE org.chameleon.Boot.plist FILE

Open the /Extra folder and find this file org.chameleon.Boot.plist. Make a copy of it and rename it to org.chameleon.boot.plist.bak (right-click it and click on Get Info, be sure that the box Hide extension is unchecked and rename the file), just for security again. Then, right-click the original one and open it with the Text Editor.

You need to add these lines to this file between the <dict> tags:

<key>device-properties</key>
<string>EFI STRING</string>

So, the file will look like this (remember to let GraphicsEnabler as Yes):

Code:
[FONT="Courier New"]<?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>
[INDENT]<key>EthernetBuiltIn</key>
       <string>Yes</string>
       <key>GenerateCStates</key>
       <string>Yes</string>
       <key>GeneratePStates</key>
       <string>Yes</string>
       <key>GraphicsEnabler</key>
       <string>Yes</string>
       <key>Kernel</key>
       <string>mach_kernel</string>
       <key>Kernel Flags</key>
       <string>npci=0x3000 darkwake=0</string>
       <key>Legacy Logo</key>
       <string>Yes</string>
       <key>Timeout</key>
       <string>2</string>
       <key>UseKernelCache</key>
       <string>Yes</string>
       <key>device-properties</key>
<string>6c0200000100000001000000600200000d00000002010c00d041030a0100000001010600000101010
60000007fff04001e00000072006f006d002d007200650076006900730069006f006e0000002e0000006e5669
646961204765466f7263652038383030204753204f70656e474c20456e67696e65205b4546495d22000000400
030002c006400650076006900630065005f00740079007000650000000b000000646973706c6179100000004e
00560043004100500000001800000004000000000003000c00000000000007000000000e0000006e0061006d0
0650000000b000000646973706c617914000000400030002c006e0061006d0065000000120000004e5644412c
446973706c61792d41100000006d006f00640065006c0000001a0000006e5669646961204765466f726365203
83830302047530e0000004e00560050004d000000200000000100000000000000000000000000000000000000
000000000000000014000000400031002c006e0061006d0065000000120000004e5644412c446973706c61792
d4220000000400031002c0063006f006d00700061007400690062006c00650000000e0000004e5644412c4e56
4d6163220000005600520041004d002c0074006f00740061006c00730069007a0065000000080000000000001
820000000400030002c0063006f006d00700061007400690062006c00650000000e0000004e5644412c4e564d
616322000000400031002c006400650076006900630065005f00740079007000650000000b000000646973706
c61791c0000006400650076006900630065005f00740079007000650000000f0000004e5644412c506172656e
74</string>[/INDENT]
</dict>
</plist>[/FONT]
INSTALLING THE OFFICIAL NVIDIA DRIVER

After editing the org.chameleon.boot.plist, the next step is to install the official nVidia driver that you had downloaded. And reboot your system. Now your screen is fine, filling completely the screen monitor; your card is detected, with all the available resolutions and OpenGL working.

[EDIT]

EDITING SOME .KEXT FILES AGAIN

Now, to avoid any future problems with kernel panics, let's edit some .kext files. Go to /System/Library/Extensions and edit again the NVDAGF100Hal.kext file (Right-click >> Show package contents >> Contents >> Right-click the Info.plist file >> Open with >> Text editor). Locate this text here:

<key>IOPCIMatch</key>​

You'll notice that your Device ID was reseted, and, perhaps, your Vendor ID too (in my case, only the Device ID was reseted: <string>0x000010de&amp;0x0000ffff</string>).

So what you got to do is to put the exact values again between the <string> tags. Final edition (with my GeForce 8800 GS):

<key>IOPCIMatch</key>
<string>
0x060610de&amp;0x0000ffff​
</string>​

So, make the changes, save the file and close Text editor. Repeat the same process to these other .kext's bellow:

NVDANV50Hal.kext
NVDAResman.kext
GeForce.kext


[/EDIT]

“I HAVE DONE ALL STEPS ABOVE AND MY SCREEN IS NOT WORKING FINE”

I'm so sorry, but if the steps above didn't help, I don't know any other method to make your video card work in your Lion Hackintosh. But I can help you to make your system work again if you're getting a kernel panic or if your screen is turning off during the start.

Let's do the logical thing, “remove” the edited files and put back the old ones that were working.

During the Chimera's boot, press any key and type -s to boot in the Single-User Mode. When it loads, type these commands below:

NVIDIARecovery

The system will reboot. And again, during the Chimera's boot, press any key and type -s to boot in the Single-User Mode.

mount -uw /
cd /System/Library/Extensions
mv NVDAGF100Hal.kext NVDAGF100Hal.kext.bak2
mv NVDAGF100Hal.kext.bak NVDAGF100Hal.kext
cd /Extra
mv org.chameleon.Boot.plist org.chameleon.Boot.plist.bak2
mv org.chameleon.Boot.plist.bak org.chameleon.Boot.plist
reboot

The system will reboot and you might get it working properly again.

If, even doing that, your system doesn't start, we will have to use Time Machine. Reboot your system, plug your bootable pen drive that contains the Lion installation and set, in the BIOS, the first boot device to USB-HDD. Start the installer and after you choose the language, click on Utilities (top menu bar) and select to recover your system from a backup with Time Machine.

REFERENCE AND THANKS

I produced this tutorial based on the post of the user dvl_iac on this thread: http://www.tonymacx86.com/lion-desktop-support/62864-osx-lion-10-7-4-not-recognizing-gtx-550-ti.html. The users Zero06Si and martineztherock from http://www.osx86.net/ also helped indirectly in my tutorial by the information present in the dvl_iac post. So... thanks :)

MY RESULTS

I used a software called Unigine Heaven 3.0 to make a benchmark and compare the results between Windows 7 (which I'm really convicted that the nVidia drivers are correctly installed), Ubuntu 12.04 LTS (nVidia drivers installed using nvidia-current package) and Mac OS X Lion 10.7.4.

Windows 7:
FPS: 32.6
Scores: 821
Min FPS: 15.8
Max FPS: 60.5​

Mac OS X Lion (10.7.4):
FPS: 27.6
Scores: 696
Min FPS: 11.5
Max FPS: 53.0​

Ubuntu 12.04 LTS:
FPS: 7.9
Scores: 200
Min FPS: 4.8
Max FPS: 17.4​

Let me know if you got your video card working properly! :D
 
Joined
Jul 11, 2012
Messages
2
Motherboard
Gigabyte GA-G41MT-S2P
CPU
Intel Core 2 Duo E6300, 1866 MHz
Graphics
nVidia GeForce 8800 GS
Mac
Classic Mac
Mobile Phone
For some reason, after I shut down my system, every time I tried to start Mac OS X again, it brought me a kernel panic. Then, after reading this blog post (http://daveharris.wordpress.com/2007/08/08/osx86-with-nvidia-7600gt/), I discovered that I had some values reseted inside specific .kext files. After getting my system working properly again, I edited my tutorial above to avoid this kernel panic. So, if you followed my tutorial before my edition, make sure to give a look at the new part.
 
Top