Mac won't go to sleep properly

Optical mouse, perhaps... or a rogue USB hub... or some rogue USB device.

Try unplugging everything save for the Apple-branded keyboard and mouse that came with the computer. Does it go to sleep properly then? If so, you can plug one device back in at a time until you find the culprit (process of elimination-kind-of-thing).
 
OK, I'm using a Logitech optical wireless mouse. After testing, this seems to be the device causing my Mac to wake up. Why would it be doing this and how can I prevent it (without turning the mouse off)?
 
I don't know -- perhaps the mouse is older and it's detecting movement even though the mouse is stationary? Could the desk be vibrating slightly (due to an air conditioner, desktop fan, or some other source of vibration)?

Have you cleaned the optical sensor area of the mouse lately? Could there be some dust in there causing the mouse to detect movement?
 
No I don't think there's any way it can be detecting movement and the sensor seems clean. The last couple of nights I have not turned off the mouse and it has stayed in sleep mode, so whatever is causing this is inconsistent.
 
Quit everything and be diligent. Sleep the Mac and wait for machine to boot up itself. Then immediately mark the current time. Then on the mac (without doing anything else) goto /Applications/Utilities/Console and see what the log is saying what is causing the Mac to wake up.

Note: I found at one time certain Dashboard widgets was waking my Mac up to call home (updates). This might be your culprit.
 
The problem with this is I never know when it's going to reboot. I can't be waiting around for it to reboot, especially since sometimes it doesn't do this at all... Best I can do is put it to sleep before bed and jump out and check the log if I'm awake long enough to notice it happen.
 
The problem with this is I never know when it's going to reboot. I can't be waiting around for it to reboot, especially since sometimes it doesn't do this at all... Best I can do is put it to sleep before bed and jump out and check the log if I'm awake long enough to notice it happen.

Then open the Console app right before putting the Mac to sleep. Then when you notice the Mac woke it self up look up on the console log to see when it woke up and why it woke up. This way you can help yourself by tracing down the problem.
 
OK, I tried this last night and I think I traced the time it woke up in the log (but I'm not sure). Does this mean anything to you?:

16/09/2010 23:24:07 [0x0-0x5e65e6].com.flock.Flock[27351] no details
16/09/2010 23:24:07 [0x0-0x5e65e6].com.flock.Flock[27351] no details
17/09/2010 01:59:49 [0x0-0x5e65e6].com.flock.Flock[27351] [01:59:49.070 flock:youtubeAPI:error] Exception getting mail: no accountinfo found!
17/09/2010 01:59:49 [0x0-0x5e65e6].com.flock.Flock[27351] [01:59:49.070 flock:youtubeAPI:error] Exception getting mail: no accountinfo found!
17/09/2010 01:59:51 [0x0-0x5e65e6].com.flock.Flock[27351] [01:59:51.876 flock:youtubeAPI:error] .updateFriends() infoListener.onError()
17/09/2010 01:59:51 [0x0-0x5e65e6].com.flock.Flock[27351] [01:59:51.876 flock:peopleRefresh:error] onError(, 'infoListener')
 
Well It looks like Flock is trying to get Email. You might would want to check that out and make sure you have the latest version of Flock And that is not set to automatically get email.

Now to give you an example of when my Mac Pro wakes up it puts this code:
Code:
Sep 17 08:00:02 MyUserName loginwindow[59]: loginwindow SleepWakeCallback will power on, Currenttime:9/17/2010 8:00:02.009 AM - Waketime:9/17/2010 8:00:02.000 AM = Deltatime:0.008557022
. This is during a normal wakeup (that I set) time from my Alarm clock.
 
Last edited:
I've removed Flock and I'm now using Google Chrome but my Mac is still waking up. This is the latest readout from the Console:

20/09/2010 23:20:31 com.apple.launchd[41926] (0x10e3b0.Google Chrome He[45037]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:20:34 com.apple.launchd[41926] (0x10e3b0.Google Chrome He[45037]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:33:44 com.apple.launchd[41926] (0x10e000.Google Chrome He[45062]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:33:45 com.apple.launchd[41926] (0x10e000.Google Chrome He[45062]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:34:56 com.apple.launchd[41926] (0x10e000.Google Chrome He[45072]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:34:57 com.apple.launchd[41926] (0x10e000.Google Chrome He[45072]) Policy denied Mach service lookup: com.apple.windowserver.session
20/09/2010 23:55:29 com.apple.launchd[1] (com.apple.aslmanager) Throttling respawn: Will start in 3 seconds
21/09/2010 07:19:56 com.apple.launchd[41926] (0x10a000.Google Chrome He[45211]) Policy denied Mach service lookup: com.apple.windowserver.session

What's going on at 23:55?
 
Perhaps these programs are checking for software updates (which a lot of programs do every 24 hours), and you also have "wake for network access" enabled somewhere in your Network preference pane.

I'd be willing to bet your computer would sleep soundly if you quit these programs before going to bed, or making some modification to the Network preferences as described above.

Let us know how it works out.
 
Here is the latest readout from the console when my Mac woke up early this morning:

23/09/2010 23:19:08 [0x0-0x1d01d].com.google.Chrome[191] Thu Sep 23 23:19:08 craig-hardies-imac.local Google Chrome Helper[12516] <Error>: The function `CGAccessSessionSkipBytes' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGAccessSessionSkipForward' instead.
24/09/2010 03:52:43 iLikeAgent[12859] iLikeAgent launched
24/09/2010 03:52:43 iLikeAgent[12859] iLikeAgent launched
24/09/2010 03:52:43 iLikeAgent[12859] Agent checking for updates: http://www.ilike.com

iLikeAgent is an iTunes tool, I think. It looks like any number of applications still open when I put the Mac to Sleep are responsible for waking it up. How can I set my preferences to stop this? (I've tried to find a setting to help, but no luck.)
 
Did you try any of this below?

Perhaps these programs are checking for software updates (which a lot of programs do every 24 hours), and you also have "wake for network access" enabled somewhere in your Network preference pane.

I'd be willing to bet your computer would sleep soundly if you quit these programs before going to bed, or making some modification to the Network preferences as described above.

Let us know how it works out.
 
Did you try quitting all programs before bedtime to see if the computer stays asleep?

It would be a good troubleshooting technique -- if the computer wakes up even with all programs quit (that means command-Q, not just closing their windows with the red "close window" button), then the culprit isn't the applications themselves but something else with the system.
 
Back
Top