Wow.
11 pages over a space of 4 years, (and this isn't the only thread on this issue). Guess I'll chime in here.
I was an Apple customer throughout the 1990's, and early 2000's. I left the platform in disgust around 2005, after repeated issues with MacBooks, and frayed video inverter cables (the ones that route through the hinge, fray, and give you a flickering/dim screen). I was also still pretty ****** that Apple abandoned my (still fully functional) dual G5. (now running ubuntu ppc).
I returned to Apple when my employer had to replace my broken dell desktop. I have to say that the rMBP is a pretty awesome piece of hardware, overall. But this wake-from-sleep issue really makes it a pain in the *** to use. As a developer, when your machine crashes, and you have to log back in and restore the state of all your toolchain apps, it can be a big problem. This was the whole reason I switched from a desktop to a laptop. This is basic functionality for a mobile computing device, and for an expensive high-end one like Apple's rMBP, this behavior is absurd.
Brand new rMBP, as of June 2014. Running 10.9.3. I can't be sure if I had this problem out of the box, or if it appeared after some use. I think it may have been a problem right out of the box, but I probably didn't notice it until after a week or so, and I had everything all installed and set up.
For my system, this problem ONLY happens when I put the machine to sleep for a long period of time. > an hour or a couple of hours. (I don't know the exact threshold).
It doesn't matter if I have it on AC power or not.
It doesn't matter if I have any peripherals plugged in, or if I'm within range of my bluetooth keyboard and mouse, or not.
When it's a "short" sleep, it wakes. Every time. No problem. When it's a LONG sleep, this problem happens. EVERY TIME.
(I've looked at the system logs, and I see some kind of activity when it wakes back up and does some stuff, and goes back to sleep. I have no idea if this has anything to do with the problem, for example: Yesterday, I put it to sleep at 11:43 am. At 3:42 am (three hours later) - it wakes up, and logs about 2 pages of stuff. In fact, it starts with this: AppleCamIn::systemWakeCall - messageType = 0xE0000340. Not sure I'm comfortable with AppleCam waking up when I have the lid closed and I expect the machine to sleep. It seems to check around, and wake up all the hardware, then it goes back down to /var/vm/sleepimage, and does some kind of cleanup operation. The last messages are about 45 seconds after this "wakeup", and:
6/28/14 3:43:29.000 PM kernel[0]: Opened file /var/vm/sleepimage, size 1073741824, partition base 0x0, maxio 2000000 ssd 1
6/28/14 3:43:29.000 PM kernel[0]: hibernate image major 1, minor 0, blocksize 4096, pollers 5
6/28/14 3:43:29.000 PM kernel[0]: AppleThunderboltHAL::earlyWake - complete - took 0 milliseconds
The next message after that is when I have opened the machine, saw the black screen, clicked and pressed keys, and then, resorted to holding down the power key for 5 seconds (which resets it, and lets me boot):
6/28/14 7:30:32.000 PM bootlog[0]: BOOT_TIME 1404009032 0
The "Diagnostics and User Messages" log had an entry like this:
6/28/14 7:30:34.159 PM powerd[16]: com.apple.message.domain: com.apple.sleep.failure
com.apple.message.signature: Platform Failure
com.apple.message.summarize: YES
Sender_Mach_UUID: CFD6D97F-59E1-351E-B9C8-62F01E394C59
So that was 3:45 later. . . total sleep was 6:45.
I did try the CUDA install, and that had no affect on the problem.
pmset -g says my standbydelay is 10800 (3 hours), and my autopoweroffdelay is 14400 (4 hours).
I think that the "crash" happens sometime in that period between this 1-minute standbydelay, and before the autopoweroffdelay because NOTHING was logged during the time that the autopoweroffdelay was supposed to happen. I look at that last log entry for AppleThunderboltHAL::earlyWake - complete, and I tend to think that standbydelay was a successful operation. Maybe "sleepimage" got corrupt, or maybe some bit of firmware that's supposed to do something at "autopoweroffdelay" has a brain-**** and dies. Who knows?
Here's a snippet from my powermanagement log for that period:
Jun 28 11:19:36 <mydomainname> powerd[17] <Notice>: Clamshell Sleep: Using AC (Charge:100%)
Jun 28 11:19:40 <mydomainname> powerd[17] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Jun 28 11:19:40 <mydomainname> powerd[17] <Notice>: Clients requested wake events: None
Jun 28 11:32:12 <mydomainname> powerd[17] <Notice>: Wake [CDNVA] due to EC.LidOpen/Lid Open: Using AC (Charge:100%)
Jun 28 11:32:12 <mydomainname> powerd[17] <Notice>: Kernel: Response from SymDaemon timed out (powercaps:0x9)
Jun 28 11:32:12<mydomainname> powerd[17] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)
Jun 28 11:32:42 <mydomainname>powerd[17] <Notice>: PID 214(apsd) Released InteractivePushServiceTask "com.apple.apsd-connectinguser-push.apple.com" 00:00:30 id:0xc00000222 [System: DeclUser BGTask kDisp]
Jun 28 11:32:42 <mydomainname> powerd[17] <Notice>: PID 90(backupd-helper) Released BackgroundTask "backupd-helper" 00:00:30 id:0xc0000021f [System: DeclUser BGTask kDisp]
Jun 28 11:42:39 <mydomainname> powerd[17] <Notice>: PID 17(powerd) Created InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:00 id:0xe00000258 [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 11:42:54 <mydomainname> powerd[17] <Notice>: PID 17(powerd) TimedOut InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:14 id:0xe00000258 [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 11:42:54 <mydomainname> powerd[17] <Notice>: PID 17(powerd) Released InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:15 id:0xe00000258 [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 11:43:09 <mydomainname> powerd[17] <Notice>: Clamshell Sleep: Using AC (Charge:100%)
Jun 28 11:43:13 <mydomainname> powerd[17] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Jun 28 11:43:13 <mydomainname> powerd[17] <Notice>: Clients requested wake events: None
Jun 28 15:42:42 <mydomainname> powerd[17] <Notice>: DarkWake [CDN] due to EC.SleepTimer/SleepTimer: Using AC (Charge:100%)
Jun 28 15:42:42 <mydomainname> powerd[17] <Notice>: Kernel: Response from SymDaemon timed out (powercaps:0x9)
Jun 28 15:42:42 <mydomainname> powerd[17] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)
Jun 28 15:42:42 <mydomainname> powerd[17] <Notice>: PID 17(powerd) Created InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:00 id:0xe0000025f [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 15:43:27 <mydomainname> powerd[17] <Notice>: PID 17(powerd) TimedOut InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:45 id:0xe0000025f [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 15:43:27 <mydomainname> powerd[17] <Notice>: PID 17(powerd) Released InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:45 id:0xe0000025f [System: DeclUser SRPrevSleep kCPU kDisp]
Jun 28 15:43:27 <mydomainname> powerd[17] <Notice>: Maintenance Sleep: Using AC (Charge:100%)
Jun 28 15:43:27 <mydomainname> powerd[17] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Jun 28 15:43:27 <mydomainname> powerd[17] <Notice>: Clients requested wake events: None
Jun 28 19:30:34 localhost powerd[16] <Notice>: powerd process is started
Jun 28 19:30:34 localhost powerd[16] <Notice>: Summary- [System: No Assertions] Using AC
Jun 28 19:30:34 <mydomainname> powerd[16] <Notice>: Sleep (Failure code:0x1F006C00): Using AC (Charge:99%)
I don't know if any of these messages are "benign" - they certainly SOUND abnormal. Especially that last Sleep (Failure code:0x1F006C00). I don't suppose that's anywhere in Apple's documentation?
I guess I'm going to just try these pmset commands and see if they do anything.