12 Replies Latest reply: Oct 11, 2013 4:34 PM by eorlgraeg
Paul Fryer Level 1 Level 1 (135 points)

I have a 21" mid-2011 iMac and Mountain Lion.  The computer is continually waking up from sleep, and I would appreciate it if anyone could suggest what I can do about it.  It does sleep again of course, according to my Energy Saver settings.  I have unchecked the "Wake for Network Access" checkbox in System Preferences, to no avail.  However, there is an always-on internet connection wired up, if that might be a factor.

 

I don't know how long this has been going on.  I recently moved house and the computer is now located much closer to the bedroom and living areas than hitherto, so it may be a long-standing issue just becoming more noticeable.  Anyway, in the middle of the night the bright screen is enough to be distrubing, so I want it fixed.

 

Thanks for any suggestions.


iMac, OS X Mountain Lion (10.8.1), i7 2.8Ghz, 12 GB RAM
  • den.thed Level 7 Level 7 (24,725 points)

    1. Have a look at > Why your Mac might not sleep or stay in sleep mode

     

    2. Go the Applications / Utilities / Console and check All Messages, it should say what device or input woke the iMac at any given time.

     

    3. You might also be having power sags or brief power outages, that are causing it to wake or restart. If so or you think so, then un-check "Startup automatically after a power failure" in the Energy Saver Preference. That way if it loses power during the night, you will know because it will be off instead of sleeping.

     

    4. Do you have any house pets, cats especially love to keyboard surf at night.

  • Linc Davis Level 10 Level 10 (159,560 points)

    If you have more than one user account, these instructions must be carried out as an administrator.

     

    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.

     

    Drag or copy — do not type — the following line into the Terminal window, then press return:

     

    syslog -k Sender kernel -k Message Seq "Wake reason"

     

    Post any lines of output that appear below what you entered — the text, please, not a screenshot.

     

    Important: The name of your computer will appear in the output. If that information is private (for example, if the computer name contains your own name), edit it out by search-and-replace in a text editor before posting.

  • Paul Fryer Level 1 Level 1 (135 points)

    Here is what I got:

     

    Nov 28 01:13:22 Pauls-iMac kernel[0] <Debug>: Wake reason: RTC (Alarm)

    --- last message repeated 7 times ---

    Nov 28 15:38:53 Pauls-iMac kernel[0] <Debug>: Wake reason: EHC2

    --- last message repeated 1 time ---

    Nov 28 17:57:09 Pauls-iMac kernel[0] <Debug>: Wake reason: RTC (Alarm)

    Nov 28 19:45:19 Pauls-iMac kernel[0] <Debug>: Wake reason: EHC2

    --- last message repeated 10 times ---

    Nov 29 23:06:29 Pauls-iMac kernel[0] <Debug>: Wake reason: RTC (Alarm)

    Nov 30 00:27:48 Pauls-iMac kernel[0] <Debug>: Wake reason: EHC2

    --- last message repeated 1 time ---

    Nov 30 04:17:49 Pauls-iMac kernel[0] <Debug>: Wake reason: RTC (Alarm)

    Nov 30 05:39:31 Pauls-iMac kernel[0] <Debug>: Wake reason: EHC2

    --- last message repeated 30 times ---

     

     

    This is slightly curious, since it woke last night (Dec 3/4) also.  And of course I have woken it using (Bluetooth) mouse clicks manually quite a number of times.

     

    I suspect that 30th November is when I disbled that "Wake for System Access" option.

  • Paul Fryer Level 1 Level 1 (135 points)

    Will Time Machine cause it to wake?  It wasn't covered in the article, and I do have it active.

  • Linc Davis Level 10 Level 10 (159,560 points)

    In the Energy Saver preference pane, disable Wake for network access and delete any scheduled wake events.

  • Paul Fryer Level 1 Level 1 (135 points)

    I assume the events reported are Network Access events of some kind?  Could you let me know what those Wake Event codes mean, or point me to an official explanation.

     

    But I also made a typo:  I disabled Wake for Network Access (probably on 30th Nov), not Wake for System Access as I said earlier.  And I have never had any wake events scheduled.

     

    I have also just disabled an application that was continuously running in the background but which had ceased to function properly after I installed Mountain Lion:  AddressBookServer (this was an attempt to synchronise address books between the iMac and my MacBook - I'm going to have to find a different way to do this, and the MacBook is too old for iCloud).

     

    Is it possible to set up the computer to wake up for network events (e.g. arriving emails) without having the display light up?  My concern is really the disturbance factor of the display rather than the computer doing background things at night.

     

    I will keep a close eye on the iMac for the next few days, and see what happens.

     

    Thanks,

     

    Paul.

  • Linc Davis Level 10 Level 10 (159,560 points)

    The wake event codes are undocumented, as far as I know. Wake for network access is not supposed to wake the display.

     

    I suspect that a background task you installed is scheduling wake events. There only way to identify it is by process of elimination. Start by booting in safe mode. Leave the machine in sleep that way and see whether it wakes up. If not, boot as usual and start disabling or removing third-party software until you find the culprit.

  • Paul Fryer Level 1 Level 1 (135 points)

    I had a wake-up event at about 2:30 a.m. last night, so checked the Console logs.  I found the following messages:

     

    5/12/12 2:33:12.000 a.m. kernel[0]: Previous Sleep Cause: 5

    5/12/12 2:33:12.000 a.m. kernel[0]: The USB device HubDevice (Port 1 of Hub at 0xfa000000) may have caused a wake by issuing a remote wakeup (2)

    5/12/12 2:33:12.000 a.m. kernel[0]: The USB device BRCM2046 Hub (Port 1 of Hub at 0xfa100000) may have caused a wake by issuing a remote wakeup (3)

    5/12/12 2:33:12.000 a.m. kernel[0]: TBT W (1): 0 [x]

    5/12/12 2:33:12.000 a.m. kernel[0]: The USB device Bluetooth USB Host Controller (Port 1 of Hub at 0xfa110000) may have caused a wake by issuing a remote wakeup (3)

    5/12/12 2:33:12.000 a.m. kernel[0]: 215223.994194: performCountryCodeOperation: Not connected, scan in progress[0]

    5/12/12 2:33:12.000 a.m. kernel[0]: HID tickle 315 ms

    5/12/12 2:33:12.907 a.m. hidd[46]: MultitouchHID: device bootloaded

     

    .... followed by lots more messages, including a Time Machine backup within less than a minute.

     

    The hub at 0xfa110000 shows up as follws in the System Profile:

     

    BRCM2046 Hub:

     

      Product ID: 0x4500

      Vendor ID: 0x0a5c  (Broadcom Corp.)

      Version: 1.00

      Speed: Up to 12 Mb/sec

      Manufacturer: Apple Inc.

      Location ID: 0xfa110000 / 4

      Current Available (mA): 500

      Current Required (mA): 0

     

    Bluetooth USB Host Controller:

     

      Product ID: 0x8215

      Vendor ID: 0x05ac  (Apple Inc.)

      Version: 2.01

      Serial Number: 442A60D04035

      Speed: Up to 12 Mb/sec

      Manufacturer: Apple Inc.

      Location ID: 0xfa111000 / 6

      Current Available (mA): 500

      Current Required (mA): 0

     

    I wasn't able to discover what the Hub at 0xfa000000 is, but the rest of it suggests that a Bluetooth device may have caused the wake-up, and I do have that option enabled in my system preferences.  I have a Bluetooth keyboard and magic mouse from Apple, and a bluetooth numeric keypad from a third party, but don't know which of these (if any) initiated the wake-up.

     

    A curious thing is that there was an identical event at exactly the same time the previous night.  The logs don't go back far enough to see whether it happens every night or not.

     

    Of course I could disable bluetooth devices from waking up the computer, and see if that stops the problem.  But if I do that, I don't know of any other way I can get the computer to wake up when I want it to.  Any suggestions here?

     

    Thanks for any help.

  • Linc Davis Level 10 Level 10 (159,560 points)

    Turn off the third-party BT device and test.

  • horton094 Level 1 Level 1 (0 points)

    Thanks, checking the console did it for me. My keyboard is faulty and some of the buttons on the far right are broken due to water damage. If I unplug before sleeping, it will not wake.

  • Paul Fryer Level 1 Level 1 (135 points)

    Yes, it's the third-party keypad that's doing it.  Since I like it, and the manufacturer couldn't help, I have stopped allowing bluetooth events from waking the computer, and now I have to manually wake it with the power button.  I did try turning off the keypad at night, but it was too much of a pain remembering to do it and then having to turn it on again the next day.

     

    Since disallowing bluetooth from waking the computer, I have had no more problems.

  • eorlgraeg Level 1 Level 1 (0 points)

    I have been having a similar problem.  I just upgraded to Mountain Lion and my computer would wake from sleep as soon as I put it to sleep.  I finally solved it by removing all "Login Items" from System Preferences --> Users & Groups --> Login Items.  So far the computer has no more problems going to sleep.  I think some of my old login items were no longer compatible and prevented sleep.  Hopefully this problem stays solved.  I hope this helps someone.