Make Your Mac Laptop Lose Some (Safe) Sleep
The Safe Sleep feature in more recent Apple laptops is a good idea in theory: every time the computer goes to sleep, the entire contents of its RAM are written to disk so that the machine's state can be quickly restored in case the computer runs out of juice while sleeping. No data loss, no waiting for the computer to reboot, and very handy for exchanging batteries without having to shut down the machine, too.
In practice, though, this feature may not work quite as advertised, so you might just as well want to deactivate it, and you can.
Safe Sleep -- also known as "hibernation mode" -- has two main drawbacks: first, it takes a while to write the RAM contents to disk, and, second, it sometimes just fails completely.
The "sleep image" file on the hard drive is the size of the computer's RAM, and it takes time to write out the RAM's contents to that file. Depending on how much RAM is installed in the machine, this can take some 30 seconds to almost a minute. A delay you have to endure every time you send your Mac to sleep. Oops, just closed the lid and forgot to type in that one more thought you had just now? Not to worry, you can use your computer again in just a minute. Literally. This has happened to me very often, and I find it annoying to have to wait for the MacBook's status light to switch from steady-on to pulsing before the machine even starts thinking about waking up again.
Much worse, though, is that the Safe Sleep feature fails. A lot.
Ideally, the computer should enter sleep mode shortly after you see the battery warning dialog box pop up. More often than not, though, if you make the mistake of continuing to type just one more thought -- yes, "one more thought" is a recurring theme in my daily life --, the Mac may skip sleep mode like an Impala gazelle taking flight, and will just shut down completely. Without saving the RAM to disk, of course.
Overall, I think Safe Sleep has saved me from rebooting my MacBook maybe five times since I have the machine, and it has failed me countless times, so it does not really make up for the inconvenience of my MacBook's "let me write down just 'a few thoughts' from my RAM to my hard disk" delay. Hence, why not switch it off and be content with plain old sleep mode.
Judging from his article "Stewing Over Safe Sleep", Joe Kissell is just as annoyed with Safe Sleep as I am, and in a follow-up to that article, he mentions Patrick Stein's free-of-charge "SmartSleep" preferences panel. Thanks to "SmartSleep," all it takes to set your MacBook( Pro)'s sleep mode is making a selection from a pop-up menu -- no command-line acrobatics required.
Your options are "sleep and hibernate" (the default for current-model Apple laptops), "hibernate only," "sleep only," and "smart sleep." The latter will use sleep-only mode (without dumping RAM to disk) as long as the battery charge is above a certain level; if it goes below that level, the machine will additionally hibernate. Best of both worlds.
I do find SmartSleep's UI design a bit quirky, but it is very easy to use and -- unlike Safe Sleep mode -- it has always worked as advertised for me so far. If you'd like to try it out yourself: the software's free and just a 318kB download (yup, that's "kByte", as in "dial-up-compatibly small").
Update Besides allowing you to disable hibernation completely, it appears that SmartSleep can also make this feature work more reliable, as you can read in this follow-up post.
Categories
MacComments (2)
Read More Entries by Jochen Wolters.


Marcus:
If you select "Sleep Only" from its "Current Sleep State" pop-up menu, SmartSleep will display a button labeled "remove sleepimage," offering an easy method to trash this file.
I too have had some pain caused by my MBP's sleep feature. My problem was that it wouldn't properly exit sleep mode. After resuming from sleep the screen would remain black, but you could still hear error sounds through the speakers if you held a key or something like that, which leads me to believe that the OS was up it was just the screen that was black. For a while, I could not get my laptop to come back from sleeping if it slept for over a few hours. I was able to fix it by booting from the Leopard disk and running a disk repair and permissions fix. I also booted to single user mode and deleted the sleep image, but I think the disk check and repair is what did it. Also, I was able to fix the black screen by closing the lid and waiting until it went back to sleep and then opening the lid again. Sometimes this would fix the problem.