MacBook does not sleep when lid is closed I've looked around for answers and can't find something that works for me.

I have a unibody aluminum MacBook Pro and it just doesn't seem to want to sleep when I close the lid. The problem started after installing Lion.

When I close the lid, it appears to go to sleep (i.e. the Apple logo dims) but the status LED stays on and within 5 seconds, the Apple logo is back on. Lifting the screen very slightly reveals that the screen is on at this point.

I know that it's not sleeping and waking when I close the lid because syslog | grep -i "wake reason" does not show a wake entry for the time the laptop wakes up.

So far, I've tried PRAM reset, SMC reset, disabling all sharing and bluetooth options. It does sleep with the lid shut when booted in Safe Mode though. This leads me to believe that it's some kind of software or setting that's preventing sleep but I know no way of figuring this out.

Is there any way to fix this or find out what software is preventing sleep?
A lack of wake reason entries suggests your Mac is never fully sleeping. The sleep mechanism has started but never completes.

Use the following Terminal command to view a detailed log showing your Mac's power history:

pmset -g log


You will see a list of entries in form:

 * Domain: applicationresponse.slowresponse
 - Message: PMConnection AirPort configd plug-in com.apple.powermanagement.applicationresponse.slowresponse 1399 ms
 - Time: 13/03/2012 12:27:53 CET 
 - Signature: AirPort configd plug-in
 - UUID: AB482838-2D6E-0000-0000-14BF53E20000
 - Result: Noop
 - Response time (ms): 1399


Look out for applications that may be keeping your Mac awake and active. Applications and other processes can keep your Mac awake if they are providing a service, such as file sharing or remote access. However, processes should be forced asleep after 30 seconds on lid close.

The behaviour you are seeing suggests a kernel extension or IOKit problem. User level processes can not block sleep when instigated by the user.

Do you have any utilities installed that install kernel extensions (kext)? These might include screen recording or audio capture tools; utilities than need low level access to your Mac.