Mac mini wakes 2 seconds after going to sleep Sometimes (randomly as far as I can tell), my Mac mini refuses to go to sleep. I press the Sleep item in the Apple-logo menu on the menubar, display turns off, after several seconds computer goes silent, the power indicator starts flashing. It flashes for a few seconds (like 2 or 3 seconds), and then computers wakes back up.

pmset -g assertions output is the same right before pressing sleep and after it wakes up:

2015-05-05 09:31:13 +0300
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Kernel Assertions: 0x4=USB
   id=501  level=255 0x4=USB mod=04/05/2015 13:13 description=EHC1 owner=AppleUSBEHCI


The timestamp is different, the rest is identical.

As far as I can tell, it shows nothing of interest, though I'm not sure about the last line. Any ideas what might be the cause of this behaviour and how to fix this? So far the only thing that helps me is rebooting, but the problem keeps coming up and around in a day or two and is really annoying.



I'm running 10.10.3 and Mid 2011 Mac mini.
Its possible that a USB device (keyboard, mouse, external USB hard drive, etc) is not behaving. 

If you have other USB-connected devices, does this still occur when they are disconnected? You don't mention any additional USB devices being connected, so I'm assuming only a keyboard/mouse combo.

Disconnect all USB devices but the keyboard/mouse then type the following command in terminal. Once typed in, disconnect the keyboard and mouse:

sudo shutdown -s +2

Enter your password, (because sudo needs it,) and the Mac will sleep in 2 minutes. If it stays asleep, then the keyboard and/or mouse are not at fault. Try again with just one of the two devices attached to see which one is the culprit.

If the keyboard/mouse don't seem to be at fault, then test again with other devices connected &amp; narrow it down.

Secondly, Bluetooth keyboards and mice can also wake the Mac from sleep:

In System preferences > Bluetooth Advanced... section: