Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 
Last edited:

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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.

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 :(
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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.

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?
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
Here is a screenshot of console while I closed the lid. I placed the marker right before closing it.
 

Attachments

  • Screenshot 2015-10-26 19.05.23.png
    Screenshot 2015-10-26 19.05.23.png
    4.5 MB · Views: 488

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
And here's the rest. The second marker was as soon as I opened it.
 

Attachments

  • Screenshot 2015-10-26 19.05.30.png
    Screenshot 2015-10-26 19.05.30.png
    4.5 MB · Views: 385

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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 :/
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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.
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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.
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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 :)
 

altuixde

macrumors member
Dec 16, 2011
48
1
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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...
 

graley

macrumors regular
May 25, 2010
126
4
Australia
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.
 

stanman64

macrumors 6502a
Original poster
Jul 9, 2010
793
873
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.

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.
 

ghsDUDE

macrumors 68030
May 25, 2010
2,948
763
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...
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!
 

ghsDUDE

macrumors 68030
May 25, 2010
2,948
763
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.