Graphics Performance in OS X Lion: The Effect of Model Selection in SMBIOS.plist

A while back, I lamented some graphics issues I experienced in OS X Lion.  I didn’t have any hard evidence to support my claim, but my EVGA NVIDIA GTS 250 (512mb) card choked in OS X Lion after purring along seamlessly in Snow Leopard.  I don’t require ungodly amounts of graphics processing horsepower, as reflected by my mid-range graphics card, but I play a few games.  Not only were my KOTOR frame rates unacceptably low, but simple transition animations within OS X lagged badly.

Following the introduction of the OpenCL framework to OS X, and even more pointedly, the retirement of the PowerPC architecture, gone are the days of XBench providing reliable graphics-inclusive benchmarking for your hackintosh.  Geekbench is a great tool for measuring CPU and RAM performance, but it falls short of providing discrete graphics benchmarking scores.  Enter Cinebench, a cross-platform benchmarking utility that also happens to be free.

A reliable benchmark should compare graphics performance in OS X Lion to that of the same card in Windows, a far-away, glass-windowed land in which NVIDIA provides updated graphics drivers on a continuous basis.  Before running the tests, let’s take a look at what Windows 7 says about my graphics card:

NVIDIA GTS 250 Specs
Page 1 of the specs for my graphics card, per the NVIDIA control panel in Windows 7.
GTS 250 Specs (Continued)
Page 2 of the specs for my graphics card, per the NVIDIA control panel in Windows 7.

My machine is admittedly old, but she still gets a 5.9 (out of a total 7.9) Windows Experience Index:

Windows Experience Index
The Windows Experience Index for my hackintosh, whilst I briefly cheat on OS X Lion with Windows 7...

Let’s get to the meat:  here are the results of running a GPU-only Cinebench test on my EVGA NVIDIA GTS 250 (512mb) card in Windows 7 Professional SP1 (64-bit): 33.78 fps

Results of Cinebench OpenGL test in Windows 7 Professional SP1 (64-bit)
Results of Cinebench OpenGL test in Windows 7 Professional SP1 (64-bit)-- my machine is in orange, sandwiched between some other benchmarks for comparison purposes.

What did the same test, run on the same hardware, produce in OS X?

Cinebench Results - OS X Lion 10.7.3
Results of Cinebench OpenGL test in OS X Lion 10.7.3-- my machine is in orange.

The Cinebench test run in OS X Lion 10.7.3 produced a whopping 8.02 fps, compared to 33.78 fps in Windows 7 Professional SP1.  This means that the card was performing 421% better in Windows than in OS X– all the hard evidence I needed to back up my theory that my card was sputtering in Mac OS.  Note:  You’ll notice that I removed the #6-ranked benchmark from this screenshot; it contains the result of my final test (you can find it below).

When I first noticed the performance decrease, I had read that some users who had selected a MacPro4,1 or MacPro5,1 model number in SMBIOS.plist were experiencing similar graphics issues.  Some hackintoshers even created custom entries in the AppleGraphicsPowerManagement.kext internal plist file because the power management stepping doesn’t work OOB for NVIDIA cards.

Below is the SMBIOS.plist file I was stashing in /Extra; you will notice that because my machine most resembled an iMac, I was using the iMac11,3 identifier:

<!--?xml version="1.0" encoding="UTF-8"?-->

 SMBios by 7ender @ Created with
 Apple Inc.

By my understanding, OS X dynamically chooses which set of graphics d rivers to load at boot time based on the model of Mac specified in SMBIOS.plist, rather than analyzing the graphics processing hardware itself.  This is a bit of a programmatic shortcut, but it’s one that Apple can afford to take; Mac models and their corresponding GPUs are hard-coded and, theoretically, shouldn’t change following production of the computer.

The exception, of course, is the Mac Pro– users have long been able to upgrade the graphics card in the built-to-order Mac Pro, which means that OS X must boot more dynamically with regards to loading graphics drivers as long as SMBIOS.plist indicates that the machine is a Mac Pro.  As such, rather than deleting or modifying AppleGraphicsPowerManagement.kext to reflect my graphics card’s unique stepping, I wondered if simply modifying SMBIOS.plist to reflect a Mac Pro model rather than an iMac would force OS X to load a more dynamic set of graphics drivers at boot time.

My modified SMBIOS.plist follows below; note that the SMSerial value must also change to accommodate the modified SMProductName value:

<!--?xml version="1.0" encoding="UTF-8"?-->

 SMBios by 7ender @ Created with
 Apple Inc.
 Mac Pro

I restarted, then ran Cinebench once more:

Cinebench - OS X Lion - Mac Pro SMBIOS.plist
The two scores in orange represent the tests run with the Mac Pro and iMac SMBIOS.plist configurations, respectively.

It’s not quite the 33.78 fps result that I was able to get in Windows, but the improvement from 8.02fps to 26.29fps indicates that I’m headed in the right direction here.

TL;DR: Modifying my SMBIOS.plist to reflect a Mac Pro (3,1) model rather than an iMac (11,3) improved the performance of my EVGA NVIDIA GTS 250 (512mb) graphics card by nearly 328%.

Note: I tried using the MacPro4,1 and MacPro5,1 models as well in order to test if I experienced the same performance drop-offs indicated in the aforementioned TonyMac86 post, but Lion refused to boot with either and I didn’t have the time or energy to figure out why.

The card still performs 22% worse in OS X than it does in Windows; I will need to investigate whether or not I can squeeze some more performance out of her by manually modifying the thresholds in AppleGraphicsPowerManagement.kext.  Until then, though, I’m just happy that Lion’s GUI is running smoothly, and I can once more focus on becoming a Jedi.  Now, if you encounter a similar systems malfunction in OS X Lion, don’t worry– you know a few maneuvers.


Installing Windows 8 Developer Preview on a virtual machine using VirtualBox

Since installing the Microsoft Windows 8 Developer Preview on a VirtualBox VM yesterday, a few constituents have asked me to detail the process of creating the virtual machine in VirtualBox and installing Windows 8.

Below is a quick and dirty walk-through demonstrating how to install Windows 8 on a VirtualBox virtual machine.  Before you start, you will need to download and install Oracle’s VirtualBox virtualization software.  You’ll also need the Windows 8 Developer Preview installation media.  Finally, make sure that your hardware supports virtualization and that it has enough juice, RAM and hard drive space to run a Windows installation on top of your host operating system.  I’m running this on a Core i7 1.73GHz laptop with 6 cores and 8GB of RAM.

Once VirtualBox is installed, create a new VM by clicking the ‘New’ button.  Call the VM anything you want (I went the creative route), and select “Microsoft Windows” and “Windows 7 (64-bit)” as the Operating System and Version.

Don't worry, the similarities between Windows 7 and Windows 8 virtually end here.

Give the VM plenty of memory; Windows 8 requires at least 1GB, but I recommend at using at least 2GB.  Make sure your host system can handle it, though, because this memory is automatically allocated up-front as soon as you boot the VM.

Give 'er at least 2GB of RAM.

You need to give the VM a virtual disk from which to boot.  Select “Start-up Disk” and then select “Create new hard disk” unless you want to use an existing disk.

You can also use a physical disk if you have one...

The next options allow you to create a disk image that can be imported to various other VM players.  I chose VDI because at the moment, VMWare Player won’t support Windows 8 anyway.

Parrallels? lolz

Next, specify how VirtualBox will allocate your virtual disk space on your physical hard drive.  If you don’t want to allocate all of the disk space up front, choose “Dynamic” and the disk will be expanded as needed.

"Dynamically allocated" is faster, too.

Specify how big the disk should be.  I wouldn’t use less than 20GB.

Or you can put it on your internal 2TB laptop hard drive.

Make sure all the virtual disk settings are as you expect them to be, then click “Create.”

You can't go back now. There's no "Back" button.

Now, verify the settings for the entire virtual machine and click “Create.”

Note that you can alter these settings later (you will).

Now that you’ve created your machine, you need to configure it to properly run Windows 8.  You’ll have to specify display settings, processor cores, and mount the Windows 8 Developer Preview installation ISO.

The first tab of the “General” screen allows you to change the name of your machine if you’re feeling flip-floppy.

How about the Fighting Mongooses? That's a good team name: the Fighting Mongooses!

The “System” screen allows you to set the RAM allocation, processor cores, and virtual device boot order.  Make sure that your CD/DVD-ROM virtual drive is set to boot first.  If you don’t have one, we’ll get to that soon.

See that "IO APIC" checkbox? That's what VirtualBox has and VMWare Player doesn't, and it's required to boot Windows 8.

Click the “Processor” tab of the “System” screen to set the number of processor cores that your VM can use.  I’d give it a minimum of 2.

Don't give your virtual processor more cores than your real processor has to lend.

Enable hardware acceleration/virtualization on the “Acceleration” tab.

I'm not entirely clear on what these checkboxes enable.

You will also need to ramp up your video memory in order to use Windows Aero.  Give your VM at least 128MB of video memory, and enable both 2D and 3D acceleration.

One monitor should do.

Next, you need to mount the installation media ISO.  Click the “Storage” screen.  Notice that there are two IO controllers:

I'm not sure why you would want to virtualize an IDE controller.

Select either the IDE Controller or the SATA Controller (if you have trouble using the SATA Controller, use the IDE Controller).  Then click the little icon that looks like a disc with a plus sign and select “Add CD/DVD Device.”

You don't need another hard disk.

Click “Choose disk” to specify the ISO.  Navigate to the folder containing your installation media ISO and click “OK.”

You can un-mount this later.

You should now see the WindowsDeveloperPreview ISO mounted on your IDE or SATA Controller.

If you already have an "Empty" controller, there's no need to create another one. I just added it for the sake of explaining how to do it.

Your new VM is ready to boot!  Click “OK,” then select your VM and click “Start.”  The VM will boot up and begin booting your installation media.  If it doesn’t boot the installation media right away, you may need to hit F12 as soon as it boots to specify the boot device:

Behind the dialog box, you can see the prompt to "Press F12 to select boot device" in the lower right-hand corner.

If you’ve installed Windows before, you should be able to take it from here.  The rest of the installation moves just like the Windows 7 installation.  Here’s the boot screen (this was taken at a different screen resolution than the screens above):

Booting the Windows 8 Installer

And here are a couple screens of the installation process that I posted earlier:

Nothing new.
It actually installed much faster than Windows 7 did, but this isn't a complete version.

Finally, after a couple of reboots, Windows 8 will boot for the first time.  You will be asked to supply a Windows ID.  I don’t know what happens if you *don’t* supply one, but do you really want to find out?

Not sure how I feel about linking to a Windows ID off-the-bat. Probably about the same way I feel about OS X asking me for my Apple ID post-installation.

Happy Windows 8-ing!  Just remember that this is a developer preview– not even an alpha or a beta– so expect things to be buggy, sluggish, incomplete and strange.

I’ll post a review later on my impressions so far.

Lion + NullCPUPowerManagement.kext, iStat, CPU Temperatures and Sleep

I *slightly* upgraded my processor this week to a new Core 2 Duo E7500 @ 2.93GHz. I am constrained by my LGA 775 board and I don’t really have need for a lower-clocked Core 2 Quad at the same price (and I can’t afford to shell out for a new LGA 1155 board, Core i5 processor and DDR3 memory at the moment).

At its stock voltage, my idle temps were hovering around 46°C– way too high for stock voltage and 2.93GHz.

How do I know? I had previously used Temperature Monitor (with the additional OSx86 plugins) but ditched the application in favor of a simple FakeSMC.kext mod with plugins to monitor various hardware.  This provides the added benefit of iStat being able to read the temps like it would on a standard Mac.

I placed our old friend NullCPUPowerManagement.kext (which I had not been using previously) in the /Extra/Extensions directory and my temperatures dropped about 10°C, but with consequences: The graphics seemed less responsive than usual, typically resulting in a slight delay between graphics-intensive processes (such as activating Mission Control or Launchpad, or even switching between desktops using a two-finger swipe on the Magic Mouse).

Lion also seemingly lost the ability to sleep.

I tried removing AppleIntelCPUPowerManagement.kext and AppleIntelCPUPowerManagementClient.kext from /System/Library/Extensions (as opposed to placing NullCPUPowerManagement.kext in /Extra/Extensions), and the results were the same.  I also re-ran the AppleRTC.kext patch (just in case) and re-compiled my DSDT (I am still not entirely sure if CPU data is stored in the DSDT– I am fairly certain that it only stores chipset data, but just in case…).  This leaves me with three possible culprits:

  1. FakeSMC.kext– I replaced this in order to use the temperature-reader plugins, so I will replace it with the original version of FakeSMC.kext and try to sleep my machine.  I did eliminate the plugin kernel extensions themselves as causes.
  2. AppleRTC.kext– There is a chance that the terminal code that I used to patch AppleRTC.kext is no longer correct for my new Wolfdale 45NM processor.  I will attempt a second, less-used patch and report back.
  3. My processor– Of course, replacing my processor could have caused this technological insomnia, which I hinted at above.  What to do to fix it?  I’m not sure, but I’ll update this post when I figure it out.

I’m running my processor at 3.33GHz (333Mhz FSB  x 10) with RAM running at 1GHz (333MHz FSB x 3).  Temps are around 38°C idle, which is acceptable for now.

EDIT:  I have yet to find the correct “old” FakeSMC.kext to see if it’s the problem.  Until then, I’m just using the SleepEnabler.kext for 10.7.2.