Saturday, May 02, 2009

Sleepless MacBooks

My MacBook, like many people's, is an insomniac. If you put it to sleep, from the menu or by closing the shell, it wakes up again, in a few seconds. This default behavior will empty your batteries and overheat your machine in its case.

Now, many things can cause this: mostly hardware interrupt handlers containing instructions to wake up. I first Googled this problem with the phrase: macbook does not stay asleep, but the Apple discussion board is completely disorganized. At the top of the page, it announces "1 solution" but doesn't give you a hint as to where it may be, in pages of discussion! I found it eventually, but I thought it would be helpful just to say:

... turn off Bluetooth.

It's in Systems Preferences under Hardware -> Bluetooth. Your computer will then get the rest it needs, without pills.


If the Bluetooth hardware is failing, the Bluetooth symbol has a little squiggle through it.

This makes the system write a hardware error to the system log (/var/log/system.log) every second. This wakes your Macbook consistently.

In this case, without repairing the hardware, you'll need to put your machine into hibernation, instead of sleep. There's a useful widget for this, called Deep Sleep.

Your Bluetooth hardware may start working again. Anytime you see the grayed out Bluetooth symbol in the upper right, without a squiggle, you'll be able to sleep normally ... if you turn Bluetooth off.