Friday, 12 January 2007

Terminal Tip: Keep your Mac portable from waking when the lid is opened

Although I'm a Mac Geek by trade, I tend to avoid the terminal unle I'm out of other optio . I'm a GUI kind of girl. It's the Mac OS that I love, not its Unix underpi ings. I a reciate the power of the command line - I just don't want to end all day there. Still, once in a while I come acro a tip like the one, which Gle Fleishman posted in the most recent TidBITS, and I find myself unable to resist the urge to fire up the Terminal.

This tip solves a problem that I've experienced myself and many of my clients have complained about - lapto waking from sleep while in their cases because the latch won't keep the lid closed. This can cause overheating, which can lead to a variety of other problems, like hard drive failures, etc. My solution is, of course, to fix the latch! But there are times when that i 't convenient and even if it's convenient it doe 't ha en often enough for some people to even bother stre ing about it. By harne ing the power of pmset, the command line a that controls power management settings, you can fix it so that your sleeping beauty stays asleep, even when the latch i 't doing its job.

The command is an easy one - a single line. Ready for it?

sudo pmset lidwake 0

By setting the lidwake value to 0 you prevent the machine from waking until you tap a key on your keyboard, and since the value gets written just to a plist file, it takes hold right away. Of course you'll need administrator privileges since you'll be asked for an admin pa word before the command is executed.



For more pmset optio , have a look at the "man" pages at A le's Darwin Reference library, or open your Terminal and type "man" (without the quotes), hit return and then type "pmset" (without the quotes.)

No comments: