Geek Posted April 26, 2011 Posted April 26, 2011 <div class="KonaBody"><p>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:</p> <p><code>sudo pmset lidwake 0</code></p> <p>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.</p> <p>You can set this back to default behavior (ie: waking from sleep when the lid is opened) with the following command:</p> <p><code>sudo pmset lidwake 1</code></p> <p>Again, changes take affect immediately.</p> <p>If you want to check your pmset settings, use the following command:</p> <p><code>pmset -g profiles</code></p> <p>You’ll see something like this, grouped by Battery and AC power sources:</p> <p><code> 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 </code></p> <p>Anything with a 1 next to it indicates that feature is enabled, a 0 is disabled. The ‘hibernatefile’ or <a href="http://osxdaily.com/2010/10/11/sleepimage-mac/">sleepimage</a> 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. </p> <p>pmset is a powerful utility that offers a lot of customization for Mac OS X power management. Using pmset, you can <a href="http://osxdaily.com/2011/03/21/temporarily-prevent-a-mac-from-sleeping/">temporarily prevent a Mac from sleeping</a>, <a href="http://osxdaily.com/2009/11/28/schedule-your-mac-to-startup-via-the-command-line/">schedule Mac boot</a> and <a href="http://osxdaily.com/2009/12/18/schedule-sleep-and-wake-from-the-terminal/">sleep/wake times</a>, <a href="http://osxdaily.com/2010/12/16/disable-sudden-motion-sensor-mac/">disable the sudden motion sensor</a>, and much more.</p> </div> <p><a href="http://feedads.g.doubleclick.net/~a/z3GkczNcMJU3XC8h0dQfpUHjMVw/0/da"><img src="http://feedads.g.doubleclick.net/~a/z3GkczNcMJU3XC8h0dQfpUHjMVw/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/z3GkczNcMJU3XC8h0dQfpUHjMVw/1/da"><img src="http://feedads.g.doubleclick.net/~a/z3GkczNcMJU3XC8h0dQfpUHjMVw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=cErwEsvdFhQ:0J2V9cnw-fo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=cErwEsvdFhQ:0J2V9cnw-fo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=cErwEsvdFhQ:0J2V9cnw-fo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=cErwEsvdFhQ:0J2V9cnw-fo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=cErwEsvdFhQ:0J2V9cnw-fo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=cErwEsvdFhQ:0J2V9cnw-fo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=cErwEsvdFhQ:0J2V9cnw-fo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=qj6IDK7rITs" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/osxdaily/~4/cErwEsvdFhQ" height="1" width="1"/> View the full article
Recommended Posts