MacBook wakes up from sleep while on battery and drains the battery

Apple is stupid? Maybe 🙂

Why issues like this are possible…

When people turn to solutions online all they find are generic solutions to toggle Power Nap off in the GUI settings.
Something which of course doesn’t work as it was tried in the first place.

I am experiencing the problem above and will share non-generic solutions here, which may or may not work (I’m yet to verify on my own).

## The issue

I don’t use the MacBook frequently, only whenever I am traveling. When putting MacBook to sleep on the table and going to bed in a hotel, some moments later it begins to spin its fat, and… obviously back to work, and disturbing my sleep unless I fully power it off.

Also, after fully charging for the next travel, and a few days later going somewhere, I only find its battery completely drained. This indicates it was still being powered on sometimes when waiting for me in the bag, for days…

## Troubleshooting

The command you can enter in Terminal and run as `sudo` to find wake up reasons is such:

log show –style syslog | fgrep “[powerd:sleepWake]”

However, Apple made even that quite useless by obfuscating some “private” wake up reasons, in the logs:

> Wake reason: “” identity: “

Still, *some* log entries can give an slight idea on what caused it to wake up.
I’ll review some of those here, from my understanding:

> DarkWake to FullWake from Normal Sleep [CDNVA] : due to HID Activity

HID is for external, often USB devices. This can be a plugged-in USB device, even an iPhone plugged in for charge from MacBook.

> DarkWake from Normal Sleep [CDN] : due to EC.ACAttach/Maintenance

“ACAttach” stands for plugging your MacBook into electricity. It can then automatically turn itself on in DarkWake (which is turned on, but the display is off) in order to do the PowerNap tasks or similar things.

> DarkWake from Normal Sleep [CDN] : due to EC.ACDetach/Maintenance

Supposedly that means waking up at the moment when the power is *detached* from the MacBook. Which doesn’t make sense… Although, if normal sleep keeps some data in RAM and the memory is powered on in normal sleep, that likely is for saving the data to the hibernation file and going to full hibernation.

> DarkWake from Hibernate [CDN] : due to EC.LowBattery/LowBattery

Why it’s supposed to wake up from hibernation if the battery is low? Unknown.

> Reason:BlueAvengers: Roll beacon advertisement

Apparently, this is related to Bluetooth. It is uncertain whether it’s related to iBeacons stuff based on the “beacon” word, but it *could* be a simpler Bluetooth device. I do have Magic Mouse, so, the first thing I’m doing is still the GUI stuff:

> Bluetooth → Advanced … → Allow Bluetooth devices to wake this computer (set to off)

The next one is:

> DarkWake from Standby [CDN] : due to RTC/Maintenance

This seems related to *external* requests from the outside, just based on the googling.
They do say that disabling TCP Keep Alive works:

sudo pmset -b tcpkeepalive 0

You’ll get a warning though:

> Warning: This option disables TCP Keep Alive mechanism when sytem is sleeping. This will result in some critical features like ‘Find My Mac’ not to function properly

So be ready for that. The `-b` switch changes the setting only for battery power source. So it’s not that it’s going to affect a lot of things.

There are many useful things like additional settings for preserving battery, if you explore `man pmset` !

Another solution is changing MTU size:

You may also like...

Leave a Reply

Your email address will not be published.