[Fixed for me] Mac rebooting during sleep

Posting this in case it can save someone else some time:

It all started so innocently. I’d bought a Logitech wireless mouse (an M325)  for my wife’s Mac Mini and put the tiny receiver into the keyboard USB port for proximity, because I never use those ports. It seemed to work fine and also reduced the number of cables on my rather cluttered desk.

A couple of days later, whilst I was playing Minecraft on my Windows box, I noticed that the Mac Mini was unexpectedly rebooting, so I trawled the Macs logs in the Console.app, and found an odd error message regarding a sleep issue. It wasn’t a one off either – in one evening it had rebooted and actually shutdown three times.

9/24/14 11:35:04.000 PM kernel[0]: Sleep failure code 0x00000000 0x1f006900

I read around on the net about that message, and what it could be related to, and it seemed that some people were having similar issues and suspected USB devices, especially drives, such as for Time Machine, as the culprit.

Of course, the first thing you check for should be recent changes, and there had been some Apple patches go in, but I decided to test the Time Machine USB drive theory first (almost dismissing the new mouse!). In summary:

– Removed Time Machine drive – same problem.
– Removed the Logitech mouse dongle, but crucially, put the old known good basic Microsoft mouse in that same keyboard USB port (previously it was plugged into the rear of the Mini) – same problem.
– Tested disabling sleep to confirm it was sleep related, and yes, confirmed that there was no problem with no sleep.
– Finally, decided to plug the Logitech dongle into the USB hub attached to the mac – and yes, all was fine, no sleep problem anymore.

It would seem that keyboard port does not like USB HID devices.

The bottom line: never dismiss any change, and never underestimate the weird things which can cause issues.