Gigabyte GA-Z68X-UD5-B3 perfect Lion install / also Fermi

Posted 19 September 2011 - 11:54 PM

Vic-Viper

InsanelyMac Protégé

Members

18 posts

A mod in a different forum got mad that I out did his guide. So enjoy.

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"

SupportedSandy Bridge CPU with Power ManagementSleep / AwakeSoundQE /CI dual screen at full resolution on a nVidia 580 GTX with CUDA and power managementFast boot11877 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 need8GB or larger USB Memory StickLion 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.zipTenacity to succeed

OptionalnVidia GeForce 580 GTX (highly recommended)

Step 1: Setup a LION Boot USB StickUsing 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 Package3. Look in Contents/Shared Support folder, you will find a file called InstallESD.dmg4. Make a backup of these files somewhere safe, they come in handy.

Step 2: Adjust the install to suite your hardwareUsing 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.

Optional - Suggested after fully finished to make an ultimate boot device for your hardwareI 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: InstallationThis 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.

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:

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.)

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.

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 BootI 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 ModificationsIt'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 resultsBenchmarks and fun (My geekbench is currently 11945 with everything stock).

Step 8: Known flaws3D after sleep = issuesApple 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.

Updating Steps

10.7.1Once 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

Posted 20 September 2011 - 01:10 AM

sld87

InsanelyMac Geek

Members

103 posts

Great guide! Supreme kudos for you for taking the time for this.

I will be buying your system specs in an upgrade this weekend - for simplicity - hope you may be able to answer any questions that may arise. I have been involved in the scene since early leopard days but it always pays to have a hand if you get stuck,

Many thanks.

Question: I may want to tone down my GFX to say a GTX 570/560/560ti... Will anything in your guide change?
Had a quick look at the link you provided 'Fermi 5XX...' but it's not as clear to follow as yours

Another Question: What does the kernel flag npci=0x2000 -v do besides verbose mode? And do you need to always boot in that mode or just for the preliminaries.

Posted 20 September 2011 - 01:51 AM

Vic-Viper

InsanelyMac Protégé

Members

18 posts

Great guide! Supreme kudos for you for taking the time for this.

I will be buying your system specs in an upgrade this weekend - for simplicity - hope you may be able to answer any questions that may arise. I have been involved in the scene since early leopard days but it always pays to have a hand if you get stuck,

Many thanks.

Question: I may want to tone down my GFX to say a GTX 570/560/560ti... Will anything in your guide change?

Posted 22 September 2011 - 05:01 PM

segen2011

InsanelyMac Protégé

Members

9 posts

Thank you very, very much for this guide!

I just bought and built an i5-2500k system using a Gigabyte GA-Z68X-UD4-B3 MOBO and things are working very nicely.I am just using a GTX275 (no Fermi) so mine went even easier as I had to do nothing as far as video is concerned.

I actually do not have anything in my /Extra folder either as everything that was in there appears to have already been user /S/L/E anyhow.

The biggest thing this guide did for me was verify how few kexts were needed to run as Vanilla as possible.

Posted 27 September 2011 - 11:26 PM

sld87

InsanelyMac Geek

Members

103 posts

Small update, have network, sound, cpu etc working nicely (i7 2600k).

But this may be because I am still relying on the USB to boot. I get boot errors on my HDD.. Could this be because it is set up as a slave? I can boot my USB into Lion fine, but that may be why I can't get the tweaks working.

Also it won't boot without the npci=0x2000 flags. Gets stuck on 'PCI Configuration Begin'

***UPDATE TO ABOVE HDD PROBLEMI was using a WD 2TB - I have read numerous threads now that people can't seem to boot to it. Gives boot errors. Can't even see it in the BIOS using the AHCI settings. I will replace it tonight with a 1tb Seagate and try for better luck.

Also by the way I explored your Geforce bundle driver you attached in your original post, and it seems you didn't add any lines at all for your card? Was that the original you put in there?

Also another small thing you have a typo in your post, in one line you say to use the boot flags 'ncpi', it should be 'npci'.

Posted 13 October 2011 - 09:01 AM

lupo17

InsanelyMac Protégé

Members

23 posts

Gender:Male

hi Vic-Viper
thanks 4 the guide
have the same MB [GA-Z68X-UD5-B3] ...F7

followed more or less your guide (have different video-hd6870)...still got issues...working on [still not completely convinced that 'iMac 12.2" covers all the Power Management issues, excluding video...still got random KP (kernel_task)]

Posted 23 October 2011 - 12:58 PM

Posted 24 October 2011 - 01:40 PM

tsy87

InsanelyMac Protégé

Members

14 posts

OKay, im able to boot in with full res but if i install the geforecegldrive, then it wont boot. I get to the apple loading screen, then it goes to a complete white screen, hangs for a few minutes... then i get a pop-up saying something about needing to shut down and then it has a count down.

If I dont install that file everything boots up fine except my mouse and keyboard are unresponsive for the first few minutes after booting.

Posted 24 October 2011 - 09:51 PM

Just FYI I now (finally) have everything working, booting, updated to 10.7.2. Geekbenched 11,253 in trial 32bit mode.

For me, the white flashing bar I believe someone posted was fixed updating chameleon to this version (attached) AFTER installing the chameleon version from Multiboot and dragging OPs themes and stuff across. (No idea how relevant that was but it worked for me)

Posted 08 December 2011 - 01:09 AM

Hydrasworld

InsanelyMac Protégé

Members

29 posts

I got my GA-Z68X-UD5-B3 working, BIOS F8 with OSX Lion 10.7.0 and then upgraded to 10.7.2 using combo update *before* using #####.

I used ##### and #####, I'm also dual booting windows 7 x64 pro and lion on the same internal SSD. Sound working, USB working. HIS ATI 5870 triple screen working! (Display port, VGA and DVI). Looking pretty good so far but early days.

Just though I'd pop in here and thank you for posting. If anyone wants more details just ask.

On and FYI the motherboard is on clearance promotion over at SCAN.co.uk - only £130 - over £100 off!