4

My iMac (27-inch, Late 2012) randomly wakes up, up to 9 times a day. I'm using El Capitan 10.11.3 (15D21).

A syslog | grep -i "Wake reason" shows the following many times:

Apr  5 00:02:50 Nikolajs-iMac kernel[0] <Notice>: Wake reason: EC.SleepTimer (SleepTimer)
Apr  5 00:02:52 Nikolajs-iMac kernel[0] <Notice>: [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
Apr  6 18:55:24 Nikolajs-iMac kernel[0] <Notice>: Wake reason: EC.PME (User)
Apr  6 18:55:28 Nikolajs-iMac kernel[0] <Notice>: [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
Apr  6 20:37:16 Nikolajs-iMac kernel[0] <Notice>: Wake reason: EC.SleepTimer (SleepTimer)
Apr  6 20:37:19 Nikolajs-iMac kernel[0] <Notice>: [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
Apr  6 21:20:03 Nikolajs-iMac kernel[0] <Notice>: Wake reason: EHC1
Apr  6 21:20:04 Nikolajs-iMac kernel[0] <Notice>: [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
Apr  6 22:31:19 Nikolajs-iMac kernel[0] <Notice>: Wake reason: EC.SleepTimer (SleepTimer)
Apr  6 22:31:21 Nikolajs-iMac kernel[0] <Notice>: [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

There aren't any usb devices connected, nor any bluetooth devices, except the keyboard and mouse.

The most obvious reasons, power nap and wake on lan, aren't turned on. I've already tried to toggle them but it didn't help. What else could this be?

I've googled for answers for a long time, many times, already, but I couldn't find any solution to this. The problem already persists for at least two major OSX versions.

Thanks a lot!

Update:

➜  ~ pmset -g assertions
2016-04-12 18:30:18 +0200
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 526(storedownloadd): [0x000049be000112c7] 143:31:30 PreventUserIdleSystemSleep named: "URLConnection in progress"
   pid 100(hidd): [0x0000bf4b00091335] 00:18:20 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
    Timeout will fire in 219 secs Action=TimeoutActionRelease
Kernel Assertions: 0x8=BT-HID
   id=501  level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
   id=502  level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
Idle sleep preventers: IODisplayWrangler

Update 2: I managed to enter the pmset -g assertions right after the imac woke up last night. Here is the output:

➜  ~ pmset -g assertions
2016-04-16 22:40:16 +0200
Assertion status system-wide:
   BackgroundTask                 1
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    0
   InteractivePushServiceTask     1
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
   InternalPreventSleep           1
Listed by owning process:
   pid 62023(AddressBookSourceSync): [0x000159c300010639] 00:00:06 PreventUserIdleSystemSleep named: "Address Book Source Sync"
    Timeout will fire in 1794 secs Action=TimeoutActionTurnOff
   pid 204(backupd-helper): [0x000159c3000b062b] 00:00:06 BackgroundTask named: "backupd-helper"
   pid 186(coreaudiod): [0x000159c8000101e8] 00:00:00 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1B,0,1,2:0.context.preventuseridlesleep"
    Created for PID: 249.
   pid 62024(AddressBookSourceSync): [0x000159c30001063b] 00:00:06 PreventUserIdleSystemSleep named: "Address Book Source Sync"
    Timeout will fire in 1794 secs Action=TimeoutActionTurnOff
   pid 625(UserEventAgent): [0x000159c3000b063a] 00:00:06 BackgroundTask named: "com.apple.AddressBook.ScheduledSync"
    Created for PID: 62023.
   pid 526(storedownloadd): [0x000049be000112c7] 243:41:28 PreventUserIdleSystemSleep named: "URLConnection in progress"
   pid 62025(softwareupdate_notify_agent): [0x000159c3000b063d] 00:00:05 BackgroundTask named: "com.apple.softwareupdate.NotifyAgentAssertion"
   pid 79(apsd): [0x000159c80012064e] 00:00:01 InteractivePushServiceTask named: "com.apple.apsd-lastpowerassertionlinger"
    Timeout will fire in 86399 secs Action=TimeoutActionTurnOff
   pid 56(powerd): [0x000159b9000d061b] 00:00:16 InternalPreventSleep named: "com.apple.powermanagement.acwakelinger"
    Timeout will fire in 29 secs Action=TimeoutActionRelease
Kernel Assertions: 0x8=BT-HID
   id=501  level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
   id=502  level=255 0x8=BT-HID mod=01.01.70, 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
Idle sleep preventers: IODisplayWrangler
  • Do you have Wake for network access enabled in Energy Saver? How about Allow Bluetooth Devices to wake this computer in Bluetooth > Advanced? – Nikita Apr 9 '16 at 18:43
  • network access isn't enabled. Allow Bluetooth Devices to wake this computer is enabled as I need my keyboard and mouse to wake up the imac from sleep (if I'm not mistaken here). – Niko Apr 9 '16 at 20:54
  • 1
    Have you tried a pmset -g assertions to see whether there’s any obvious process making power management assertions? – wjv Apr 12 '16 at 8:50
  • No I haven't yet, thanks for the suggestion. Is it important that I run this command right after the mac woke up? @wjv – Niko Apr 12 '16 at 14:18
  • 2
    @Linus Well, at the moment you ran that, storedownloadd (the daemon that downloads from the App Store) was keeping your Mac from idle sleep. Re-run from time to time and see if that’s always the case. If so, disable automatic updates from System Preferences → App Store and see if it makes a difference. – wjv Apr 13 '16 at 6:08
3
+50

A good first step towards debugging power management-related issues on OS X is:

pmset -g assertions

It can take a little practice to read the output, but it can lead to finding processes that are erroneously making power management assertions against the kernel.

It can also be an iterative process — keep running it at appropriate times, ad see what crops up!

The pmset command can do a whole lot more to control OS X power management; see the pmset(1) man page.


Edit: I have since found a way to determine if there are any processes keeping a Mac awake using only GUI tools. (Tested only on OS X 10.11):

  • First, open Activity Monitor (in /Applications/Utilities).
  • On its menu, select View → Columns → Preventing Sleep in order to display this column (which is not displayed by default).
  • You can now click on the header of the Preventing Sleep column to re-order the list of processes so that those preventing sleep are at the top.

This works in any of Activity Monitor’s five tabs, but you have to enable the Preventing Sleep column individually for each tab.

  • Thank you so much for your hint - it led me to new google searches which ultimately let me find this thread / post: discussions.apple.com/message/24817110#24817110 in which step 1 solved my problem (which bugged me for years). – Niko Apr 19 '16 at 8:31
  • Glad it helped! It has also aided me in sorting out some similar issues in the past; it’s a good one to keep in your mental toolbox. – wjv Apr 19 '16 at 8:32
  • Absolutely! I'll add it to my toolbox right away. – Niko Apr 19 '16 at 8:33
2

This sounds implausible, but do you live in a multi-floor building or near a loud street where some kind of heavy walking or loud noise may be physically shaking your desk just enough to move your mouse? It doesn't take much to wake up the mouse, and thereby wake up your computer.

  • Good idea, but no. – Niko Apr 18 '16 at 7:08
0

Try checking your Energy Saving settings in System Preferences. You can tell your Mac to wake up at a certain time from here.

If that does not solve the issue, you may benefit from resetting the System Management Controller.

To reset the SMC:

Turn off and unplug the mac. Then, after waiting 15 seconds (the times are important), plug the mac back in. Finally, wait 5 seconds and power on the computer. The procedure may seem silly because it seems to only be a reboot, but this is how the SMC is reset. Good luck!

Also, here is Apple's support article on resetting the SMC: https://support.apple.com/en-us/HT201295

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .