14 Replies Latest reply: Mar 29, 2011 4:15 PM by nicoladie
dreamscapesoftware Level 1 Level 1 (0 points)
I have my system set to go to sleep after 30 minutes of inactivity. Unfortunately, for reasons I cannot determine, the system will rarely, almost never, go to sleep after that 30 minutes.

Most of the time, when I think I've nailed down the culprit and disabled it, the issue returns. I'm getting a little sick of trying to troubleshooting this, and I wanted to know if there is a Log or Command that I can issue that will tell me what prevented the system from sleeping?

Mac Pro Dual 2.4Ghz Quad-Core Xeon, Mac OS X (10.6.6), 12GB Ram, 1 SSD, 2 HDD, 1 DVD-RW, ATI Radeon HD 5870
  • 1. Re: Determine what is Preventing Sleep?
    Barney-15E Level 8 Level 8 (35,295 points)
    Open up Console (Utilities folder). In the log list, select kernel.log (it's under /var/log).
    Type "wake" in the search field. You should see various lines with a wake reason:
    The reasons are coded, and not necessarily clearly coded.

    See if it is trying to go to sleep, but something is waking it back up. Post the wake reasons and maybe we can figure it out.
  • 2. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    This is what I am seeing over-and-over again in the log:

    Feb 25 05:53:54 Dereks-Mac-Pro kernel[0]: Wake reason = UHC2
    Feb 25 20:07:47 Dereks-Mac-Pro kernel[0]: System Wake
    Feb 25 20:07:47 Dereks-Mac-Pro kernel[0]: The USB device USB Receiver (Port 1 of Hub at 0x3d000000) may have caused a wake by issuing a remote wakeup (2)

    USB Receiver is for my Logitech Keyboard and Mouse, though I don't necessarily feel that it's my keyboard causing the problem. I used this keyboard with a Mac mini for 2 years and never had this issue.

    I did notice something else in the kernel log:

    Feb 26 01:23:20 Dereks-Mac-Pro kernel[0]: USBF: 20978.447 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 02:20:49 Dereks-Mac-Pro kernel[0]: USBF: 24427.748 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 04:53:15 Dereks-Mac-Pro kernel[0]: USBF: 33573.520 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 05:02:40 Dereks-Mac-Pro kernel[0]: USBF: 34138.569 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 06:13:45 Dereks-Mac-Pro kernel[0]: USBF: 38402.926 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 06:35:15 Dereks-Mac-Pro kernel[0]: USBF: 39693. 25 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 09:25:15 Dereks-Mac-Pro kernel[0]: USBF: 49892.899 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)
    Feb 26 09:33:30 Dereks-Mac-Pro kernel[0]: USBF: 50387.936 AppleUSBEHCI[0xffffff801cadd000]::Found a transaction which hasn't moved in 5 seconds on bus 0xfd, timing out! (Addr: 3, EP: 0)

    Could this be what is causing the prevention of sleep?
  • 3. Re: Determine what is Preventing Sleep?
    Barney-15E Level 8 Level 8 (35,295 points)
    It doesn't appear to even try to go to sleep, from what you posted.
    In most instances like this, it attempts to go to sleep and something wakes it. But those log entries don't appear to repeat in any interval. That one instance from the keyboard is probably a normal wake up. However, those dongles have been implicated before.

    Next time you get a chance to leave it sit for a few hours, check to see if it does try to sleep, but then gets woken by something.

    But, if it has been sitting and those are the only wake requests, I don't think it is even trying to sleep which indicates it is something else. Try resetting all the sleep settings, even to a very short interval so you can watch it. If it does go to sleep on a very short setting, try the longer ones.

    If that doesn't show anything waking it as soon as it tries to sleep, then try deleting the com.apple.powermanagement.plist from the main /Library/Preferences/SystemConfiguration folder. You'll have to reset you sleep settings.

    If that doesn't work, then perhaps [resetting the SMC|http://support.apple.com/kb/ht3964].
  • 4. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    I deleted the Preferences file and even tried resetting the SMC, and I'm still getting the same thing. And the way you describe the situation is correct; it's not that the system is going to sleep and then waking up immediately, it just never goes to sleep. My displays will shut off and the system will just keep running.

    Last night, when I got home, the system was asleep. I woke it up and worked on it for a little whie, but when I woke up this morning, the system was still running. Every test I tried this morning resulted in the displays sleeping, but the system is still running.

    And just in case I haven't mentioned this, if I initiate a Sleep manually, either by pressing the Power button or choosing it from the Apple menu, the machine sleeps with no problems.

    If you have any other ideas I am open to them. I really appreciate you helping me out.

    Message was edited by: dreamscapesoftware
  • 5. Re: Determine what is Preventing Sleep?
    Barney-15E Level 8 Level 8 (35,295 points)
    I don't, but I'll try to find some help.
  • 6. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    Thanks Barney. In the meantime, I put in a Support Call request for Monday afternoon. Maybe Apple has some amazing tool that no one knows about that can solve this issue.
  • 7. Re: Determine what is Preventing Sleep?
    X423424X Level 6 Level 6 (14,190 points)
    FWIW, I had similar sleep problems as yours. Repeated tests, looking at logs, deleting various processes, logging into a different account, etc. failed to shed any light on my failing-to-auto-sleep problem. So I gave up and found a little free app called PleaseSleep which will _force sleep_ (like explicitly selecting sleep from the menu) at the Energy Saver sleep time.

    http://www.dragonone.com/products/macosx/pleasesleep/

    Seems to work ... so far. Better than nothing I suppose.
  • 8. Re: Determine what is Preventing Sleep?
    japamac Level 7 Level 7 (24,390 points)
    Hi-

    Your machine says:
    The USB device USB Receiver (Port 1 of Hub at 0x3d000000) may have caused a wake by issuing a remote wakeup (2)

    and you say
    USB Receiver is for my Logitech Keyboard and Mouse, though I don't necessarily feel that it's my keyboard causing the problem.

    which goes contrary to what the machine is telling you.

    Do you have Logitech drivers or other software installed?
    If so, is the driver/software up to date?

    Will the machine sleep with the keyboard/mouse disconnected?

    Are both keyboard and mouse wired?

    If so, are said wires in good condition; no crimps, breaks, stress points?
  • 9. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    Let me clarify about what I mean with the keyboard/mouse:

    Yesterday I was testing this issue and my system did go to sleep twice, of which both times I woke it up, and there are only 2 "wake" log entries for yesterday.

    The day before my system was asleep once, and I woke it up, and there is only 1 "wake" log entry for yesterday.

    Same thing for Friday. During testing, the system fell asleep twice, both times I woke it up, and only 2 "wake" log entries exist.

    The only time this log entry appears in the Kernel log is after a successful system sleep after inactivity, and I wake the system with the keyboard/mouse. Otherwise after each unsuccessful attempt, no log entry is made.

    With regards to the Keyboard/Mouse, it's a Logitech S 530, and I am using the built-in system drivers. I checked the web site, and the only downloads they offer are for the bloatware that you can optionally install when you first buy it. No drivers needed.

    It's wireless, via a usb dongle attached to the back of my Mac Pro. I did attempt a few sleeps with the keyboard/mouse unplugged, but with the same result.
  • 10. Re: Determine what is Preventing Sleep?
    Barney-15E Level 8 Level 8 (35,295 points)
    When I was thinking about your problem, I got stuck on the issues where some things cause it to wake. I discounted the keyboard/mouse since it wasn't trying to sleep and getting woken up. But, it still could be that the usb dongle is sending information that makes the Mac think it is busy. So, if you have another mouse/keyboard you can use/borrow just to rule out the usb dongle, that might be useful.

    Other than that, I got some suggestions:
    Try this document: http://docs.info.apple.com/article.html?path=Mac/10.6/en/9040.html

    How about quitting all applications? Does it sleep then?

    Also, do you have another user account you can log into and see if it works ok there? If not, you can just create one to test with. It doesn't take much space and you can just delete it afterwards.
    That can help isolate the problem to your user account or the whole system.
  • 11. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    After talking with Apple Support on the Phone yesterday we were able to determine that there may be a Hardware issue with my Mac Pro.

    Dropped of my Mac Pro at the Apple Store an hour later and they tried to reproduce the problem with their own "clean" system and wired keyboard/mouse. Same behavior.

    So they're holding onto it for hardware testing, and hopefully they will know what's up soon. Turn-around time is supposed to be 3-5 business days, so this may just be one long week!
  • 12. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    Well, got my Mac Pro back from the Apple Store today. They tell me there were some "communications" issues with my motherboard, so it was replaced.

    I'll do a little testing to see if the issue is resolved, and I'll let you know.

    One thing I did notice is that my boot time has improved. Before the motherboard replacement, boot time (with an SSD) was about 1:20-1:40. After the replacement, first boot was 0:34!
  • 13. Re: Determine what is Preventing Sleep?
    dreamscapesoftware Level 1 Level 1 (0 points)
    Thanks everyone for your help!

    In the end, the problem was with the Motherboard. After testing for the last few days I have noted that my system has gone to sleep after inactivity every single time, and has not exhibited any of the behavior that it did before.
  • 14. Re: Determine what is Preventing Sleep?
    nicoladie Level 1 Level 1 (15 points)
    Try reset the System Management Control.

    Follow these steps: http://support.apple.com/kb/HT3964

    Also, delete everything inside /Library/Preferences/SystemConfiguration/ folder. Don't worry, the system will re-generate these preference files.