MacBook Warning

May 30, 2007 - 2:36pm ||| 0 Comments | Add new

If you're an experienced Mac user who is now the proud owner of an Intel-based laptop, especially if you used to use a "regular" Mac laptop (a PowerBook or an iBook), you may not have bothered to read the User Guide that came with your new baby. What's to learn, right? It's faster and it can run Windows. The end. Let's start loading software!

I'd like to call your attention to page 15 of said manual, in the section on Putting Your MacBook to Sleep. Right after it tells you how to put it to sleep by closing the lid (duh), you'll find these lines with a boxed rule around them:

"NOTICE: Wait a few seconds until the sleep indicator light starts pulsing (indicating that the computer is in sleep and the hard disk has stopped spinning) before moving your MacBook Pro. Moving your computer while the disk is spinning can damage the hard disk, causing loss of data or the inability to start up from the hard disk."

And by "a few seconds" they actually mean more like "twenty to twenty-five seconds." Try it! Close your MacBook or MacBook Pro laptop and watch that little light by the latch. It stays steady for a long time before going into "pulse mode," unlike the older Mac laptops, which start pulsing within two or three seconds.

It's quite difficult to break the habit of closing your laptop and then almost immediately sliding it into your bag or picking it up and moving to another room. Especially when a cab is waiting or someone is holding the elevator door for you! But wait you must. During those twenty excruciatingly-slow seconds, the Mac is writing a lot of data to the disk before it actually goes to sleep. Jostling it around then is the same as jostling it around while it's saving a morning's worth of edits to a huge Photoshop file or something.

Safe Sleep
So what is it doing while the light stays steady? It's going into "Safe Sleep" mode by writing the contents of RAM to the hard disk. You probably already know that if you leave the laptop asleep long enough without being plugged in, it'll eventually run out of power and shut down on its own. Without Safe Sleep, after you plug it in (or put in a fresh battery) and start it up again, you'd have lost any unsaved changes in any documents you left open.

With Safe Sleep, after starting it up again, you'll see a little progress bar appear temporarily, indicating that it's restoring all your documents and open applications to the state they were in before the laptop lost power.

The Safe Sleep feature is found on all the Intel-based laptops, and may be enabled on other Intel-based desktop Macs, but I haven't been able to track down that information. No matter, because the issue of moving the computer while it's doing its Safe Sleep thing (writing RAM to the disk) is only crucial for the laptops, which tend to get moved around a lot, especially after a busy laptop owner snaps the lid shut.

Disabling Safe Sleep
If you just can't stand the Safe Sleep wait, or you don't trust yourself to remember to wait in the first place and possibly damage your hard drive, you can disable it. Unfortunately, I couldn't find a neat little shareware program, script or widget that'll do this for you. You'll have to get your hands dirty in the Mac's Command Line Interface utility program, Terminal.

Everything I say from here to the end of the article comes with a caution that I'm not a Unix geek and am just reporting what I've read on many, many learned forums on the subject. And I've done the following steps myself with my MacBook Pro with no ill effects. Still … be careful out there.

Open the Terminal program from Applications > Utilities and enter this command:

sudo pmset -a hibernatemode 0

… then hit Return, and enter an admin password when prompted. Now you can quit Terminal. The next time you close your laptop's lid, note how much more quickly it goes into normal Sleep mode.

By the way, you'll still have a large file sitting in /private/var/vm called "sleepimage" that was reserved for Safe Sleep, equivalent in size to the amount of RAM you have installed. So if you'd like to free up a gig or two of hard drive space, you can delete this file with no ill effects. You'll need a utility that lets you see invisible files on your Mac in order to do this, or you can remove it via Terminal (press Return after each line):

cd /var/vm
sudo rm sleepimage

If you change your mind and want to reenable Safe Sleep, issue this command in Terminal:

sudo pmset -a hibernatemode 3

… entering a Return and supplying an admin password if prompted. There's no need to restart the Mac, and the invisible sleepimage file will rebuild on its own.

Here are a couple web sites with full discussions about the Safe Sleep issue, if you'd like to read more. I'm using the TinyURL service because the actual URLs to these blog posts and forum threads are really long.

Macworld article by Rob Griffiths: thread:


Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.