Thursday, November 14, 2024

Macbook Air battery drain while sleeping

With the lid closed, my Macbook Air (13” 2020 Intel (MacBookAir 9,1), macOS 14.3.1) drains battery, often at a rate of more than 10 percentage points per 24 hours.

I have tried:

  1. the usual voodoo of resetting PRAM, SMC and whatnot and have even gone as far as reinstalling the OS.

  2. turning off everything that seemed related to background sync, including logging out from iCloud, with no apparent effect. I turned those things back on.

My configuration is:

  • “Wake for network access” and “Power Nap” are set to “power adapter only”.
  • Power savings mode is at “when on battery power”.
  • Battery health is “normal”.
  • There is nothing electrically connected (USB or 3.5 mm earphone jack) to the computer.

What is the computer doing that is so important that it needs to happen all night, with nobody watching it?

Further information:

pmset -g log shows two kinds of DarkWake events: EC.RTC and EC.ARPT.

The RTC events happen regularly, usually an hour apart, but sometimes two hours.

The EC.ARPT events occur in bursts, with about one event per minute, over a period of an hour or so. These are, judging by the reason (packet data dump) given in the pmset log and snooped network traffic, caused by incoming packets on an already-established TCP connection on remote port 5223, remote host eu-north-courier-4.push-apple.com.akadns.net or any of several similar domain names.

log —show for the time around any of these events shows several thousand lines of output!

Fairly often, the machine sits nicely idle, briefly waking up every one or two hours during the night, but then has one of those EC.ARPT bursts, lasting one or two hours, around six o’clock in the morning.

I tried turning WiFi off, and then the indicated battery level increased from 49% to 51% overnight, despite the machine not being plugged in! In this configuration, the pmset log indicates DarkWake events every two hours, which seems reasonable.

The total network traffic over a 24h period is usually around 5 Mbyte, which is already quite a lot for a machine which sitting with its lid closed, byt I have seen one extreme of almost 50 Mbyte!

The complete pmset log for one ARPT event looks a follows. During this period, there was network traffic with

  • eu-north-courier-4.push-apple.com.akadns.net:5223
  • get-bx.g.aaplimg.com:443
  • api.apple-cloudkit.fe.apple-dns.net:443

(Yes, these data were captured last November, with an earlier macOS version, but the symptoms remain the same today.)

2023-11-27 08:00:49 +0100 WakeDetails           DriverReason:ARPT - DriverDetails:                                         
DriverReason:DataFrame - DriverDetails:080045020198e16500003806398f11399285c0a802031467db1eab729a8
DriverReason:ARPT - DriverDetails:                                         
2023-11-27 08:00:49 +0100 HibernateStats        hibmode=3 standbydelaylow=10800 standbydelayhigh=86400                                    rd=243 ms     
2023-11-27 08:00:49 +0100 WakeTime              WakeTime: 0.773 sec                                                                       
2023-11-27 08:00:49 +0100 Kernel Client Acks    Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(672 ms)] [IOThunderboltControllerType4 driver is slow(msg: SetState
 to 2)(376 ms)] [AppleHPMIECS driver is slow(msg: WillChangeState to 2)(395 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(301 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(584 
ms)] [RP01 driver is slow(msg: SetState to 0)(1016 ms)] 
2023-11-27 08:00:49 +0100 Kernel Client Acks    Delays to Wake notifications: [RP05 driver is slow(msg: SetState to 2)(727 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(643 ms)] [RP01 dri
ver is slow(msg: SetState to 0)(1010 ms)] [RP05 driver is slow(msg: SetState to 2)(723 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(303 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState
 to 0)(702 ms)] [RP01 driver is slow(msg: SetState to 0)(1018 ms)] [RP05 driver is slow(msg: SetState to 2)(723 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(681 ms)] [RP01 driver is slow
(msg: SetState to 0)(1005 ms)] [RP05 driver is slow(msg: SetState to 2)(723 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(300 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(679 
ms)] [RP01 driver is slow(msg: SetState to 0)(1006 ms)] [RP05 driver is slow(msg: SetState to 2)(727 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(651 ms)] [RP01 driver is slow(msg: SetSt
ate to 0)(1008 ms)] [RP05 driver is slow(msg: SetState to 2)(725 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(303 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(678 ms)] [RP01 
driver is slow(msg: SetState to 0)(1014 ms)] [RP05 driver is slow(msg: SetState to 2)(724 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(301 ms)] [AppleIntelFramebuffer driver is slow(msg: SetSt
ate to 0)(637 ms)] [RP01 driver is slow(msg: SetState to 0)(1008 ms)] [RP05 driver is slow(msg: SetState to 2)(723 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(302 ms)] [AppleIntelFramebuffer 
driver is slow(msg: SetState to 0)(640 ms)] [RP01 driver is slow(msg: SetState to 0)(1018 ms)] [RP05 driver is slow(msg: SetState to 2)(724 ms)] [AppleIntelFramebuffer driver is slow(msg: SetState to 0)(6
42 ms)] [RP01 driver is slow(msg: SetState to 0)(1010 ms)] [RP05 driver is slow(msg: SetState to 2)(728 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(303 ms)] [AppleIntelFramebuffer driver is s
low(msg: SetState to 0)(665 ms)] [RP01 driver is slow(msg: SetState to 0)(1007 ms)] [RP05 driver is slow(msg: SetState to 2)(725 ms)] [AppleUSBVHCIBCE driver is slow(msg: SetState to 1)(300 ms)] [AppleInt
elFramebuffer driver is slow(msg: SetState to 0)(644 ms)] [RP01 driver is slow(msg: SetState to 0)(1013 ms)] [RP05 driver is slow(msg: SetState to 2)(724 ms)] [AppleIntelFramebuffer driver is slow(msg: Se
tState to 0)(675 ms)] [RP01 driver is slow(msg: SetState to 0)(1007 ms)] [RP05 driver is slow(msg: SetState to 2)(723 ms)]           
2023-11-27 08:00:56 +0100 Assertions            PID 98(powerd) Released InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:06  id:0x0xd0000915b [System: No Assertions]          
2023-11-27 08:00:56 +0100 Assertions            PID 98(powerd) Released PreventStandby "Proxy to prevent standby entry" 00:00:27  id:0x0x800009154 [System: No Assertions]          
2023-11-27 08:00:56 +0100 Assertions            PID 98(powerd) Created PreventStandby "Proxy to prevent standby entry" 00:00:00  id:0x0x800009161 [System: No Assertions]          
2023-11-27 08:00:56 +0100 Sleep                 Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active Using Batt (Charge:16%) 49 secs   
2023-11-27 08:00:58 +0100 Wake Requests         [process=mDNSResponder request=Maintenance deltaSecs=7198 wakeAt=2023-11-27 10:00:56 info="upkeep wake"] [process=powerd request=AdaptiveWake deltaSecs=4933
 wakeAt=2023-11-27 09:23:11] [*process=powerd request=TCPKATurnOff deltaSecs=63 wakeAt=2023-11-27 08:02:01] [process=powerd request=CSPNEvaluation deltaSecs=68 wakeAt=2023-11-27 08:02:06] [process=powerd 
request=UserWake deltaSecs=22153 wakeAt=2023-11-27 14:10:12 info="com.apple.alarm.user-invisible-com.apple.calaccessd.travelEngine.periodicRefreshTimer,358"]           
2023-11-27 08:00:58 +0100 PM Client Acks        Delays to Sleep notifications: [com.apple.bluetooth.sleep is slow(1556 ms)] [com.apple.apsd is slow(1877 ms)]           
2023-11-27 08:01:44 +0100 Assertions            PID 98(powerd) Created InternalPreventSleep "Holding in darkwake for up to 20 seconds to query model for inactivity prediction" 00:00:00  id:0x0xd00009164 [
System: SRPrevSleep kCPU]          
2023-11-27 08:01:44 +0100 Assertions            PID 229(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00009167 [System: SRPrevSleep kCPU]          
2023-11-27 08:01:44 +0100 Assertions            PID 229(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00009167 [System: SRPrevSleep kCPU]          
2023-11-27 08:01:44 +0100 Assertions            PID 98(powerd) Released InternalPreventSleep "Holding in darkwake for up to 20 seconds to query model for inactivity prediction" 00:00:00  id:0x0xd00009164 
[System: PrevIdle]          
2023-11-27 08:01:45 +0100 Assertions            PID 98(powerd) Created InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:00  id:0x0xd00009169 [System: PrevIdle]   

Related Articles

Latest Articles