Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

The most common use case I have for this is when I'm playing music over AirTunes, but don't want an open laptop laying around. Or when I'm syncing or downloading something.

This isn't the same as this question, which related to sleep vs. hibernation; I'm looking for a way to make it stay active with the lid closed.

share|improve this question
2  
(Answers are not likely to be MacBook Pro specific, so I'd like to also tag this with macbook, or something like laptop.) –  Jonik Sep 19 '10 at 17:53
2  
by the way, keeping it awake with the lid closed is highly unadvised as it may heat up too much and damage it. that's why it doesn't have any default way to do it. with that in mind, InsomniaX is the answer. –  Cawas Mar 23 '11 at 16:43
    
Additionally, you may want to look at PMSET. It is a small, native OS X application that is actually used to set all your power management settings. Moreover, the settings are persistent (they do not need to be re-applied, but will be altered if you make changes through the System Preference pane, which is actually a front-end for PMSET). While I don't see an option to address your specific concerns, nonetheless, it is an excellent utility if you wish to control more aspects of your machine: developer.apple.com/library/mac/#documentation/Darwin/Reference/… –  cksum Sep 6 '11 at 19:57
    
read through the man page of pmset or google it –  Hawken Apr 23 '12 at 21:54

7 Answers 7

You can use InsomniaX. It sits in your menu bar, and upon activating it, your laptop won't sleep if you close it.

share|improve this answer
    
+1 InsomniaX is a great app for this usage. –  Am1rr3zA Sep 19 '10 at 16:36
    
++ InsomiaX works great –  Robert S Ciaccio Sep 20 '10 at 3:18
    
Perfect. Thanks so much! –  kivetros Apr 1 '11 at 11:55
1  
InsomniaX does not work on my 2011 Macbook Pro. Is there something I am missing? (When I close the lid, it just goes into sleep mode) –  Aron Rotteveel May 30 '11 at 6:48
    
Does not work on 2011 Macbook Air either. –  Legate Dec 21 '11 at 12:55

Connect an external mouse or keyboard. Close the lid, then hit a key on the keyboard or click the mouse. This wakes the laptop from sleep even if the lid is closed.

share|improve this answer
1  
Doesn't that only apply if you also have an external display connected? –  kchau Sep 22 '10 at 20:23
    
@kchau You also need a keyboard or mouse. –  Martín Marconcini Oct 11 '10 at 22:38
    
@Martin, Yes, that's what the answer says... I was adding that I think you also need an external monitor. –  kchau Oct 12 '10 at 2:55

Without using any third-party software, Apple says you need to have an external keyboard, mouse, or trackpad (USB or bluetooth) to prevent the computer from going to sleep (Lion), or to awaken it from sleep (Snow Leopard and earlier), after the lid is closed.

It turns out that you can apparently connect any external USB device to wake it back up from sleep. I do this with a MacBook Pro that I use with Synergy so that I can use the keyboard and mouse on my Linux workstation to control my MacBook Pro with an external monitor and the lid closed. I just plug in my USB flash drive after I close the lid to wake the MacBook Pro and then I can start using it in clamshell mode with no external keyboard or mouse connected to the MacBook Pro.

share|improve this answer

There's also the macosx-nosleep-extension alternative to insomniaX.

share|improve this answer
    
Works like a charm with MBA mid 2011, Mavericks 10.9.3. –  yurkennis May 21 at 19:43
    
Nice alternative, thanks. –  Jerome Dalbert Oct 19 at 19:30

I'd gladly comment on the question, but stackexchange "rep" policies do not allow me to comment. Therefore I drafted this "answer". Please bear with me! This answer aims to prevent you from going into the wrong direction.

If you open a terminal console and enter pmset -g pslog, you see what happens when you close the lid:

mc-dondon:~ dondon$ pmset -g pslog
Logging IORegisterForSystemPower sleep/wake messages
pmset is in logging mode now. Hit ctrl-c to exit.
16.11.13 01:28:57 MEZ    
Currently drawing from 'AC Power'
 -InternalBattery-0 55%; charging; (no estimate)

16.11.13 01:29:02 MEZ    IORegisterForSystemPower: ...Sleeping...

If you google, you'll find a lot of pages which claim that pmset would do the trick. However, with respect to your question, pmset does not do the trick - at least not for me.

Neither "sudo pmset noidle" nor the often suggested "sudo pmset -a lidwake 0" will prevent the system to go to sleep when the lid is closed.

share|improve this answer

I use Nosleep on My macbook pro. It sits in your menu bar and then you can double click it and once it turns blue, the laptop stays active when you put the lid down with the screen and backlight turning off.

share|improve this answer

The caffeinate command line utility (built in, at least in Mavericks and Yosemite) does just this. "man caffeinate" for more

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.