MacBook Pro won’t wake up from sleep

May 24, 2009 — 6 Comments

One day my new MacBook Pro 17″ wouldn’t wake up. When I opened the lid machine was running but the Desktop wouldn’t load (just a default blue Desktop background colour) and there was no response from the Mouse or Keyboard. I eventually had to hard reset the Mac.

This annoying issue can apparently be caused a few different ways, but if your Mac is new and has all System Updates applied, chances are that the issue is caused when you close the lid and then move the mac before the contents of RAM are written out. There’s a feature called Safe Sleep, enabled by default, which can preserve and restore the state of a sleeping Mac even when the battery is removed. This sounds great, but the Safe Sleep procedure can take up to 30 seconds, which is too long for me.

How to fix this annoying problem? Here’s how I switched it off:

sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage

…you need to supply the super user password. After making the change, reboot the Mac. The Mac should now Sleep within a couple of seconds. The second line removes the file that Sleep Safe uses to store the contents of RAM. Since you’ve switched off Safe Sleep, the space can be recovered.

Personally I don’t see the need for Safe Sleep on a Mac with a non-removable battery, but be aware that if the machine is asleep and runs out of battery power you wil lose your logged in session! I haven’t tried it, and most OS X apps will deal pretty well with this anyway, but it’s not wise to let this happen…

More details:

Apple pmset Manual
Macworld article on setting sleep modes

By Jay Docherty

Posts

6 responses to MacBook Pro won’t wake up from sleep

  1. If you put your laptop to sleep (regular sleep) it will continue to drain your battery. If you leave it like this for a while, and safe sleep is disabled, you’ll lose everything, and not be able to use it agin until you are at an outlet. Personally I almost never use UNsafe sleep!

    By default your laptop only uses safe sleep if it is low on juice, but you can set it to always use safe sleep when it is unplugged. (Or always, but that doesn’t seem sensible.) (I believe if it is in unsafe sleep and gets low on power it will hibernate, but I’ve not tested this recently.)

  2. Thanks Brandon, I didn’t really consider that! I was more worried about the time it takes to go to sleep. Safe Sleep starts to make sense if the Mac might be sleeping for a while. Personally my Mac is not ever asleep for long, but I can see Safe Sleep has its place. It’d be nice to see some System Preferences control for all this stuff… Cheers!

  3. A linkage between “non-removable batteries” and “disabling SafeSleep considered harmful”: if you “calibrate” your battery occasionally, by letting it run down, then you’re deliberately doing exactly the thing that requires SafeSleep, or causes you to lose all your live work.

    If you *don’t* calibrate the battery, I’m not sure I underdstand the consequences. It’s always described in reply to a question like “my battery doesn’t last very long any more.” But descriptions of the process, especially at Apple, seem a bit obscure; it may be doing nothing more than retraining the stored notion of what constitutes “full” and “empty,” to track the degraded battery!

  4. Jack: thanks for the comment. I think I’ve changed my mind about SafeSleep thanks to you guys. Will switch it on so I can calibrate the battery with confidence…

    Hey SCPlugin looks cool… I will download it and give it a go. I currently use the Terminal to manage all my Subversion stuff but it’s not very Mac-like! I have used Tortoise on Windows a few years back and it seems like integration with Explorer/Finder is the way to go… Cheers!

  5. I love what you guys are up too. This sort
    of clever work and exposure! Keep up the superb works guys I’ve incorporated you guys to blogroll.

Trackbacks and Pingbacks:

  1. 40 Useful Mac OS X Shell Scripts and Terminal Commands - May 24, 2009

    [...] …Also see my post about hibernate mode and Safe Sleep on the Mac [...]

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>