View Single Post
  (#1) Old
BAF BAF is offline
Junior Member
Posts: 27
Join Date: Aug 2009
Default Enabling Hibernate / Safe Sleep - 08-08-2009, 02:00 AM

Been waiting for Safe Sleep/Hibernate on your Mini? Well here you go. I got it working on my 10v with 10.5.7 (DellEFI - though this shouldn't matter much).

Safe sleep saves the contents of your RAM to an image on the hard drive whenever you put the device to sleep. After getting it set up, you'll be able to, just like on a real Mac, not worry about your battery dying while it is in sleep mode. If it dies, it will restore back to how it was once you power up again.

To get going, you'll need Chameleon 2.0 RC2 r640. Download this and extract it someplace. We'll come back to this later.
Modified boot file, attached to this post. Extract this someplace as well.

Next, make sure secure virtual memory is turned off. It is under Security in System Preferences.

Now, if you disabled hibernate before, run DellEFI. Do a custom install, the only thing you have to do here is re-enable hibernate (ignore the not recommended warning - it actually works with the new loader).

Now, we'll install the loader. Fire up Terminal and change into the i386 directory (within the Chameleon directory from the file you extracted). For example, if extracted in the Downloads folder, it would be cd ~/Downloads/Chameleon-2.0-RC2-r640-bin/i386. Then run the following three commands:

sudo fdisk -f boot0 -u -y /dev/rdisk0
sudo dd if=boot1h of=/dev/rdisk0s2 [note, this line may be different. If you're not sure, go to Disk Utility, right click your main partition and hit information, replace the 2 with whatever the partition # is.).

Now, change into the directory where you extracted Then run:
sudo cp boot / [note, if you have an EFI partition, copy the boot file there instead]

At this point, you have the new version of Chameleon. Take this opportunity to reboot, you should reboot just fine (it may hang on a screen with text about a hibernation file, if so, wait a few seconds and it should continue).

Once you're back up and running, you can test it out. I'd recommend deleting your hibernation file, just to make sure there's nothing stray. To do that, just run `sudo rm /var/vm/sleepimage` in a terminal.

When you put the machine to sleep, it will take a few extra seconds to write the image to disk before the power light goes from solid to pulsing. This is normal. The more ram you have, and the more stuff you have open, the longer it will take to write.

To test its functionality, wait until the light is pulsing, and pop your battery and unplug it from AC to kill it. Then power it back up. You should see a screen with a faded out screenshot of what was on your screen before as it restores, and you'll be back how it was before sleeping.

This was only tested with 10.5.7 (via DellEFI) on a 10v, but should work for anyone who uses Chameleon, albeit maybe with a few mods.
Attached Files
File Type: zip (195.4 KB, 193 views)
Dell Mini 10v, 1024x600, 160GB, 1GB, OS X 10.5.7