Hackintosh Fix – Mac OS X freezes when trying to shut down, restart or sleep.

One of the issues that plagued me during my “Mac OS X on a regular white box PC” experiment was how the computer refused to shut down, restart, or go into sleep mode. Recently, OS X 10.4.7 has become available (I had previously used 10.4.6), and I thought I’d give it a try again. The shut down bug remained, but after looking through the forums, I finally found a fix.

There are 2 parts to this fix. Each involves editing a different file. Before going any further, both these files are pretty key files needed for the OS to function. So pardon the caps, but BACK UP FIRST! If you screw things up, Mac OS X probably won’t start up, and you might have to reinstall. In fact, even if you don’t screw things up, the installation could be messed up for various other reasons. This worked for me, it may not work for you. YOU HAVE BEEN WARNED!

Oh, and you might want to print this out to keep from switching between windows. Up to you. One last thing before we get started. You might not need to do Part I. But you might. You could try doing Part II, restarting the computer and then testing to see if you need Part I. I happened to do them both though.

Part I –

Start Terminal. It’s in the Finder, under Applications – Utilities. Once it’s open, type the following:

cd /library/preferences/systemconfiguration

sudo emacs

It should ask for your password at this point. Enter it in, and you should be in the emacs editor. Originally, you will see lines that look like this:


You want to add Platform=ACPI in the Kernel Flags section. Use the arrow keys to navigate to the String section under Kernel Flags, and add Platform=ACPI . It’s probably case-sensitive, so type it exactly as I have. When you’re done, it should look like this:


To save your changes, hold in the Control key, and press X and then S to save it. Then press and hold the Control key and press X and then C to exit.

Congratulations, you’re done that part.

Part II – mach_kernel

You will need a hex editor for this part. The one I used (which was mentioned in the forums) is called 0xED. You can download it from this page . Download it to your desktop. Once downloaded, double click on the downloaded file to open/uncompress it. You should be left with a new program on the desktop called 0xED. Don’t run it yet.

If you closed Terminal, open it again, and type the following:

cp /mach_kernel ~/Desktop/mach_kernel

That should make a copy of the file on your desktop which you can edit. Now on your desktop, right-click the new mach_kernel file, and choose “Open With/Other”. A new window will open to let you choose a program. Browse to the desktop and choose the 0xED program. The 0xED program should start up, and load the mach_kernel file.

In the 0xED program, from the top bar, click Edit/Find/Find. In the new Find window, change the Search Type to Hex. Then,
Under the Find box, type: EBFE9090
Under the Replace box, type: B0FEE664
Click “Replace All”
In the lower left of the box (underneath “Find Next”), it should say “1 item(s) replaced”.

Now close the Find box, Click File, and then Save. Exit the program.

Head back to Terminal, and type:

sudo cp ~/Desktop/mach_kernel /

It may (or may not) ask for your password again.

Congratulations, you’re done!

Cross your fingers and restart the computer.

One final note, this cured the Shutdown and Restart freezes that I had, but Sleep was still freezing. As it turned out, going into my BIOS settings, and changing the power saving mode from S3 to S1 solved it. Either OS X doesn’t support S3, or it’s simply not supported with my motherboard.

Good luck, and to pass credit where credit is due, the particular posts that I read in the forums came from dogboyaa and itmandan, although many other posters had helpful information as well. If you have trouble following my instructions, taking a peak at that post might be a good idea.

  • Eddy

    I began with the part 2 section and I typed, cp /mach_kernel ~/Desktop/mach_kernel
    and supposedly it will make a copy of the file on my desktop, but that never happened. I’m curious as to if I am missing something. I went with the easybeast set up and not the DSDT setup. Not sure if there is a huge difference between the 2 (first-timer). I am running into this issue as well and its getting rather annoying. I am upgraded to the current 10.6.8 version of SL. Any help you can provide would be greatly appreciated.

    • Eddy: This was written quite some time ago when 10.4.x was the latest thing – I wouldn’t recommend hex-editing the 10.6.x mach_kernel unless somebody’s stated they’ve done it and it works.

      Actually, if I remember correctly, I believe multi beast has some optional kexts it’ll install that should address the sleep issue anyway (easier, and safer). Alternately, you can go the DSDT route, if you can find a DSDT for your motherboard. The DSDT route’s a lot cleaner.

      As to copying mach_kernel to the desktop, it may have worked – by default it’s hidden (many 10.4.x hackintosh installers un-hid it), so the copy may be on the desktop and simply hidden – you’d probably have to use ls ~/Desktop in terminal to verify it’s there.