Wednesday, August 24, 2011

How Do You Like Them Apples?

     Someone I know asked me "Why are you posting all these things about your Mac?" , and it dawned on me that not all people know what it is that I, along with the rest of the OSX86 community, are doing or are showing (by means of this blog or by means of a few forums on the Internet).  I realized that only a very few among the population probably know what the big deal is about why we get so giddy and euphoric when we get successful system updates, or when we finally have the sound card functioning, or when we attain full resolution with our graphics cards, when every one and their uncle can update their Macs with a few mouse clicks.

     The fact of the matter is:  I don't have a Mac.  I have a Hac(k).

   A Hac(k) is when you assemble your own system "almost entirely" (more on this later) out of non-Apple branded parts.  You buy a regular motherboard (from Fry's or Newegg or wherever you get your electronic jollies) and buy a standard hard drive, and a standard DVD-RW drive, and a standard graphics card, and whatever else you need to assemble a functioning computer system.  The one thing (not the only thing, though) that you should buy from Apple is Mac OSX.  You should not download from some torrent site, nor should you get some copy from someone else.  Once you get all these, that's when the magic begins.  It is like putting a Maserati engine inside a Japanese car.  You tweak it, you curse it, you love it, you spend too much time on it - until it works just like the way you want it to.

     A little backgrounder: Mac OSX is designed and supposed to work only on things made by Apple.  But.... when one can make it work without modifications (Vanilla install) on other systems, it makes for a very enjoyable hobby (if you are into this sort of thing, but if you're the type who thinks being a geek means just being able to play DoTA, or that you watch Anime, then save yourself from the headaches that follow).  

     Don't get me wrong, I do like Apple products, and I do own quite a few of them. But the thing is, an Apple product is like a steel vault - it functions the way it should almost without failing and will last for a long, long time, and it almost never fails you and your high expectations, but in the end, it is all it is, a steel vault.  You can tweak it a little bit, and modify it here and there somewhat.  But when it does fail, and you have to talk to some half-wit kid in a blue t-shirt who thinks he is your personal conduit to Palo Alto and who does not have any idea what a Boolean or an EFI string is and he tells you that you need to buy a $400 graphics processing card to replace the one that died on you (and you can only get it from Apple, of course), you might be happy accepting your fate in your little corner of the world.

     This is the reason why there are OSX86 or Hackintosh forums.  When you take a look at Hackintosh forums, you see all these people from every country in the world doing some kind of show-and-tell, doing whatever marvels or miracles they're accomplishing with their systems. And the best thing is, they are all excited to share their solutions (like this blog) to anyone and everyone in the Hackintosh community who might be interested, and help anyone who are in need of solutions in running their systems.  Most, if not all, of these people own real Apple and Mac products, but they would like to go beyond the buying, the fad-surfing and the posing. They don't feel the need to be proud of what they can buy ready-made from a store (like some people you, or I, may know or are acquainted with).   There's no fun in that, as anyone can buy anything these days no matter what, because this is the new way of the world.  Buy now, think of the consequences tomorrow.

     What most people in the OSX86 community like is the challenge, and the challenge is in the what-does-not-work, not in what works.  "What works" is boring, you can buy "what works", and "what works" comes to you gift-wrapped in a box.      

     You have to realize that we do this because we are proud of the possibility to bend (not break) programming and system rules, to have fun, and to be involved in intellectual interaction along the process.  So for those who did not know before, well, now you do.  So now, how do you like them Apples?

Thursday, August 18, 2011

10.7.1 Success


I updated my system using the combo update.  There are two ways to fix sound (for this particular motherboard - a Gigabyte H55M-S2V F3):

1) If using VoodooHDA, the 10.7.1 update will cause a kernel panic after reboot.  Don't panic. Boot with Hackboot, reinstall Voodoo kexts using Multibeast 3.8.0 and everything will be ok after the next reboot.


2) If using GigabyteALC888bautoHP.kext, then reinstall AppleHDA.kext from 10.6.4 and HDAEnabler.kext into Lion/Library/Extensions using Kext Utility or Kext Helper B7, run System Utilities from Multibeast to rebuild cache and permissions, and you're good to go.
         Everything else works, and I noticed a faster boot up sequence after the update.  I had my Xeon X3440 running at 3.55 GHz before, but decided that I did not need that much horsepower.  I toggled it down to 3.4 GHz instead, and the idle temps are running at a cool and steady 35-37 degrees Celsius for all 4 cores (maxing out at around 54-58 degrees Celsius at full load).


    Now Running (With The) Lion

         Finally, I've had success with my Lion install. I have tried several paths for a good week and a half before determining the best way to do it (in my situation and with my hardware).  I first followed Tonymacx86's guide to the letter by upgrading my fully working 10.6.8 system to 10.7, but I could not get past [PCI Configuration Begin].  


         I learned of two ways that I could boot into Lion when I got this error: either delete GeForce.kext (which allowed me all resolutions from my graphics card, with all functionally in the system EXCEPT QE/CI, which prevented me from playing Starcraft 2, or use Aperture/iMovie/Frontrow/etc) OR replace AppleACPIPlatform.kext and IOPCIFamily.kext to their Snow Leopard 10.6.7 counterparts, but also blitzed my video card and only allowed for 1280x1080 resolution. 


         I've tried all kinds of fixes, from replacing all the GeForce and GL kexts to the previous versions, to booting with npci=0x2000, PCIRootUID=1, -v, -x and all kinds of flags, but all to no avail. Good thing I made working clones of my 10.6.8 system, as well as all my installs with close to full functionality including the xMove installer partition, which really came in handy later in the process.


         After trying several ways and reading various forum topics, I was able to come upon Hackboot, which in function is just like iBoot except it allows you to boot into Lion and the xMove Lion installer.  I decided it was better to go ahead and do a clean install of Lion after acquiring a copy of Hackboot. I was disappointed that even after doing a clean install, I still came upon the same errors, and still could not get QE/CI from my video card even with a fresh Lion partition. I still had to delete GeForce.kext to fully boot the system, get all resolutions but no Quartz extreme at all. 


         I played around with this new clean install for a couple of days albeit sans QE/CI, just so can  look under the hood and play around with it as I was able to get on the internet.  After a while, I decided to do another clean install on a separate partition.  I wanted to just gut out whatever kexts were not functional without having to worry since I already had that other partially functioning partition to go back to in case.  At this point I was already strongly contemplating buying new hardware due to frustration, and I was already looking at new graphics cards and mobo/processor combinations, while checking the forums to see which ones are most functional.

         A funny thing happened on this new partition/install, as I noticed that during Lion installation I was able to boot into the installer with full 1920x1080 resolution.  When it finished installing, I had full QE/CI on this new installation BUT no WiFi or bluetooth detection and NO WRITE permissions (so I could not run Multibeast, can't get into the S/L/E folders, no write access at all). It dawned on me that I just had to keep on trying new ways of getting functionality, and realized that my hardware was not at fault.  


         I tried to re-install on this new partition, but still I can't get any WRITE access at all, even if I created a separate partition and do yet another fresh install. I then decided to fully erase my hard drive (I had the partition images saved to external drives anyway) after I read somewhere online that my MBR might be corrupt from all the many re-installs and re-partitioning. 


         I tried the regular erase method  but it did not work (still had NO WRITE permissions) and so I used the 7-pass method in the Mac OSX installer Disk Utility. After this, I made the necessary partitions (three in my case, Lion, Installer, and Storage) including the 8 GB Lion Installer partition, and restored the image I created before on it.  Finally, here are my steps to getting a fully functional Lion Hackie:

    1) Inserted Hackboot CD and booted from it.

    2) Chose Installer from the partition choices. Hackboot always boots in verbose so it takes a little while. Once in the Mac OSX installer environment, I installed Lion.

    3) Still using Hackboot, I booted into my new Lion install.

    4) I used Multibeast 3.7.2 in order to use Chameleon loader instead of Chimera (Chimera was buggy for me in my first few tries, and Chameleon was very stable), and at first, I could not run System Utilities (results in an error with Multibeast).

    5) Installed GA-H55M-S2V f3 DSDT first, then installed Voodoo kexts for sound. Only after installing these two did I run System Utilities but ONE at a time (for some reason, this method works, I did this on a hunch) - repair permissions first, then rebuild caches after. This did not result in the previous error.

    6) Installed AppleACPIPlatform.kext and IOPCIFamily.kext from Snow Leopard 10.6.7 (10.6.8 results in [DSMOS has arrived] and [PCI Config error]) using Kext Utility. Ran System Utilities again (can run them together now instead of one at a time).

    7) Installed Chameleon bootloader, Mac 3,1 definition, JMicron36xSATA and IOAHCIBlockStorageInjector with System Utilities.

    8) Edited com.apple.Boot.plist with npci=0x2000 kernel flag, GraphicsEnabler=Yes, Graphics Mode = 1920x1080x32 (for boot screen), Timeout=1.

    9) Edited smbios.plist for Xeon recognition (About This Mac showed Intel i7) with SMcputype=1281. Ran System Utilities.

    10) Rebooted to see if I don't get any errors at boot time.

    11) Boot was okay with no errors but NO QE/CI yet, and no resolution choices at this time. The older IOPCIFamily.kext and AppleACPIPlatform.kext knocked out my WiFi functionality (no WiFi card detected even though I had a DIY BCM94321MC Apple card stuck into a PCI-E x1 adapter, go figure).

    12) Instead of installing NVIDIA drivers (the NVIDIA drivers was what got me into that having-to-delete-Geforce.kext mess so I decided to go on a different route), I ran OSX86Tools and got the custom hex data for my PNY Verto 9600 GT 512 mb 256-bit.

    13) Edited com.apple.Boot.plist again, this time to add device-properties=[9600 hex data].
    After running System Utilities for the Nth time, I rebooted, and finally got full QE/CI with my 9600 GT.  I also used EFIStudio to grab the EFI string for my ethernet device to prevent "This computer or device could not be verified" error in App Store.  I spliced the ethernet and video card EFI strings together, and inserted it into com.apple.Boot.plist.

    14) For the WiFi solution, I have junglistmassive and Gravewyrm to thank [http://www.tonymacx86.com/viewtopic.php?f=19&t=26924]. I downloaded the Broadcom43XXFamilyrev2.kext and installed it using Kext utility. At first, it was a no-go. After reading down the topic, I came upon Gravewyrm's post, which instructed deleting IO80211Family.kext, then installing the Broadcom next. This gave me WiFi after reboot.

    15) Edited com.apple.Boot.plist for one last time to add Quiet Boot=Yes.  I also edited smbios.plist to make sure About This Mac identified processor as Xeon instead of Core i7.  Rebooted.

    16) Fully functioning Lion at last.

    17) I was getting the CMOS reset error, and even when I used ElliotForceLegacyRTC.kext, I was still getting a BIOS reset after restart whenever I let the machine sleep. I replaced AppleRTC.kext with the version from 10.6.7, and that fixed it.


         Hope this helps anyone out there. All I could advise people is make clones and images, and copies of all the things important (especially the ones that work) before doing anything, and keep at it. There are so many people with great ideas out there. Thank you to Tony, Macman, Insanelymac, junglistmassive, Gravewyrm, netkas, kexts.com, and all the other contributors to the Hackintosh community.