Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Macbook pro does not go to sleep when closing lid

Hi,


I'm having a weird problem with my macbook pro. When I close the lid, my macbook does not go to sleep. Even more weird: when I put my macbook to sleep using cmd + alt + the eject button or using the apple button => sleep, my macbook stops sleeping as soon as I close the lid 😕


It seems like this problem occured after installing the Nosleep extension for mac (http://code.google.com/p/macosx-nosleep-extension/). I already deleted that program and rebooted, but that did not help.

MacBook Pro, OS X Mountain Lion (10.8.5)

Posted on Oct 6, 2013 11:50 AM

Reply
19 replies

Oct 6, 2013 4:49 PM in response to yanto148

Please read this whole message before doing anything.

This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.

Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


Test while in safe mode. Same problem?


After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

Oct 7, 2013 12:39 PM in response to yanto148

I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.

Triple-click anywhere in the line below on this page to select it:

pmset -g assertions | open -ef

Copy the selected text to the Clipboard by pressing the key combination command-C.


Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.


Paste into the Terminal window by pressing the key combination command-V.


Wait for a new line ending in a dollar sign (“$”) to appear.


A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.

Oct 7, 2013 12:43 PM in response to Linc Davis

7/10/13 21:41:52 CEST

Assertion status system-wide:

PreventUserIdleDisplaySleep0
PreventSystemSleep 0
PreventUserIdleSystemSleep 0
ExternalMedia 0
UserIsActive 0
ApplePushServiceTask 0
BackgroundTask 0


Kernel Assertions: 0x0004

* Kernel Assertion ID = 500

Created At = 1/01/70 01:02:47 CET
Modified At = 7/10/13 20:48:59 CEST

Owner ID = 0xffffff8078d51000

Level = 255

Assertions Set = None (4)


* Kernel Assertion ID = 501

Created At = 1/01/70 01:02:56 CET
Modified At = 1/01/70 01:00:00 CET

Owner ID = 0xffffff8078d7e000

Level = 0

Assertions Set = None (4)


* Kernel Assertion ID = 502

Created At = 1/01/70 01:02:56 CET
Modified At = 1/01/70 01:00:00 CET

Owner ID = 0xffffff8078d03000

Level = 0

Assertions Set = None (4)


* Kernel Assertion ID = 503

Created At = 1/01/70 01:02:57 CET
Modified At = 7/10/13 21:36:37 CEST

Owner ID = 0xffffff8019629400

Level = 0

Assertions Set = None (32)

Oct 7, 2013 5:12 PM in response to yanto148

Please read this whole message before doing anything.

I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.

This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.


These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.


Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.


Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands.


Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.


Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.


When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.


Step 1


Triple-click anywhere in the line of text below on this page to select it:

kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef

Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.

Step 2


Repeat with this line:

{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef

This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.


Step 3

{ launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef

Step 4

ls -A /e*/{cr,la,mach}* {,/}Lib*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -ef

Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.


Step 5

osascript -e 'tell application "System Events" to get name of login items' | open -ef

Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output.


You can then quit Terminal.

Oct 8, 2013 10:53 AM in response to Linc Davis

Output of step 1:


com.protech.NoSleep (1.3.3)


Output of step 2:


org.macosforge.xquartz.privileged_startx

com.oracle.java.Helper-Tool

com.microsoft.office.licensing.helper

com.adobe.SwitchBoard

com.adobe.fpsaud


Output of step 3:

org.macosforge.xquartz.startx

com.protech.NoSleep

com.oracle.java.Java-Updater

com.spotify.webhelper

com.google.keystone.user.agent


Output of step 4:

/Library/Components:


/Library/Extensions:


/Library/Frameworks:

AEProfiling.framework

AERegistration.framework

AudioMixEngine.framework

Mono.framework

NyxAudioAnalysis.framework

PluginManager.framework

iTunesLibrary.framework


/Library/Input Methods:


/Library/Internet Plug-Ins:

Flash Player.plugin

JavaAppletPlugin.plugin

Quartz Composer.webplugin

QuickTime Plugin.plugin

SharePointBrowserPlugin.plugin

SharePointWebKitPlugin.webplugin

Silverlight.plugin

Unity Web Player.plugin

Unused

flashplayer.xpt

nsIQTScriptablePlugin.xpt


/Library/Keyboard Layouts:


/Library/LaunchAgents:

com.adobe.AAM.Updater-1.0.plist

com.oracle.java.Java-Updater.plist

com.protech.NoSleep.plist

org.macosforge.xquartz.startx.plist


/Library/LaunchDaemons:

com.adobe.SwitchBoard.plist

com.adobe.fpsaud.plist

com.microsoft.office.licensing.helper.plist

com.oracle.java.Helper-Tool.plist

org.macosforge.xquartz.privileged_startx.plist


/Library/PreferencePanes:

Flash Player.prefPane

JavaControlPanel.prefPane

NoSleep.prefPane

Perian.prefPane


/Library/PrivilegedHelperTools:

com.microsoft.office.licensing.helper


/Library/QuickLook:

iBooksAuthor.qlgenerator

iWork.qlgenerator


/Library/QuickTime:

AC3MovieImport.component

AppleIntermediateCodec.component

AppleMPEG2Codec.component

Perian.component


/Library/ScriptingAdditions:

Adobe Unit Types.osax


/Library/Spotlight:

Microsoft Office.mdimporter

iBooksAuthor.mdimporter

iWork.mdimporter


/Library/StartupItems:


/etc/mach_init.d:


/etc/mach_init_per_login_session.d:


/etc/mach_init_per_user.d:

com.adobe.SwitchBoard.monitor.plist


Library/Address Book Plug-Ins:

SkypeABDialer.bundle

SkypeABSMS.bundle


Library/Fonts:


Library/Input Methods:

.localized


Library/Internet Plug-Ins:


Library/Keyboard Layouts:


Library/LaunchAgents:

com.apple.AddressBook.ScheduledSync.PHXCardDAVSource.03A60D88-0A07-4451-929A-EC7 28284569B.plist

com.google.keystone.agent.plist

com.spotify.webhelper.plist


Library/PreferencePanes:


Output of step 5:

iTunesHelper, Dropbox

Macbook pro does not go to sleep when closing lid

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.