lidwake


Well, it finally happened. For a long time, the clasp that holds my laptop lid closed has been flaking out. It wouldn’t latch for a long time about a year ago and I can’t remember the last time the spring worked – the one that was supposed to retract it when the cover was open. Yesterday however, it just came right out. So I tried to wrangle it back into place, but that wasn’t to be.

So this morning, realizing that I wasn’t going to be able to sleep my computer because when the lid opens it wake up, I started to do a little digging. No where in the system preferences does it allow you to specify whether opening the lid will wake up your computer (which is the default) and more importantly it doesn’t let you disable that feature. But a quick search of Mac OSX Hints and read of a man page and I discovered the relatively undocumented utility pmset

If you are on a Mac, you can learn more about it in the Terminal by typing: man pmset but the important usage for me is this:

sudo pmset lidwake 0

which will – after you type your password – set it so that opening the lid won’t wake your computer. You can re-enable the wake on open by repeating the above command with a 1 instead of a 0. You can also have it wake from sleep when you plug it in to AC power by using acwake 1 above.

Thought I’d share in case anyone else has a desire or need to do this.

Written by Colin Bate