It has been noticed a few times that (for example) I worked with Xcode and some other apps, and then I left my MacBook with 80 percent of the battery. After a few minutes it automatically goes sleep, but in the morning when I try to wake it up I see that it has 0 percent of battery... Why is it happening? Shouldn't it just stop all the background processes and save the battery if I don't use it?

It is a pretty new MacBook. System battery info:

Enter image description here


added log file


  • If you leave it asleep during the day, how long does it last?
    – 2br-2b
    Commented Jul 21, 2021 at 5:55
  • @2br-2b The last time I left it was around 22:00 and in the morning 7:00 it was out of battery
    – Sirop4ik
    Commented Jul 21, 2021 at 6:14
  • What about during the day? How long does it last over a typical day?
    – 2br-2b
    Commented Jul 21, 2021 at 6:15
  • 1
    What model is this (e.g. how old)? How many battery cycles are listed in System Information > Power? The older it is beyond 3 years old, the greater the likelihood that the battery needs replacing. Also, what OS version, and do you have Power Nap turned on?
    – benwiggy
    Commented Jul 21, 2021 at 6:56
  • 3
    Conjecture: You have a bitcoin-mining virus.
    – DJG
    Commented Jul 21, 2021 at 14:49

1 Answer 1


It looks like you initiated sleep last night around 20:21.

2021-07-20 20:21:47 +0300 Sleep Entering Sleep state due to 'Software Sleep pid=133':TCPKeepAlive=active Using Batt (Charge:83%) 764 secs

At that point, your battery had 83% charge remaining. However, the sleep was specified to only last 764 seconds, or 12:44, and indeed the machine woke up exactly 12 minutes and 44 seconds later:

2021-07-20 20:34:31 +0300 Wake Wake from Deep Idle [CDNVA] : due to EC.PowerButton/User Using BATT (Charge:83%)

The system did not attempt to reenter sleep after that point. It then took only 13:24 more for your battery to lose 9% charge.

2021-07-20 20:47:55 +0300 Assertions Summary- [System: SysAct] Using Batt(Charge: 74)

Less than three hours later, the system initiated a sleep due to low battery power because it had exhausted its reserve capacity:

2021-07-20 23:09:41 +0300 Sleep Entering Sleep state due to 'Low Power Sleep':TCPKeepAlive=inactive Using Batt (Charge:0%) 33177 secs

So you did not, in fact, slowly lose power overnight. Your laptop remained awake for several hours and then entered emergency sleep. It stayed sleeping until the morning when you attached AC and opened the lid:

2021-07-21 08:22:38 +0300 Wake Wake from Standby [CDNVA] : due to EC.LidOpen/Lid Open Using AC (Charge:0%)

Now, the initial wakeup at 20:34:31 would be normal (it is a maintenance wake, i.e., 'Power nap') but the wake reason is not what I'd expect (EC.PowerButton/User rather than EC.RTC/Maintenance). This may be a bug.

That, alone, does not explain why your machine never went to sleep afterwards. What I can observe is that, after it wakes up, every minute or two it creates and releases a sleep assertion. I'm having trouble following the pairs, but there is likely a running process that's preventing sleep. (For example, I saw many instances of audio playback doing this in your log. Did you have music/videos playing in Chrome?)

  1. A crude but easy way to start attacking this is to quit all your apps before putting the machine to sleep for the night.
  2. As a separate experiment (do this before OR after experiment 1, not during), disable Power Nap.

In both cases, if the problem persists, please upload a new log (and specify the exact start + stop dates & times).

You must log in to answer this question.

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