1) if after you put the computer to sleep you disconnect a USB device, the computer will wake up and often not return to sleep.
I have no USB device connected and Bluetooth is disabled, so it is not an external device that triggers the wake up.
dwb wrote:
2) assuming that isn't why the computer is waking, open your Console (it is in the Utilities folder) and in the search box on top, enter wake and then sleep see what messages you get. Each message is date/time stamped so look for times when you know the computer should have been asleep and see what error message you are receiving.
I checked in the Console. These are the log lines recorded during that night:
29/04/12 22:44:34,000 kernel: wlEvent: en0 en0 Link DOWN
29/04/12 23:54:36,000 kernel: Wake reason: EC.SleepTimer (SleepTimer)
29/04/12 23:54:36,000 kernel: Previous Sleep Cause: 5
29/04/12 23:54:36,000 kernel: en0: 802.11d country code set to 'X3'.
29/04/12 23:54:36,000 kernel: en0: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
29/04/12 23:54:36,000 kernel: AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized
29/04/12 23:54:37,140 applepushserviced: <APSCourier: 0x7f8749d1a060>: Stream error occurred for <APSTCPStream: 0x7f874b80d5f0>: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)
29/04/12 23:54:37,000 kernel: Graphics suppressed 1139 ms
29/04/12 23:54:37,000 kernel: en0: 802.11d country code set to 'CH'.
29/04/12 23:54:37,000 kernel: en0: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
29/04/12 23:54:39,000 kernel: hibernate image path: /var/vm/sleepimage
29/04/12 23:54:39,000 kernel: sizeof(IOHibernateImageHeader) == 512
29/04/12 23:54:39,000 kernel: Opened file /var/vm/sleepimage, size 4294967296, partition base 0x0, maxio 400000 ssd 1
29/04/12 23:54:39,000 kernel: hibernate image major 14, minor 0, blocksize 512, pollers 5
29/04/12 23:54:42,000 kernel: (default pager): [KERNEL]: ps_select_segment - send HI_WAT_ALERT
29/04/12 23:54:42,000 kernel: macx_swapon SUCCESS
29/04/12 23:54:50,000 kernel: hibernate_alloc_pages flags 00000000, gobbling 0 pages
29/04/12 23:54:50,000 kernel: hibernate_setup(0) took 10850 ms
I guess the SleepTimer that comes after one hour is the timer that triggers the passage from sleep to hibernate mode. I can't see any error here. I will test again tonight.
Other wake causes I get are LidOpen, and that's ok, and EHCI (only once).