I’ve noticed that starting with a couple of days ago, the iMac doesn’t go to sleep anymore. If I go to Apple menu then Sleep, it tries to go to sleep, but after the hard disk stops spinning, it wakes up again.

After carefully inspecting the Console logs I’ve found the following messages:

Feb 8 20:32:17 … kernel[0]: hibernate_write_image done (0)
Feb 8 20:32:17 … kernel[0]: sleep
Feb 8 20:32:17 … kernel[0]: Wake reason = 
Feb 8 20:32:17 … kernel[0]: System Wake
Feb 8 20:32:17 … kernel[0]: Previous Sleep Cause: 5

What’s particularly strange is the empty “Wake reason =” message after sleep. Usually, there you can see different messages like “Wake reason = OHC1”, when you wake the Mac by pressing a key on the USB keyboard.

After removing some innocent Extensions (Remote Buddy and CoolBook2 — this one ended up here when I’ve migrated the data from the laptop), I’ve found out the root cause.

In my case, it was the wireless network’s fault. I already have a regular network cable between the Time Capsule and the iMac, but I also have a wireless network for the mobile devices. For some reason, I’ve activated the wireless network on the iMac. This caused the computer to wake up from sleep immediately, but no “Wake reason” was given.

In case your MacOSX doesn’t want to go to sleep too, try this.