My MacBook is warm and drain battery over the night. So I investigate what happens.

It appears that the router cannot keep the Wi-Fi connection alive which causes mac to keep waking up every 2 minutes.

I start investigation using pmset -g log which print out the useful log on sleep and wake events of the mac.

Here I found mac tries to wake itself up trying to perform TCP Keep-alive.

2021-10-31 11:54:59 +0700 Assertions          PID 211(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd000083b7 [System: DeclUser kDisp]
2021-10-31 11:54:59 +0700 Assertions          PID 211(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd000083b7 [System: PrevIdle DeclUser kDisp]
2021-10-31 11:54:59 +0700 Assertions          PID 114(apsd) Released ApplePushServiceTask "com.apple.apsd-connectinguser-push.apple.com" 00:01:16  id:0x0xb000083b2 [System: PrevIdle DeclUser kDisp]
2021-10-31 11:55:02 +0700 Assertions          PID 84(powerd) Created InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:00  id:0x0xd000083bf [System: PrevIdle DeclUser kDisp]
2021-10-31 11:55:02 +0700 DarkWake            DarkWake from Deep Idle [CDN] : due to EC.ARPT/Maintenance Using BATT (Charge:33%) 69 secs
2021-10-31 11:55:02 +0700 WakeDetails         DriverReason:WLC_E_PFN_NET_FOUND - DriverDetails:00020000210000000000000000000000000000003800000000000000000
DriverReason:ARPT - DriverDetails:
2021-10-31 11:55:02 +0700 HibernateStats      hibmode=3 standbydelaylow=10800 standbydelayhigh=86400785
2021-10-31 11:55:02 +0700 WakeTime            WakeTime: 3.934 sec
.
.
.
2021-10-31 11:57:15 +0700 DarkWake            DarkWake from Deep Idle [CDN] : due to EC.RTC/Maintenance Using BATT (Charge:33%) 11 secs
2021-10-31 11:57:15 +0700 HibernateStats      hibmode=3 standbydelaylow=10800 standbydelayhigh=86400786
2021-10-31 11:57:15 +0700 WakeTime            WakeTime: 1.899 sec

The Solutions

There are many options to solve the problem.

  1. replace the router to newer model or
  2. simply disable tcpkeepalive pmset -b tcpkeepalive 0 or
  3. turn off WiFi and Bluetooth (yes, Bluetooth as well) before put the mac to sleep

One of the solution will work. It just a matter of what solution suits you best. I choose to turn off WiFi and Bluetooth since I only face this problem when I face the faulty router (not my home router).

Experimental

pmset -g
pmset -g assertionslog
sudo pmset disableassertion InternalPreventSleep
sudo pmset disableassertion MaintenanceWake

sudo pmset enableassertion InternalPreventSleep
sudo pmset enableassertion MaintenanceWake