rentzsch.com: tales from the red shed

Curing MacBook Pro 17" Insomnia

Bugs

Ever since I bought my MacBook Pro 17", its had issues with unexpectedly waking from sleep. It’s literally uncool when you pull your MBP out of your bag, and its entire case is hot to touch, fans blowing full speed, battery drained from its futile attempt to cool itself inside what amounts to a blanket.

My initial theory was that its sudden motion sensor was firing, and a bug in Mac OS X woke the machine when it shouldn’t. The problem with this theory is my previous MacBook Pro 15" (Core Duo) never exhibited this problem.

I tried a number of techniques to cope, finally alternating between two undesirable choices: simply shutting down the entire machine when toting it around or attempting to time bag insertion with Safe Sleep’s sizable delay when it is dumping RAM to disk (understandably, the machine is largely catatonic during this operation, and I discovered during those magic ~10 seconds the machine was impervious to being accidently re-awoken).

The latter technique was more desirable from a state-retention stand point, but still I would find my machine overheating in my bag. Worse, it’s somewhat dangerous. That ~10 second delay is the result of a ~3GB write to the drive, so by stashing the machine into my bag during that temporal window, I’m jostling the drive right when it’s busiest. That’s bad hardware karma.

Finally I just accepted the flaw and when I knew the machine would be in my bag for more than five minutes, I’d just always completely shut down. Suck.

Quite by accident I stumbled upon Glenn Fleishman’s TidBITS posting. I’m not sure how I missed it in the first place — I subscribe to their feed. Anyway, Glenn mentioned a power management setting I had previously overlooked: lidwake. The man page for pmset says this:

lidwake - wake the machine when the laptop lid (or clamshell) is opened (value = 0/1)

I immediately gave it a shot and issued this command:

sudo pmset lidwake 0

I’m happy to report my MacBook Pro 17" now sleeps peacefully in my bag, even being after inserted + jostled + removed. Apparently the Sudden Motion Sensor was innocent after all, the genuine source of my insomniac angst being an oversensitive lid sensor.

My current theory is the 17"’s sheer girth slightly bends its frame, tripping the lid sensor. A friend is sending his 17" in for service hoping to physically resolve the same issue on his machine. I’ll update this entry, reporting back if he gets any satisfaction, but for me this simple lidwake software work-around solves my issue.

Friday, November 02, 2007
09:44 PM