Disable Wake From Sleep When Opening the Lid of a MacBook Pro
If you don’t want your MacBook Pro to wake from sleep when you open the lid of the machine, all you need to do is launch the Terminal and type the following command:
sudo pmset lidwake 0
Changes take effect immediately, and you can verify this is working by using the -g profiles flag below, or just by closing the lid to force the MacBook to go to sleep. Now when you open the lid, the Mac will not wake from sleep. This will work on the MacBook, MacBook Pro, and MacBook Air.
You can set this back to default behavior (ie: waking from sleep when the lid is opened) with the following command:
sudo pmset lidwake 1
Again, changes take affect immediately.
If you want to check your pmset settings, use the following command:
pmset -g profiles
You’ll see something like this, grouped by Battery and AC power sources:
womp 0
sms 1
hibernatefile /var/vm/sleepimage
ttyskeepawake 1
acwake 0
sleep 0
autorestart 0
halfdim 1
hibernatemode 3
disksleep 10
displaysleep 15
lidwake 0
Anything with a 1 next to it indicates that feature is enabled, a 0 is disabled. The ‘hibernatefile’ or sleepimage is where the contents of your Mac are kept when you sleep the machine, this serves as a cache file and can grow quite large depending on your RAM. If you want to learn more about the rest of the pmset functions, use ‘man pmset’ at the command line.
pmset is a powerful utility that offers a lot of customization for Mac OS X power management. Using pmset, you can temporarily prevent a Mac from sleeping, schedule Mac boot and sleep/wake times, disable the sudden motion sensor, and much more.






