14

A full battery will drain in about 24 hours of lid closed, fully unplugged sleep. Sometimes, when I pick up the computer to use it, it's physically warm.

Here's what I've tried:

  • Power Nap on battery is disabled
  • iStat shows no apps "using significant energy" before closing the lid.

Looking in Console, at system.log, during the time I know the computer was asleep, and I see two things that immediately jump out at me. I'll try and copy out relevant sections, but I'm not sure what's actually going to be helpful. The first section is repeated endlessly:

05:49:47 WindowServer[121]: 8358864.989 [DFR] [deviceTerminate] 
05:49:47 WindowServer[121]: 8358865.001 [DFR] [_DFRDisplayDeviceRemoved] 
05:49:47 WindowServer[121]: 8358865.003 [DFR] [___DFRDisplayDeviceRemoved_block_invoke] calling client detach callback
05:49:47 WindowServer[121]: 8358865.004 [DFR] [_DFRDisplayClose] 
05:49:47 WindowServer[121]: 8358865.535 [DFR] [deviceMatch] 
05:49:47 WindowServer[121]: 8358865.535 [DFR] [_DFRDisplayDeviceAdded] 
05:49:47 WindowServer[121]: 8358865.537 [DFR] [_DFRDisplayUsbStart] 
05:49:47 WindowServer[121]: 8358865.537 [DFR] [_DFRDisplayOpen] 
05:49:47 WindowServer[121]: 8358865.540 [DFR] [_DFRDisplayOpen] sending GetInfo
05:49:47 WindowServer[121]: 8358865.541 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 0
05:49:47 WindowServer[121]: 8358865.541 [DFR] [_DFRDisplayHandleVendorPacket] calling client attach callback
05:49:47 WindowServer[121]: 8358865.554 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 1
06:01:51 WindowServer[121]: 8359589.038 [DFR] [deviceTerminate] 
06:01:51 WindowServer[121]: 8359589.041 [DFR] [_DFRDisplayDeviceRemoved] 
06:01:51 syslogd[37]: ASL Sender Statistics
06:01:51 WindowServer[121]: 8359589.044 [DFR] ERR [_DFRDisplaySendPacket] WritePipe failed 0xe00002c0
06:01:51 WindowServer[121]: 8359589.044 [DFR] [___DFRDisplayDeviceRemoved_block_invoke] calling client detach callback
06:01:51 WindowServer[121]: 8359589.044 [DFR] [_DFRDisplayClose] 
06:01:51 WindowServer[121]: 8359589.537 [DFR] [deviceMatch] 
06:01:51 WindowServer[121]: 8359589.537 [DFR] [_DFRDisplayDeviceAdded] 
06:01:51 WindowServer[121]: 8359589.540 [DFR] [_DFRDisplayUsbStart] 
06:01:51 WindowServer[121]: 8359589.540 [DFR] [_DFRDisplayOpen] 
06:01:51 WindowServer[121]: 8359589.589 [DFR] [_DFRDisplayOpen] sending GetInfo
06:01:51 WindowServer[121]: 8359589.590 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 0
06:01:51 WindowServer[121]: 8359589.590 [DFR] [_DFRDisplayHandleVendorPacket] calling client attach callback
06:01:51 WindowServer[121]: 8359589.591 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 1
06:08:40 WindowServer[121]: 8359998.006 [DFR] [deviceTerminate] 
06:08:40 WindowServer[121]: 8359998.007 [DFR] [_DFRDisplayDeviceRemoved] 
06:08:40 WindowServer[121]: 8359998.008 [DFR] [___DFRDisplayDeviceRemoved_block_invoke] calling client detach callback
06:08:40 WindowServer[121]: 8359998.008 [DFR] [_DFRDisplayClose] 
06:08:40 WindowServer[121]: 8359998.542 [DFR] [deviceMatch] 
06:08:40 WindowServer[121]: 8359998.542 [DFR] [_DFRDisplayDeviceAdded] 
06:08:40 WindowServer[121]: 8359998.543 [DFR] [_DFRDisplayUsbStart] 
06:08:40 WindowServer[121]: 8359998.543 [DFR] [_DFRDisplayOpen] 
06:08:40 WindowServer[121]: 8359998.568 [DFR] [_DFRDisplayOpen] sending GetInfo
06:08:40 WindowServer[121]: 8359998.580 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 0
06:08:40 WindowServer[121]: 8359998.580 [DFR] [_DFRDisplayHandleVendorPacket] calling client attach callback
06:08:40 WindowServer[121]: 8359998.581 [DFR] [_DFRDisplayHandleVendorPacket] kDFRDisplayCommandGetInfo ready: 1
06:15:27 WindowServer[121]: 8360404.994 [DFR] [deviceTerminate] 

Looking elsewhere on StackExchange for solutions, I came across the pmset -g request:

System-wide power settings:
Currently in use:
 standbydelay         10800
 standby              1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             0
 gpuswitch            2
 disksleep            10
 sleep                1
 autopoweroffdelay    28800
 hibernatemode        3
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         2
 acwake               0
 lidwake              1

I'm interested in solving the issue, but I'm also interested in any background knowledge leading to a solution. Hopefully I've provided relevant information.


Update Edit: a couple days have gone by without any discussion, and my laptop behaved well while asleep. This morning, at about 4am, I unplugged the laptop with 100% battery and closed the lid. Just now, at 7:30am, it was warm and battery at 73%.

The system.log was full of this:

07:08:02 com.apple.xpc.launchd[1] (com.apple.quicklook[19336]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
07:08:35 diagnosticd[5296]: Streaming server Reconnected
07:08:47 GoogleSoftwareUpdateAgent[19340]: 2017-08-02 07:08:47.848 GoogleSoftwareUpdateAgent[19340/0x7fffde16f3c0] [lvl=2] -[KSAgentApp(PrivateMethods) setupLoggerOutput] Agent default/global settings: <KSAgentSettings:0x100302ee0 bundleID=com.google.Keystone.Agent lastCheck=2017-08-02 10:37:43 +0000 lastServerCheck=2017-08-02 10:37:41 +0000 lastCheckStart=2017-08-02 10:37:31 +0000 checkInterval=18000.000000 uiDisplayInterval=604800.000000 sleepInterval=1800.000000 jitterInterval=900 maxRunInterval=0.000000 isConsoleUser=1 ticketStorePath=/Users/robert/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore runMode=3 daemonUpdateEngineBrokerServiceName=com.google.Keystone.Daemon.UpdateEngine daemonAdministrationServiceName=com.google.Keystone.Daemon.Administration logEverything=0 logBufferSize=2048 alwaysPromptForUpdates=0 productIDToUpdate=(null) lastUIDisplayed=(null) alwaysShowStatusItem=0 updateCheckTag=(null) printResults=NO userInitiated=NO>
07:09:42 diagnosticd[5296]: Streaming server Reconnected
07:10:49 diagnosticd[5296]: Streaming server Reconnected
07:11:54 diagnosticd[5296]: Streaming server Reconnected
07:12:01 awdd[155]: Diagnostics Report
07:13:00 diagnosticd[5296]: Streaming server Reconnected
07:13:14 com.apple.xpc.launchd[1] (com.apple.quicklook[19365]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
07:14:07 syslogd[37]: ASL Sender Statistics
07:14:07 diagnosticd[5296]: Streaming server Reconnected
07:15:12 diagnosticd[5296]: Streaming server Reconnected
07:16:18 diagnosticd[5296]: Streaming server Reconnected
07:17:24 diagnosticd[5296]: Streaming server Reconnected

Googling "Streaming Server Reconnected" produced an apple support document with several people with similar problems

Update / Edit: After a few months without issues, I started noticing my mac wake from sleep, causing an external display to wake and sleep. The wake event didn't correspond with notifications or anything else discernible. I talked with an Apple Genius today an he started to remove the sleepimage but found a lot of permission issues with it, eventually dropping into Single User mode to get the job done. When I explained all the issues I've had with sleep, he said "this could cause that," but I have a feeling that their go-to level 1 solution for sleep/wake issues is deleting the sleepimage.

2
+25

I don't know much on deciphering console.log messages but if your machine is physically warm and losing that much battery it has not actually been asleep. It is normal for OS X to wake up every few hours & perform some background tasks but under typical use it should be asleep again within minutes. Yours is definitely doing more than the average machine while asleep.

I wonder what the results would be if you created a new (completely blank) user in System Preferences > Users & Groups, logged out of yours, logged into that user & then put it to sleep for another day or so. If you see that the machine is no longer waking up & for whatever reason not going back to sleep than you can be sure it's something installed on your profile. If it continues to happen it's possible that the operating system is having an issue and may need reinstalled or that there is some kind of crazy hardware issue causing this. It's a lengthy troubleshooting process but it's the only one I know for an issue like this - please update here and I can help out more with this if you do decide to go this route.

  • You're absolutely right about the machine not being asleep. The confusing thing about this is that it doesn't happen every time. Today it slept for 10 hours and didn't lose anything. I think creating a new user might make an intermittent problem more difficult to diagnose. – voxobscuro Aug 6 '17 at 0:19
  • Well what it would do is separate a system wide issue from one located in your profile - one way or another you need to make this distinction in order to diagnose and eventually apply a fix to what's going on. Use syslog |grep -i "Wake reason" instead of just hoping to catch it while it's still warm – little tiny man Aug 7 '17 at 17:04
  • hm, syslog seems to have been replaced by a command called log with a similar functionality, but "Wake reason" shows up frequently. The full command is log --since 1d | grep -i "Wake reason" and I've also seen some interesting results with log --since 1d | grep -i "PowerChime" – voxobscuro Aug 8 '17 at 21:45
  • What does it say is causing the wake ups when you run that command? – little tiny man Aug 8 '17 at 22:28
  • Most of them have something to do with a display disconnect / reconnect, which never was actually happening. – voxobscuro Aug 11 '17 at 21:18
1

I have the same issue and noticed it only does it at my home Wi-Fi. When I sleep somewhere else (with Wi-Fi connected before) it won't drain the battery overnight.

  • Do you have a time capsule or other Time Machine device at home your laptop backs up to? – voxobscuro Aug 6 '17 at 0:21
  • I do not. In the other place where it does not drain its battery, I have set up a networked Time Machine device. – narrowtux Aug 6 '17 at 13:02
  • That's interesting...I first noticed this sleep death when I was away from home, where I have a networked Time Machine device. Since returning home, I haven't seen it happen. I'll try it today by taking the laptop away from home and running it through a sleep cycle. – voxobscuro Aug 6 '17 at 15:56
  • So you think it's because it's looking for the backup drive and can't find it? – narrowtux Aug 6 '17 at 16:18
1

I had the same problem for a while. A colleague gave me the hint to delete all configured connections in network preferences like WiFi, Bluetooth, Ethernet, Phone USB Tethering, FireWire, Thunderbolt this, Thunderbolt that etc (everything)! and apply.

Only configure what you need right now. In my case it was only WiFi and Bluetooth.

This fixed my problem and my MacBook Pro with Touch Bar sleeps like a baby every time I close the lid without this issue now.

  • That's a good idea, I'll clean it up and see if the problem comes back. – voxobscuro Aug 6 '17 at 0:47
0

Tried disabling the WiFi tonight before closing the lid and it worked well. The system did wake up a couple times but there was no significant battery drain.

Now since that is not really a practical solution I wrote a script for Hammerspoon that disables WiFi automatically before the system goes to sleep. It also checks if the display is awake because otherwise it would wake up the WiFi chip every time the system wakes when the lid is closed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .