Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Touchbar MacBook Pro battery drain while sleeping

I have read about reported problems with battery life on the new MacBook pros but mine seems a bit different. Mine seems to drain battery while sleeping. On my old MacBook Pro I could put it to sleep overnight and it would use minimal battery. With this one on 100% charge when I wake it in the morning I'm sitting at about 70% remaining. I do not have power nap enabled, any ideas?

MacBook Pro with Retina display, macOS Sierra (10.12.2)

Posted on Dec 14, 2016 8:37 AM

Reply
34 replies

Jan 4, 2017 11:12 AM in response to kylecraft

I'm with you.


So far the best I could find is that battery drain while sleeping is related to frequent(more than 0 user driven wake means frequent for me) wake up that is unexpected as a user:

uptime; pmset -g stats

0:24 up 1 day, 23:07, 2 users, load averages: 1.16 1.24 1.23

Sleep Count:86

Dark Wake Count:74

User Wake Count:21

Around 2 days without rebooting/shutdown and accumulated 74 "Dark Wake"! Although this is an extreme result due to my experiment. (setting "NoMulticastAdvertisements" to 1 for mDNSResponder and shortened standbydelay to 30 minutes on 2017-01-03 and reverted on 2017-01-04)

A ridiculously high bytes written (14.69 GB!) count from Activity Monitor:

kernel_task 14.69 GB 1,004.9 MB 64 bit 0 root - No 0 bytes No 0 bytes 4.1 23:38.19 0 bytes 0 bytes 0 bytes No No 0 bytes 0 bytes 0 0 0 bytes Yes

Although this is a side effect after setting standbydelay to half an hour. The default setting is 3 hours.


Fighting with my first mbp a few days and here is the summary of my findings:


1. hibernate mode


By default it is 3, which means whenever the computer sleep, the used RAM(maybe the compressed one) will be written to disk. This is called "Safe Sleep". -> I'm sure I will never run out of battery or all of my previous laptop knows to enter hibernate mode at low power state even sleeping, I must disable it as I wonder if writing roughly 1 GB per sleep with a high number of Dark Wake will use up too much battery unnecessary.


2. mDNSResponder


It is one of the suspect due to this: (snippet of pmset -g log)

2017-01-04 17:05:48 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:45%) 7228 secs

2017-01-04 17:05:50 +0800 Wake Requests [*proc=mDNSResponder request=Maintenance inDelta=7198] [proc=powerd request=TCPKATurnOff inDelta=32430]

2017-01-04 19:05:50 +0800 Kernel Client Acks Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(538 ms)]


7198 = 2h * 3600s/h - 50s-48s

This formula is true for other inDelta values.

Setting NoMulticastAdvertisement to 1 helps removing the RTC wake request by mDNSResponder. But....


3. ARPT/Network, DriverReason:WiFi.ScanOffload*


After(if you notice the date is 2017-01-03 here while 2017-01-04 for mDNSResponder above, this is because I unset the NoMulticastAdvertisement on 2017-01-04 for cross-verification) mDNSResponder no longer waking, ARPT/Network wake become very frequent when standbydelay was set to 1800 (other values may have the same effect too, not verified): (snippet of pmset -g log | grep -Ei 'reason|arpt|ec.sleep|rtc|entering sleep|maintenance sleep|EC\.[^ ]+|scanoffload')


2017-01-03 19:01:12 +0800 WakeDetails DriverReason:WiFi.ScanOffload-Unspecified - DriverDetails:

2017-01-03 19:01:42 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:47%) 754 secs

2017-01-03 19:14:16 +0800 DarkWake DarkWake from Standby [CDN] due to ARPT/Network: Using BATT (Charge:47%) 30 secs

2017-01-03 19:14:16 +0800 WakeDetails DriverReason:WiFi.ScanOffload-Group key handshake timeout - DriverDetails:

2017-01-03 19:14:46 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:47%) 325 secs

2017-01-03 19:20:11 +0800 DarkWake DarkWake from Standby [CDN] due to ARPT/Network: Using BATT (Charge:46%) 30 secs

2017-01-03 19:20:11 +0800 WakeDetails DriverReason:WiFi.ScanOffload-Unspecified - DriverDetails:

2017-01-03 19:20:41 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:46%) 631 secs

2017-01-03 19:31:12 +0800 DarkWake DarkWake from Standby [CDN] due to ARPT/Network: Using BATT (Charge:46%) 30 secs

:

:

(recurring)


4. XCH1/HibernateError (check it by pmset -g log | grep --color HibernateError)


This error start appearing when the swap file was disabled by setting the boot-args of nvram. It is harder to set on this new mbp 13" 2016 with touch bar probably due to the side effect. The side effect of disabling swap file is the XCH1 failing to hibernate which caused the failure of the IOBluetoothHostControllerUARTTransport driver and thus the death of bluetooth. I discovered this story because Apple Watch Unlock no longer working for me. It took a long way to find out the cause and fix it by resetting NVRAM.



The early conclusion based on many dog fights with my first mbp:


  1. DON'T disable swap file until you find a way to prevent XCH1/HibernateError because your machine will have problem sleeping well and the bluetooth will become irresponsive.
  2. hibernatemode 0 is okay, feel free to set it.
  3. standbydelay SHOULD NOT be too short until you find a way to prevent the Dark Wakes.
  4. DON'T set the mDNSResponder's preference NoMulticastAdvertisements to 1 until you find a way to prevent the ARPT/Network Dark Wake because things will just get worse!
  5. pmset is our good friend, if anyone got more information about what it shows and how to dig more in details, please guide us to the paradise.


A few notes about reading pmset -g log:

  1. Entering Sleep state due to 'X' where X can be:
    1. Clamshell Sleep - when the lid is closed
    2. Idle Sleep - when idled for sleep delay
    3. Maintenance Sleep - re-entering into Deep Idle or Standby state
  2. (Dark)Wake from balhblahbalh due to X where X can be:
    1. ARPT/Network - ****, DarkWake related to WiFi, but why?
    2. EC.LidOpen - alright, wake by me
    3. EC.SleepTimer - standby time reached, hibernate!
    4. RTC/Maintenance - the clock set by software, most likely mDNSResponder in our case
    5. XHC1/HibernateError - argh, u got swap file disabled? Is your bluetooth still fine?


References that maybe helpful:


  1. rMBP 2015 Wake Reason: ARPT (Network) (ahha, rMBP 2015 experienced the same, a temporary workaround is to turn off WiFi before sleeping the machine)
  2. http://apple.stackexchange.com/questions/152305/disable-swapping-on-yosemite (any better way to disable swap file for Sierra? I have just tried the nvram one, may try those said for Sierra later...)
  3. Enhanced notifications that can wake your Mac - Apple Support (some useful things, will Find My Mac cause wake by WiFi?)
  4. If your Mac doesn't sleep or wake when expected - Apple Support (useful troubleshooting steps, try to follow it)


Lastly, I've disabled the "Wake for Wi-Fi network access" option in the Power Adapter tab to see if this affect battery use or not...good luck to me.

Jan 5, 2017 10:27 AM in response to a little bitter

Update to the problem, disabling "Wake for Wi-Fi network access" indeed cause "Find My iMac" to show something different, but the ARPT/Network wake is still there.


So far the best workaround is like what has been discussed in rMBP 2015 Wake Reason: ARPT (Network) - disable Wi-Fi before sleeping. pmset -g log showed no wake at all. (Note that I have tried hard to make sure I have not turn on any feature that requires wake on wifi network access but I could have missed something)


BTW, I wonder if all of you have set the NoMulticastAdvertisement of mDNSResponder to 1? Because if mDNSResponder is waking every 2 hours, there will be much fewer ARPT/Network wakes.


To check this, run this in terminal (on a clean installation you should see something like file does not exist):


$ plutil -p /Library/Preferences/com.apple.mDNSResponder.plist

{

"NoMulticastAdvertisements" => 1

}

$

Another way to confirm this is to run:

$ pmset -g log | grep =mDNSResponder

On a clean installation you should see something like:

[*proc=mDNSResponder request=Maintenance inDelta=7198]

Jan 4, 2017 6:02 AM in response to kylecraft

I have been trying everything I can think of with no resolution. I wiped / reloaded my machine. I have removed anything that runs as a service. I have been sure to shut down all apps before I close the lid. Nothing seems to help...every time I put it to sleep it eats up quite a bit of battery. I have owned several MacBook Pros, none of them used very much battery while asleep.

Jan 6, 2017 3:10 PM in response to kylecraft

I did a bit more experiment by disabling anything that might seem related and the good news is that after that without turning off WiFi, no wake at all except the standby one!


The bad news is that I need to:


1. Disable Find My Mac (even if Wake for Wi-Fi network access is disabled!)

2. Disable Wake for Wi-Fi network access (under the Power Adapter tab, I think this is a very confusing option which I expect it take effect only when the Power Adapter is plugged in)


I'm turning on more features(such as location service for Siri and send diagnostic ..) to see if any of them would trigger the problem again.

Jan 11, 2017 6:15 AM in response to a little bitter

Finally noted the key signal:


TCPKeepAlive=active


If this is active then the machine will be waken and won't wake otherwise.


Then I searched through all pmset log and it looks the hypothesis of no wake if tcpkeepalive is inactive is not rejected.


The next step will be to find out what are the established tcp connections while all apps are closed and which process is responsible for it.

Jan 18, 2017 4:28 AM in response to kylecraft

I also struggled with this problem of 2 hour wake-ups. And I noticed the flag "TCPKeepAlive=active" in the pmset log.


For me, the fix was to disable "Find my Mac" in iCloud settings. After doing that, the flag changed to "TCPKeepAlive=inactive" and it is no longer waking up every 2 hours. Since I still want to use the Find my Mac feature, we need a different fix here. Running around with the feature disabled gives me an insecure feeling.

Jan 20, 2017 7:37 AM in response to Frontliner

In fact I don't recommend setting 1 for NoMulticastAdvertisements because I doubt that it is a workaround to prevent frequent wakeup by ARP.


But if you would like to try, here it is (I'm on Sierra 10.12.2 16C68):


launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool $option

launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Jan 20, 2017 9:06 AM in response to PetesFeats

I feel the same. So I've restored everything (Unset NoMulticastAdvertisement and re-enable Find My Mac) and just let it wake for every 2 hours.


If I want it to sleep overnight, I just shut it down......


The 2 hours wake maybe some intended change as this provides higher chance for Find My Mac to try to work at every 2 hours. But then the standby mode is completely useless or even worse because it writes the RAM to disk every 2 hours once standby mode is entered......


But I still think that I should be able to control this myself instead of tweaking with mDNSResponder and disabling Find My Mac together to completely sleep my device.


Next step to study maybe to study the source code of mDNSResponder to see how could it masks the wake of ARPT and wake every 2 hours instead of anytime. (This makes the "Wake for network access" setting a little bit weird)

Feb 10, 2017 9:17 AM in response to kylecraft

Well guess what, I leave everything as last time (no tweak) and the tcp keep alive suddenly become inactive(2nd last line) and it had a good sleep today while I'm out! Magic! I could only assume that this issue is definitely related to the tcp keep alive "flag" of some active tcp connections.


(on the other hand, while setting NoMulticastAdvertisement to 1 and disabling Find My Mac and disabling wake on network access can guarantee to have perfect sleep)


2017-02-10 00:08:53 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:100%) 7201 secs

2017-02-10 02:08:54 +0800 DarkWake DarkWake from Deep Idle [CDN] due to RTC/Maintenance: Using BATT (Charge:100%) 4 secs

2017-02-10 02:08:58 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:100%) 7201 secs

2017-02-10 04:08:59 +0800 DarkWake DarkWake from Deep Idle [CDN] due to RTC/Maintenance: Using BATT (Charge:100%) 7 secs

2017-02-10 04:09:06 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:100%) 7003 secs

2017-02-10 06:05:49 +0800 DarkWake DarkWake from Deep Idle [CDN] due to ARPT/Network: Using BATT (Charge:99%) 30 secs

2017-02-10 06:06:19 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:99%) 163 secs

2017-02-10 06:09:02 +0800 DarkWake DarkWake from Deep Idle [CDN] due to EC.SleepTimer/SleepTimer: Using BATT (Charge:99%) 4 secs

2017-02-10 06:09:06 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:99%) 3114 secs

2017-02-10 07:01:00 +0800 DarkWake DarkWake from Standby [CDN] due to ARPT/Network: Using BATT (Charge:98%) 30 secs

2017-02-10 07:01:30 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:98%) 905 secs

2017-02-10 07:16:35 +0800 DarkWake DarkWake from Deep Idle [CDN] due to EC.SleepTimer/SleepTimer: Using BATT (Charge:98%) 4 secs

2017-02-10 07:16:39 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:98%) 7228 secs

2017-02-10 09:17:07 +0800 DarkWake DarkWake from Standby [CDN] due to RTC/Maintenance: Using BATT (Charge:97%) 0 secs

2017-02-10 09:17:07 +0800 Sleep Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=active Using Batt (Charge:97%) 7228 secs

2017-02-10 11:17:35 +0800 DarkWake DarkWake from Standby [CDN] due to RTC XHC1/Maintenance: Using BATT (Charge:96%) 5 secs

2017-02-10 11:17:40 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:96%) 3150 secs

2017-02-10 12:10:10 +0800 DarkWake DarkWake from Standby [CDN] due to RTC/Maintenance: Using BATT (Charge:96%) 0 secs

2017-02-10 12:10:10 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=inactive Using Batt (Charge:96%) 44997 secs

2017-02-11 00:40:07 +0800 Wake Wake from Standby [CDNVA] due to EC.LidOpen XHC1/Lid Open: Using BATT (Charge:95%)

Mar 1, 2017 5:57 PM in response to remigirr

This is still happening and was happening all night


2017-03-01 22:41:08.176396+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-01 22:41:08.176398+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-02 00:41:04.298375+1030 0xbdecb Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 00:41:53.491061+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-02 00:41:53.491063+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-02 02:41:49.718549+1030 0xbe447 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 02:42:39.392314+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 02:42:39.392316+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 03:00:25.808770+1030 0xbeb28 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 03:01:15.405268+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 03:01:15.405270+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 03:37:45.703478+1030 0xbf208 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 03:38:35.419638+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-02 03:38:35.419640+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: RTC (Alarm)

2017-03-02 05:38:31.797289+1030 0xbf913 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 05:39:37.479755+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 05:39:37.479757+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 05:40:50.737059+1030 0xbfe78 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 05:41:40.397801+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 05:41:40.397803+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 05:50:58.806726+1030 0xc05c2 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 05:51:48.399000+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 05:51:48.399002+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 07:04:09.843219+1030 0xc0b5f Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 07:04:59.598154+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 07:04:59.598156+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)

2017-03-02 07:05:51.947728+1030 0xc1287 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

2017-03-02 07:06:41.603324+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: XHC1

2017-03-02 07:06:41.603326+1030 0x73 Default 0x0 0 kernel: (AppleACPIPlatform) Wake reason: XHC1

2017-03-02 08:38:09.511001+1030 0xc1940 Default 0x0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)

Mar 3, 2017 12:24 PM in response to remigirr

It seems that this mbp by design will sleep deeply after 12 hours. It can waste as much as 8% battery at around 80% level or 3% at 100% level. This is a significant waste of battery so I really hope Apple has really identified the issue and will release a fix soon as said by the OP.


FYI, my pmset log dated back to 2016-12-21 (I've lost some logs as I backed up too late), just several days after the first use.


Use this command to see the pairs that have good sleep:

pmset -g log | egrep -i 'Clam|inactive|LidOpen' | grep -B 1 inactive


Here is my log saved previously and up to now:

2016-12-21 04:46:54 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:100%) 824 secs

2016-12-21 16:47:52 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=inactive Using Batt (Charge:98%) 31469 secs

--

2016-12-22 08:36:14 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:87%) 2543 secs

2016-12-22 20:37:27 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=inactive Using Batt (Charge:79%) 4097 secs

:

:

--

2017-02-27 02:00:14 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:75%) 7201 secs

2017-02-27 14:01:13 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=inactive Using Batt (Charge:67%) 31012 secs

--

2017-02-28 03:37:43 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using Batt (Charge:100%) 7201 secs

2017-02-28 15:38:57 +0800 Sleep Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=inactive Using Batt (Charge:97%) 110591 secs

:

: # after setting pmset -a standbydelay 43200 (12 hours)

: # this is to reduce the standby count because it will be waken up anyway....while entering standby mode will write the RAM to disk.

--

2017-03-02 03:54:57 +0800 Sleep Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using AC (Charge:100%) 580 secs

2017-03-02 16:06:05 +0800 Sleep Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=inactive Using Batt (Charge:97%) 124852 secs

Mar 18, 2017 2:03 AM in response to kylecraft

Yesterday afternoon we had a thunderstorm come thru so I powered off my MBPT to be safe. I also unplugged the power cord since I wanted to be sure any power surge would not go through the charger and damage the computer even though it was turned off. So this morning I tried to power up the computer by pushing down the power button. No luck Then I realized that the power cord was not plugged in so I plugged it in and tried a few more times. It finally powered up. I have now noticed that after about thirty minuted the battery is 9% charged. What is curious is that when I powered it off the battery was over 95% charged. It sat here all night powered off and somehow it drained the battery. Why should the computer use up the battery when it is powered off?

Touchbar MacBook Pro battery drain while sleeping

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.