Safe Sleep Nonsenseanoved.net logo

Today John Gruber cited a TidBITS article about purported problems with Apple’s safe sleep feature. The author of the article, Joe Kissell, concludes that “if I can’t put my brand new computer to sleep and into its bag in less than 10 seconds, something is seriously wrong.” He’s right; something must be wrong with his computer.

As soon as I was done reading the article, I shut the lid of my MacBook. It was not plugged in. I dug a coin out of my pocket, flipped over the laptop, and used the coin to remove the battery. I waved the battery around for a moment to demonstrate that the computer I had just been using was neither plugged in nor powered by a battery. Then I reinserted the battery, opened the MacBook’s lid, and pressed the power button to restore my session. All this transpired within the 49 seconds Kissell says is necessary for his MacBook Pro with 4 GB of RAM to go to sleep:

My MacBook has 2 GB of RAM. I doubt it is true of safe sleep that “the length of time it takes is proportional to the amount of RAM you have installed.” Perhaps it is not a linear relationship, as it takes nowhere near 24.5 seconds for my machine to fall asleep.

Update: I suspect I may be mistaken if the sleep time varies inversely with the amount of free RAM. Even so, the time is not dependent on the amount of RAM installed but rather the amount in use.

Posted on Friday, August 3, 2007 at 12:31 PM

3 Comment

  1. Posted by Blogger Ian on 4/8/07 10:01 AM:  

    In replicating your experiment with Safe Sleep, I came to a few conclusions. The first conclusion is that Safe Sleep is probably a good idea for casual users, since it acts quickly under light load conditions and is a generally unobtrusive way to avoid calamity. Second, a bit of trial and error with prematurely shutting my Macbook off led to the knowledge that the white LED on the front edge of the computer glows brightly for the duration of the time that the contents of the RAM are being written to the hard drive. This was borne out when my physical memory was loaded all the way up with a variety of applications and a virtual operating system; the time needed for a successful Safe Sleep and return to operation was roughly 15-20 seconds. Any less time prior to removing the battery and the computer required a full restart and all data was lost. When the same experiment was conducted with no applications running, and most of my memory free, Safe Sleep engaged within the time needed to remove the battery. From this experience, I think it is reasonable to assume that your belief that the amount of RAM utilized, as opposed to installed, is the determining factor in Safe Sleep speed of operation is accurate. For the record, my computer is a 2.0GHz Macbook with 1.5GB RAM, running 10.4.10. It also restarts if the lid is slammed too hard. Good old sudden motion sensor.

  2. Posted by Blogger Jim on 4/8/07 1:10 PM:  

    I think you are correct. I have since observed the LED more carefully and realized that it does glow constantly for a period before beginning to pulse. Removing the battery during this time does require a full restart.

    My attempted refutation was the result of the simple test I did immediately after reading the original article. However, my confidence in the success of that trial was misplaced as it was clearly not a comprehensive test.

    It was fun recording the snarky video, though.

  3. Posted by Blogger Jim on 18/8/07 10:47 AM:  

    From the TidBITS article: "But Apple's documentation warns you that when you put such a laptop to sleep (by closing the lid, for example), you must not move it until the power light has begun pulsating."

    For what it's worth, during the year prior to this episode I've often handled my MacBook immediately after shutting the lid, either to carry it around, to put it in its bag, or simply to set it aside if I was using it on my lap. Surely it was still writing the contents of RAM to disk in some (if not many) of these innumerable cases, but I've never experienced any trouble with the drive or sleep recovery as a result of these routine motions.

    Consequently, in practice the machine seems to sleep instantly, even if it does not technically enter a fully asleep state for some period after shutting the lid. Nevertheless, I concede that in this matter I've been lucky, not that I'm right.

Post a Comment