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.

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?

share|improve this question
add comment

5 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
Your answer came closest. It turns out that I forgot Caffeine was installed and despite not having an icon in the menu bar like it should when running, it was still somehow affecting the sleep. Maybe it changed some system settings and didn't need to be running to cause trouble. –  alexcoco Jan 11 '13 at 3:44
add comment

It's worth repairing your permissions, if you haven't already done that. Permissions errors have caused a wide range of bizarre problems in the Lion upgrade.

It also might help to generate ideas if you can determine if the problem is system-wide or user-specific. Do that by creating a new, pristine user account and using that to see if the problem persists.

A genuine "clean install" of Lion is still a debated procedure, but some people who exhaust all other diagnostic possibilities have ended up going that route with good success. I hope your problem is more straightforward than that!

--

EDIT:

I gather that booting in Safe Mode solves the problem, but creating a new user doesn't. That strongly suggests the problem is something you're loading at startup. Good news is that this should be straightforward to fix.

Your experiments so far suggest that whatever is causing the problem is in your /Library directory, and not in your User folder. A manageably small list of things is disabled during a Safe Mode startup, including /System/Library/Extensions, /Library/StartupItems, and notably, any fonts outside of /System/Library/Fonts. Your problem must be something in one of these locations.

I have a funny feeling that you may have a corrupted font, since this is a common problem that manifests in odd ways. You could try the troubleshooting strategies described here, which essentially consist of validating the fonts using the Font Book utility (included with Mac OS X), clearing out the font cache, and removing any duplicates.

If fonts aren't the problem, this earlier discussion has good information about how to go about disabling errant startup extensions and login items. It's a matter of taking everything suspicious out, and adding things back bit-by-bit until you find your culprit.

I think you're close to the solution, please do let us know when you've cracked it.

share|improve this answer
    
Thanks, I'll try repairing permissions and creating a new user, hadn't thought of that. I'll let you know how it goes. –  alexcoco Mar 5 '12 at 16:37
    
I've created a new account and the same thing seems to happen though it seems to be okay in Safe Mode. Any clue as to what may or may not be different in Safe Mode? –  alexcoco Mar 12 '12 at 19:43
    
Very interesting! I'll take a look at these things and get back to you! –  alexcoco Mar 14 '12 at 14:47
add comment

Here's a way I've managed to rectify the wakeup/sleep issue with my MBP (early 09)

It never restarted when I reopened my lid.

Only occurred when waking up from sleep initiated by lid close.

Workaround I used was to switch off Automatically adjust brightness (Systems Preferences -> Displays). Hasn't re-occurred since – try that and see how you go.

share|improve this answer
    
My problem is the opposite. It wakes from sleep when the lid is opened if you sleep it but will not sleep if the lid is just closed. Have you read my question? –  alexcoco Mar 9 '12 at 16:23
add comment

I had this problem for a very long time.

You need to go to:  > System Preferences > Sharing

you need to TURN OFF Web sharing and Internet Sharing.

If these don't work, try turning off other sharing options.

share|improve this answer
    
I have no sharing options enabled. So far, I've tried PRAM reset, SMC reset, disabling all sharing and bluetooth options. –  alexcoco Mar 5 '12 at 17:25
add comment

Have you tried this fix from the Apple forum. The uses fixed the issue by uninstalling a printer driver which he found out to be causing the issue.

You might also try disabling the "Wake for Network Access" option

share|improve this answer
    
I think I read about that printer driver at some point but I haven't tried uninstalling any. I'll give it a try. I believe I have also already disabled the wake for network access option but I'll double check anyway, thanks. –  alexcoco Mar 5 '12 at 17:26
    
I'd also like to mention again that it does sleep when booted in safe mode. If the printer driver was causing this but isn't booted in safe mode (which I would think is likely) then it may be the problem. –  alexcoco Mar 5 '12 at 17:31
    
Also, from what I've read some people have had problems when they had a certain VMWare product installed - so it seems even with the network access option disabled, some programs can still wake the computer. Best of luck! –  OrangeBox Mar 6 '12 at 0:10
    
I tried running the pmset -g assertions command like it says in that post but all I get is a list of things with 0 at the end except for one item that has EnableIdleSleep 1. I don't know how to interpret this but it doesn't look like a bad thing to me. –  alexcoco Mar 12 '12 at 19:46
add comment

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.