Tuesday, December 1, 2009

"Fixing" my PowerBook's Lid

I love my little PowerBook G4, but it's starting to show its age. In particular, the case itself has taken some wear over the years. Dings in the aluminum don't matter that much, but one piece of damage has seriously affected its usability.

Macs have always worked well with power management. You close the lid and it goes to sleep. When you open the lid again, everything just pops up. It's power management without thinking. Macs were doing this before Windows thought to copy them and before Linux knew how to resume. (Suspend is easy; it's brining things back that's tricky.)

Anyway, this handy feature worked fine, up until my Mac wouldn't stay shut. There is a little spring-loaded magnetic hook that would pop down from the top of the case when the lid was close to the base, and that would hold the laptop shut. That hook broke off earlier this year. So the case will naturally rest right on the edge of the open/shut sensor. If I travel with it in my backpack, it goes in and out of sleep every time I shift my weight. It's strange picking up my bag and then hearing the beep that tells me I have new mail. You can imagine what this does to my battery life.

I finally figured out how to "fix" my PowerBook without disassembling the case. There's a simple command line that will prevent the laptop from waking up when the case is opened:

sudo pmset -a lidwake 0

After running this, my laptop won't wake unless I hit the power button on the keyboard. The pmset command is a utility for changing power settings. It performs the same changes that the Energy Saver preference pane does, plus a few. The "lidwake" setting doesn't show up in Energy Saver, but you can still set it directly.

No comments:

Post a Comment