MacBook Not Sleeping When Closing Lid

Discussion in 'OS X El Capitan (10.11)' started by stanman64, Oct 25, 2015.

  1. stanman64 macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #1
    I have noticed that recently my Mac has not been sleeping when I close the lid. Used to, I would just close the lid and throw it in my bag. Now, even with a passcode required immediately, the screen immediately displays the desktop (or whatever I had up when I closed it) before I can even get it fully opened, obviously showing it never went into sleep. If I go to Menu > Sleep... however, my Mac will sleep properly, I assume. It does ask for my password this way, making me assume it went to sleep.

    I don't know if this issue is related to El Capitan, but it did not do this before. I know this because I have downloaded software such as NoSleep and Caffeine to keep my mac from sleeping when I am downloading, uploading, rendering, etc. for long periods of time and want my mac to stay awake.

    I uninstalled both Caffeine and NoSleep to see if they were the problem, no luck. I restored default settings in energy saver preferences. Also did an SMC reset to no avail.

    I also have 90+ GB of "other" space on my Mac, so is it possible there is a remnant file somewhere that is keeping my mac from sleeping? (I am planning on doing a clean install of El Capitan when I have time next weekend, hopefully...)

    Could there be a problem with the magnetic sensor that is responsible for detecting when the lid is closed and thus when it sleeps?



    Any help would be appreciated!

    MacBook Pro (late 2013)
    2.4 i5, 8GB
    OSX 10.11.1
     
  2. altuixde, Oct 25, 2015
    Last edited: Oct 25, 2015

    altuixde macrumors member

    Joined:
    Dec 16, 2011
    #2
    Here's an old article that helped me solve a similar problem with my MacBook.

    http://www.adeepbite.com/lion-seems-having-insomnia-it-doesnt-sleep-easily/
    The command used in this article (pmset -g assertions) still works in Yosemite (I haven't upgraded to El Capitan yet). I see that you're running El Capitan; hopefully it still works for you.

    Following the instructions I found out that, in my case, Internet Sharing was keeping the Mac awake.

    Edit: Wait a minute... the article mentions Internet Sharing specifically, so maybe I actually gleaned that Internet Sharing was the culprit from the article's first paragraph, and not from running pmset -g assertions. Man, I'm getting unreliable.
     
  3. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
  4. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #4
    Thanks for that link.

    Ran pmset -g assertions

    Weird thing is, in the "PreventsSystemSleep" category, I'll get 1.
    Other times I run it, it'll show 0.

    When it is showing 1, it is "Address Book Source Sync" that is the program that is preventing sleep.

    However, even when terminal is showing 0 for PreventsSystemSleep, my mac will still not sleep when I close the lid.

    Thoughts?

    I'd post screenshots but it says the file is too large :(
     
  5. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #5
    Since you said that this did not happen before you installed El Capitan, I'm guessing that there were some changes in El Capitan that started this problem.

    One thing you can do is open Console, make note of the time, then close the lid. Open the lid, and if it didn't go to sleep, read the output during the time interval when the lid was closed. Maybe there will be some messages in there that will provide a clue as to why your mac isn't sleeping.
     
  6. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #6
    Did as you said.

    I ran console, noted the time, and closed the lid. It was closed for ~2 seconds, and I saw about 20 messages created in that time frame, with 75% or so of them all occurring at the same exact time.

    Most of them if not all contain "IMMacNotificationCenter" somewhere in the line. What is this and could this be the culprit?
     
  7. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #7
    Here is a screenshot of console while I closed the lid. I placed the marker right before closing it.
     

    Attached Files:

  8. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #8
    And here's the rest. The second marker was as soon as I opened it.
     

    Attached Files:

  9. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #9
    A Google search for IMMacNotificationCenter didn't have any results, but there's a chance that the IM stands for instant messaging. Address Book Source Sync sounds like a cloud address book syncing service. I would go into Internet Accounts in System Preferences and, for each account, uncheck anything you're not using. I'd also be curious if disconnecting from the internet (turning off Wi-Fi and disconnecting wired networking) before closing the lid would cause it to sleep when it should; if that works then we've narrowed down the possible culprits.
     
  10. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #10
    I got rid of a couple internet accounts that I don't use anymore. The only accounts on there now are my main email, iCloud, and Twitter. I then shut off my wifi (no wired networks) and closed the lid for a few seconds.

    Still not sleeping :/
     
  11. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #11
    How about individual services within each account? Did you turn off any of those that you're not using? For example, iCloud has iCloud Drive, Photos, Mail, Contacts, Calendars, Reminders, etc.
     
  12. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #12
    I use just about all of the iCloud services besides Mail, iCloud Drive, and Back To My Mac (whatever that is), but for troubleshooting's sake, I just unchecked every service in iCloud and the other accounts.

    Still no sleeping from closing the lid.
     
  13. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #13
    It's possible that some processes may linger until you restart your Mac. Could you try restarting and then closing the lid again? I'm not sure how likely this is to work, but it's worth a shot.
     
  14. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
  15. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #15
    I can't think of anything else to try right now. Is there an Apple retail store near you? The genius bar could help, but the most usual advice from them is to do a fresh install of the operating system. You could also try posting on http://hints.macworld.com, they do troubleshooting too.
     
  16. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #16
    Bummer. I'll either make a genius appointment or hopefully a fresh install will fix the problem. I badly need to do a fresh install anyways with so much "other" space.

    Thanks for all the help! I'll try to update this thread once (if) I find out what's up.
     
  17. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #17
    You're welcome!

    A couple more things, though. I should've checked out hints.macworld.com before recommending it. Apparently it's not possible to post there anymore. I haven't been there in a while so I didn't know until today. Also, have you checked to see if the problem occurs in another user account? If it works fine in another user account, then you know that the problem lies in the account that you're using.
     
  18. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #18
    The only other account I have on my mac is Guest. So I logged out, and selected that one. It then restarted into a "safari-only" safe mode for that account. I was able to load and browse webpages. so I loaded a page and then closed the lid. It didn't sleep. I couldn't just log out and log back into my main user, so I had to shut it down, turn it on, and log in. Still doesn't sleep when I close the lid.

    I suppose it'll have to be something the genius bar, clean install, or software update can hopefully sort out. Until then I guess I should just count my blessings and be thankful this is just a minor issue and I can still use my mac :)
     
  19. altuixde macrumors member

    Joined:
    Dec 16, 2011
    #19
    Ah yes, minor issues. I've been using Macs for 20 years and I think every Mac I've had has had minor issues. Sometimes we've just got to live with them. I'll blindly guess that your issue will be fixed by a software update, though (if the genius bar or a clean install don't fix it), because El Capitan is still relatively new and Apple is still squashing bugs.
     
  20. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #20
    Hello all! I know it has been a while since I posted this thread, but to anyone else who could be having this problem... A clean install of El Capitan seems to have fixed it! I finally got around to doing it. I no longer have issues with my Mac not going to sleep when it is supposed to. MacWorld has some great tutorials on how to do a clean OS X install for anyone wondering. Just follow their steps and boom. Done. Now to start manually adding all my files back...
     
  21. graley macrumors regular

    Joined:
    May 25, 2010
    Location:
    Australia
    #21
    Silly question. How do you know it did not go to sleep ?
    Did the lamp on the front edge beginning the dimming cycle ?
    On my MacBook with EC wake up is very fast.
     
  22. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #22
    I have the current unibody style MBP, so I don't have the indicator light on the front.

    But I first noticed something was up when my battery kept draining more than usual. I'd close the lid, slip it into my bag, and open it up 2 hours later with 30% battery gone when before I would lose maybe 2%-5%.

    After I started looking for problems, I noticed my Mac didn't lock immediately when closing the lid, which is what I had my settings set for. Also, I would open the lid and the screen would instantly be on, which would be impossible if it had to wake up from sleep. Waking up from sleep isn't slow on my Mac, but it isn't immediate either.

    The dead giveaway was the fact that I could be playing music, close the lid, and the music kept playing. I never tested to see how long it would go on and if it would ever sleep, but I waited 10 minutes once and it didn't stop.
     
  23. ghsNick macrumors 68020

    ghsNick

    Joined:
    May 25, 2010
    #23
    Can you post a link to the tutorial? I got a brand new MB from BB and it didn't have El Capitan on it yet so I think I may do this.

    Thanks!
     
  24. stanman64 thread starter macrumors 6502

    stanman64

    Joined:
    Jul 9, 2010
    Location:
    Indianapolis, IN
    #24
  25. ghsNick macrumors 68020

    ghsNick

    Joined:
    May 25, 2010
    #25

Share This Page