10.7.1 Steps added
Update: Changed com.apple.Boot.plist to include C States and P States for Sandy Bridge chipsets. The My_Files.zip has been updated. You can add it yourself too with the instructions below or the post on the 3rd page.
Note: You may also notice its a very long post. The steps are quite simple, I just make sure to include what I did and why to better help your understanding of my process.
This is placeholder information as I flesh out the details. Consider this a work in progress until final.
First off, let me define "perfection"
Sandy Bridge CPU with Power Management
Sleep / Awake
QE /CI dual screen at full resolution on a nVidia 580 GTX with CUDA and power management
11877 Geekbench Score (Same as a Mac Pro)
and above else, stable. No crashes yet.
This document will be evolving over the next few days so consider this placeholder information until complete.
I plan to include information on every modified kext and procedure in 100% detail.
Cheat sheet (until fully fleshed out)
What you need
8GB or larger USB Memory Stick
Lion Installation from the App Store (You need the files before it installs, the installation deletes them. Helps if you have a Mac to get this.)
Gigabyte GA-Z68X-UD5-B3 motherboard (although this thread can be adapted for many configurations)
My Files http://dl.dropbox.co...ac/My_Setup.zip
Tenacity to succeed
nVidia GeForce 580 GTX (highly recommended)
Step 1: Setup a LION Boot USB Stick
Using Kakewalk, I migrated the Lion install files onto a USB stick. It made it bootable as well. While the Gigabyte GA-Z68X-UD5-B3 wasn't listed in Kakewalk, I chose a similar Z68 chipset just to get started.
To do this you must have the Lion installation app or the InstallESD.dmg file for Lion handy. You can get this by buying the app from the app store. Once you buy it, do NOT install it on anything yet since the install process removes the files you need. Once you download it do the following:
1. Look in your App folder and find the file "Install Mac OS X Lion"
2. Right click this file and select Show Package
3. Look in Contents/Shared Support folder, you will find a file called InstallESD.dmg
4. Make a backup of these files somewhere safe, they come in handy.
Download Kakewalk http://www.kakewalk.se/download/, run it, and select Install to a USB stick.
Now locate the Lion Install App or the InstallESD file.
When choosing your hardware platform, select a Gigabyte motherboard with a Z68 chipset. I chose Gigabyte Z68X-UD3H-B3
This takes about 15 minutes or so.
Step 2: Adjust the install to suite your hardware
Using the DSDT database http://www.tonymacx86.com/dsdt.php, I replaced the DSDT on the USB Stick with the DSDT for the Gigabyte GA-Z68X-UD5-B3 http://www.tonymacx8...X-UD5-B3-F7.aml.
Once you download the DSDT file, rename it to DSDT.aml (Note the "DSDT" is in caps) and placed it on my USB stick in the \Extra\ folder. I replaced the one already there.
I made sure the DSDT matched the BIOS I had flashed onto the motherboard (Version F7 - http://download.giga...x-ud5-b3_f7.exe).
Optional - Suggested after fully finished to make an ultimate boot device for your hardware
I also modified the Lion KEXTs to mod my hardware for me (Lion will install modified kexts by default). I did this by placing my modded KEXT files in the folder where the install keeps them (USB Stick/System/Library/Extensions/. That way when Lion installs the KEXT files, they are already modified for me. I only did this after a fully working install, this guide will cover how to install the drivers after the installation.
Step 3: Installation
This section will go into how my HDD was setup and which SATA port it was on, what BIOS settings I used, and how I prepared the partitions.
My HDD was placed on the first white SATA port. HDD settings was set to AHCI. (Fine details coming soon)
Turn on your computer and mash the Delete key a few times as it boots. This will get you into the BIOS.
Go to Integrated Peripherals then change PCH SATA Control Mode: to AHCI
Backup one screen and now go to Power Management and set HPET Mode to 64-bit mode
Save and Exit. Put in your USB stick with Lion.
Press F12 on the Booting BIOS screen to bring up a boot menu. Select USB-HDD.
It booted. The countdown slider displayed, I stopped it by pressing a key, then typing npci=0x2000 (This is supposed to happen without manually doing it, but there are cases where it doesn't) and pressed enter.
After some text went by, it started the installation. The installation had me select a language.
After hitting next, I was presented with a new screen and a menu at the top. I went to the menu Utilities and selected Disk Utility
Using Disk Utility, I formatted the drive I wanted to use Lion on with HFS+ Journaled as the format type. I did NOT make a EFI boot partition as this gave me issues with Lion. I did however make a second partition to store general files. This is an optional step.
Once formatted, I exited Disk Utility and proceeded in the Lion installation. When it asked me where to install Lion, I selected the partition I had just made in Disk Utility.
Installation takes around 15-20 minutes depending on the speed of your USB device. The machine will reboot when finished. When it reboots, press F12 at the BIOS Boot screen to bring up the boot menu.
Step 4: Post Installation
Fixing remaining kexts, adjusting your boot.apple.plist, setting up Chimera
Once installed, the machine will reboot. Press F12 at the BIOS Boot screen to bring up a boot menu and selected USB-HDD. The USB stick will try to boot the installation again with a timer. Cancel it by pressing a key. You will then be presented with other available bootable partitions. Select the new partition you just installed to. Once highlighted, type npci=0x2000 -v and press enter.
A bunch of text should scroll by. If all goes well, Lion should boot. Following some quick registration screens, you should now have a Lion desktop. (If in the rare case your registration is in an endless loop, you will need to format and re-install. This happens when the OS can't write properly to the drive. I've installed OSX many times and only had this happen to me once.)
Now we need to install your DSDT, your boot loader, and adjust your boot settings. Most of this can be done with #####.
The first step is to place the DSDT you downloaded earlier onto your Lion desktop. Make sure its named DSDT.aml. Now run #####. Select the following:
Drivers & Bootloaders>Kexts & Enablers>Audio>Realtek ALC8xx>ALC8xxHDA
Drivers & Bootloaders>Kexts & Enablers>Audio>Realtek ALC8xx>AppleHDA Rollback
Drivers & Bootloaders>Kexts & Enablers>Disk>IOAHCIBlockStorageInjector
Drivers & Bootloaders>Kexts & Enablers>Network>Realtek Gigabit Ethernet 2.0.6
Drivers & Bootloaders>Bootloaders>Chimera v1.4.1 r877 (or newer if updated)
Customization>System Definitions>iMac>iMac 12,2
OSx86 Software>Kext Helper b7
The custom profile iMac 12,2. (This will enable ApplePowerManagement and the graphics power management). Do NOT use the Universal audio driver. It has issues in Lion. The System Utilities will fix permissions, etc.
Eject your USB stick, reboot. You should see a custom boot screen. Type ncpi=0x2000 -v. This will take a little longer to boot, but if something crashes, you can see what the cause is. If all goes well, OSX should boot right up.
If you are booted, its time to edit your com.apple.Boot.plist to keep things smooth during boot time. You can find the file in your MacOS partition in the /Extra/ folder.
Here is my Boot.Apple.plist (I removed the default partition selection and hide partition properties here. We dive into that below for those who want it. My unedited version is in the file package in the /Extra/ folder.)
<?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> <key>EthernetBuiltIn</key> <string>Yes</string> <key>GraphicsEnabler</key> <string>Yes</string> <key>Graphics Mode</key> <string></string> <key>GenerateCStates</key> <string>Yes</string> <key>GeneratePStates</key> <string>Yes</string> <key>Instant Menu</key> <string>Yes</string> <key>Kernel</key> <string>mach_kernel</string> <key>Kernel Flags</key> <string>arch=x86_64</string> <key>Legacy Logo</key> <string>Yes</string> <key>Timeout</key> <string>2</string> <key>USBBusFix</key> <string>Yes</string> </dict> </plist>
I'm using an nVidia 580GTX. I modified my NVDAGF100Hal.kext found in \System\Library\Extentions\ . If you have a 580GTX use the provided version, you should be good by simply installing it. If you need to use a different card follow the instructions on this thread http://www.insanelym...hp/t260074.html
Install all three files from my files package \System\Library\Extensions\ (at the start of the thread) using Kext Helper by dragging them into the window. Put in your system password below and go
Close kext helper when it says its done (I've always had to right click in the dock and force quit )
Now go in to my Files Package and located the files in the \Extra\ folder. It should look a lot like the \Extra\ folder in your MacOS partition. The folder in my package includes a backup of how mine is setup. It also includes a fully modified com.apple.Boot.plist for my setup and a custom Chimera theme. If you want to use these, simply copy the Themes folder and the com.apple.Boot.plist files into your MacOS \Extra\ folder.
Once its complete, we need to install the latest CUDA drivers. Download and install the following: http://developer.dow....0.21_macos.dmg
My adjusted file includes the fix for getting OpenCI working so you shouldn't need to address that. Instructions on what was done can be found here http://netkas.org/?p=794
Step 5: Multi Boot
I use Windows 7 on another HDD. This will go into how I setup Chimera to function easily. This is easily done with Chimera Bootloader and a well tweaked com.apple.Boot.plist. I tell the boot file to ignore certain partitions, to adjust the auto countdown timer, and to prioritize one OS over another.
First, how to select a OS by default. This is done by adding the following into the com.apple.Boot.plist. This is how mine is setup, your #s may vary. (Mine has the second drive (1) and the second partition (2) selected. If I wanted the first drive, it would have been hd(0,2) )
<key>Default Partition</key> <string>hd(1,2)</string>
Next, we want to hide any partitions that do not have OSs installed. You can do this by adding the following. (Note that I have 3 partitions hidden from 2 different drives)
<key>Hide Partition</key> <string>hd(1,1) hd(1,3) hd(0,2)</string>
Step 6: Understanding the Modifications
It's no good to have it all done for you without understanding how it was done. This section will go into the Power Management (Done by using iMac Profile 12,2, kext editing) GPU Power Management (kext editing), nVidia CUDA support, and full sound support.
First off, the DSDT. What does it do? It's like a software BIOS that we can freely modify without flashing our onboard BIOS (handy). In our case it helps Lion understand how to access our CPU, our Network, and our Sound. It also makes sleep mode possible. You can run LION without a DSDT, but you will lose stability and features.
Fermi (nVidia 4xx / 5xx cards) is supported in Lion, but locked away. I modified the NVDAGF100Hal.kext (driver) to include my video card (nVidia 580 GTX in my case) in the list of supported cards for the driver.
We then added OpenCI support by using a modified GeForceGLDriver.bundle file. All thats been done is had two values changed (in this case, two "2"s turned into "3"s).
We changed our AppleGraphicsPowerManagement.kext to include properties for an nVidia 580GTX for anyone running on a 12,2 system profile (iMac).
We changed our profile in ##### to 12,2 to show our system is an iMac. This was done because that iMac is also running Sandy Bridge with the same CPU. It also enables Apple's Power Management drivers. This will assure more stability and compatibility.
Step 7: The results
Benchmarks and fun (My geekbench is currently 11945 with everything stock).
Step 8: Known flaws
3D after sleep = issues
Apple Boot Logo is off center during boot
OpenGL will lock your system due to a bug in the bootloader. This is fixed by adjusting your com.apple.Boot.plist. Add a section for Graphics Mode and in the string value, leave it blank. This is already done in my version of the com.apple.Boot.plist.
<key>Graphics Mode</key> <string></string>
This will cause your booting apple logo to show up in the top left corner during boot, but it will fix the OpenGL freeze.
Now, if you put your machine to sleep, then wake it up, 3D will lock your machine since the bootloader bug returns. Everything else works fine, but 3D doesn't like to wake up.
Once you're setup on 10.7 it is time to update to 10.7.1. To do this, go to the apple logo in the top left corner of your screen and select Software Update...
Run the update for 10.7.1, this will restart your computer.
This will update the kernel, the sound drivers, and the video drivers. If you needed to modify the GeForce video drivers to support your video card, you will need to re-mod the new drivers. I have pre-made the GeForce GLDriver.bundle for OpenCL support and added the nVidia GeForce 580GTX into the proper driver. Just download this file and install using Kext Helper
Lastly, your sound will no longer function after you reset. Simply run ##### and select the AppleHDA rollback. Once applied, restart and you should be good to go.
Drivers & Bootloaders>Kexts & Enablers>Audio>Realtek ALC8xx>AppleHDA Rollback