How to Install OSX Drivers on Unsupported Systems

Published: 8.19.2013

In my attempts to connect an Nvidia GTX660Ti desktop GPU to my MacBook Air, I came across the problem of being unable to install the latest Mac OSX Nvidia drivers onto my system:

Unsupported? I find that hard to believe!

Unsupported? I find that hard to believe!

Obviously, Nvidia is up to no good here! (okay, I jest, there are some pretty good reasons you don’t want everyone to be able to install Nvidia drivers on laptops without Nvidia cards)

These drivers install just fine on a Mac Pro, so we should be able to get them to run on any modern OSX 10.8.4 system, though getting them to run correctly might require some patching.

In the past, (OSX 10.8.2), installing Nvidia drivers on a MacBook Air was easy, all you had to do was right click on the driver package and select “Show Package Contents”, navigate to the Packages directory, and then run the internal “webDriverPayload” package to skip the initial check that would otherwise determine that your system is not a Mac Pro and terminate the installation:

Nvidia driver 304.00.05f02

Nvidia driver 304.00.05f02

The package within a package.

The package within a package.

 

(Note: there are several ways an OSX driver package can be structure, here’s a good reference) Alternately, you could edit the Distribution.dist file directly to remove the code that checks your system’s hardware.

Unfortunately, the 10.8.4 driver prevents you from easily opening up its contents; the “Show Package Contents” option has mysteriously disappeared:

Where'd it go!?

Where’d it go!?

Luckily, Xcode comes to the rescue and lets up open up the package!

An Xcode accessory tool that can open and edit pkg files called PackageMaker (that actually no longer comes bundled with Xcode) can be found on the Apple developer site. Start at the Xcode download page, click on “View Downloads” under the latest version of Xcode, and sign in with an Apple ID (you don’t need to have a paid Apple developer program membership to do this — I don’t!):

The download page link.

The download page link.

Next, sort the list of downloads by name, scroll down to “Auxiliary Tools for Xcode – Late July 2012”, and download and mount the dmg file.

The PackageMaker download.

The PackageMaker download.

Once you mount the dmg file (by double clicking on it), simply drag PackageMaker into your applications folder to install it:

Drag and drop!

Drag and drop!

Now, when you right click on the driver package, you will be able to open it with “Flat Package Editor”:

Open with Flat Package Editor

Open with Flat Package Editor

In Flat Package Editor, you should be able to see some internal folders and packages, along with the Distribution.dist file (this is what we want to edit). Drag the Distribution file out of the package to copy it into the folder with your driver, and then delete the Distribution file from inside of the package:

Pulling out the Distribution File.

Pulling out the Distribution File.

Now, open the copied Distribution file using Textedit:

Contents of Distribution.dist

Contents of Distribution.dist

Hmm.. that’s interesting! It looks like the “Computer Not Supported” error message is generated by a hardware checking function that simply compares the hardware model of the system to a list of allowed hardware models, and spits out a generic error message if your computer isn’t on that list. To get rid of the error message and allow the driver to be installed, delete the highlighted line of code that calls the hardware checking function, validateHardware().

Your driver’s Distribution file might have implemented this check in a different way, but the idea is still the same. Find the code that prevents the driver from installing, and make sure it never gets executed. It’s always a good idea to comment out whatever code you’re modifying instead of deleting it so that you don’t need to download the entire driver again if you mess something up.

The same technique can also be used to install new drivers on systems with old versions of OSX. Just disable the software checking function, and you’ll be able to run the driver installer.

Once the Distribution file has been modified, drag it back into the contents of the driver package in Flat Package Editor and save. Now you should be able to install the driver:

Success!

Success!

WARNING:

Sometimes drivers check to make sure your hardware and OSX version are supported for a good reason! In this particular case, the Nvidia graphics driver works just fine on my MacBook Air, in another case, a driver installed on an unsupported system might render it inoperable. Make sure you back up your system before you try something like this, and be prepared to spend a few hours fixing a messed up machine. Oh, and of course it should go without saying that I’m not responsible for any damage you do to your own computer.

Now, the fun part!

With the Nvidia graphics driver installed, I installed CUDA drivers and added the Thunderboltizer patch from mediaPros. It’s essentially a driver code modification that enables support for a GPU over Thunderbolt by configuring the Nvidia drivers to announce that they support Thunderbolt.

Next, I plugged my GTX660Ti into a Bplus PE4H v2.1 (PCIe x1 to ExpressCard interface, $100 on eBay) and a Sonnet ExpressCard Pro (Expresscard to Thunderbolt interface, $140 on eBay), with a 16.9 second PERST# dis-assertion delay set on the PE4H, connected a computer power supply to the GPU, and wired the whole contraption to my MacBook Air using a Thunderbolt cable.

[A picture of this goes here, soon]

It seems to work, mostly! The device ID corresponds to a GTX660Ti, which is correct.

I see a GPU!

I see a GPU!

I don’t have access to an external monitor to connect to the GPU at the moment, so further testing and benchmarks will have to wait. When I don’t delay dis-assertion of PERST#, the computer goes into a panic -> restart loop; verbose boot seems to indicate that some properties are missing from the Nvidia driver, which means it may require additional patching.

Once I get this working, this part of the article will get its own page that describes how to set up an eGPU on Mac OSX.

6 thoughts on “How to Install OSX Drivers on Unsupported Systems

  1. [WARNING] OSX eGPU: OS X Releases 10.9.5 update

  2. [GUIDE] 2013 15" Macbook Pro GT750M + GTX780Ti@16Gbps-TB2 (Sonnet EE III-D) +OSX10.10 - Page 3

  3. It looks like there’s a new section of code in the Distribution file. Here’s the code if you’d like to see it:

    NVIDIA Web Driver 313.01.02f01

    function InstallationCheck()
    {
    if (!validateHardware()) return false;
    if (!validateSoftware()) return false;

    return true;
    }

    function validateHardware()
    {
    var model = system.sysctl(“hw.model”);
    var system_models = [“MacPro3,1”, “MacPro4,1”, “MacPro5,1”];
    var model_count = system_models.length;
    var found_hardware = 0;

    for (var i = 0; i < model_count; i++)
    {
    if (system_models[i] == model)
    {
    found_hardware++;
    }
    }

    if (found_hardware == 0)
    {
    my.result.title = system.localizedString(“unsupported_title”);
    my.result.message = system.localizedString(“unsupported_message”);
    my.result.type = “Fatal”;

    return false;
    }

    return true
    }

    function compareBuildVersions(si, sj)
    {
    var li, lj;

    li = si.length; lj = sj.length;
    if ((li == 0) || (lj == 0)) return 0;

    if (li < lj)
    {
    if (li == 2) sj = sj.substring(0, 2);
    else if (li == 3) sj = sj.substring(0, 3);
    }
    else
    {
    if (lj == 2) si = si.substring(0, 2);
    else if (lj == 3) si = si.substring(0, 3);
    }

    return system.compareVersions(si, sj);
    }

    function validateSoftware()
    {
    var supportedOSVer = “10.8.4”;
    var supportedOSBuildVer = “12E55”;
    var targetBuild = system.version.ProductBuildVersion;
    var result = compareBuildVersions(targetBuild, supportedOSBuildVer);

    if (result != 0)
    {
    var title;
    var msg;
    var osVersionString = system.version.ProductVersion;

    if ((targetBuild.substring(0, 2) == supportedOSBuildVer.substring(0, 2)) && (result < 0))
    {
    title = system.localizedString(“need_os_update_title”);
    msg = system.localizedStringWithFormat(“need_os_update_message”, supportedOSVer, supportedOSBuildVer);
    }
    else
    {
    title = system.localizedString(“visit_website_title”);
    msg = system.localizedStringWithFormat(“visit_website_message”, osVersionString, targetBuild);
    }

    my.result.title = title;
    my.result.message = msg;
    my.result.type = “Fatal”;

    return false;
    }

    return true;
    }

    #1.0-50-313.01.02f01-NVWebDrivers.pkg
    #NVPrefPane.pkg

  4. » Apple:“A graphics problem has been detected”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s