Does your Mac portable never fall asleep? Have you ever found your MacBook steaming hot with the fans running full blast? On wake do you experience a blue screen which never goes away? If you answered yes to any of these questions, your Mac has a sleep issue.
The next question you want to ask yourself is how often does this occur. If it’s an occasional occurrence, I wouldn’t lose sleep over it (pun intended). However, if you’re like me and have to cautiously watch for the pulsating sleep light before even considering putting your Mac away, I would read on.
The Cause
The problem evolves around a feature Apple has added in recent years called Safe Sleep. What Safe Sleep does is copy the contents of RAM to the hard drive. Should the RAM loose power, your Mac resumes from sleep using the image Safe Sleep created on the hard drive.
Unfortunately, this feature does not always work correctly. In my testing, I’ve found Safe Sleep fails to put your MacBook to sleep if something was actively writing to the hard drive when you initiated sleep. I’ve also found Safe Sleep fails if you move your portable slightly before it’s asleep. In this case the Sudden Motion Sensor is triggered, parking your hard drive until the motion has stopped. A glitch in the software apparently never unparks the hard drive, thus causing a failed sleep.
The Fix
Word on the street is Apple plans to have a fix for some sleep issues in 10.4.9. Whether 10.4.9 will solve this particular issue remains unknown. Thankfully, you can easily fix your sleep issue now. All you have to do is disable Safe Sleep. Since your Mac is not sleeping correctly to begin with, Safe Sleep’s functionality is anything but safe.
To disable Safe Sleep, open up the Terminal and type the following line:
sudo pmset -a hibernatemode 0
In the event you need to re-enable Safe Sleep, use this line:
sudo pmset -a hibernatemode 3
With Safe Sleep off not only do I find my Mac no longer fails to sleep or wake, but my Mac instantly falls asleep; perfect for those mad dashes out of the classroom upon the words “class dismissed”.
Hopefully this will solve your sleep issues. If not, have a look at this MacFixIt article. There are a number of other possible solutions ranging from unplugging USB devices to reinstalling Mac OS X. Judging from the number of forum threads I’ve read, Safe Sleep seems to be the culprit 90% of the time, so give disabling it a try.

5 Comments
I hate it when Terminal gives me THAT message:
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type
#3) With great power comes great responsibility
As a bonus, after Safe Sleep is disable and you machine rebooted, you may reclaim some hard disk space by removing the sleep image file /var/vm/sleepimage
Ming, do you know if removing the image has any adverse effects? If I wanted to reenable Safe Sleep down the road the image will automatically be created again, correct?
10.4.9 actually STARTED this problem for me. I had never had a problem, until applying 10.4.9 and now I have the exact symptoms you describe.
Just a comment in response to Kyle: the big warning message you’re referring to actually comes from the “sudo” command, which allows regular users to run privileged commands without needing to enter the root password. It was written about 25 years ago, in an era when regular users didn’t have their own computers, they only used mainframes that were set up by other people. Now, in the 21st century, when you’re doing something on your own machine, it doesn’t make a lot of sense to mention getting a standard lecture from your System Administrator, but the message hasn’t been changed.
You should only see this warning message once. After that, sudo will remember that you’ve already seen it, and don’t need to see it again.
Sudo’s behavior of asking for your password (just to make sure you’re really you, before allowing you to run a command with access to destroy the entire machine) is what inspired Mac OS X’s behavior of asking for your password when you install applications, or change various things in System Preferences.
2 Trackbacks/Pingbacks
[...] users and fixes numerous bugs in Tiger. Looking through the release notes, I see no mention of the sleep fix I discussed a few weeks ago. Regardless, I have installed the update without [...]
[...] to Ronald Heft, Jr. advice, I have finally resolved the issue of my MacBook frequently freezing up when going to sleep. [...]
Post a Comment