Fix MacBook Battery Drain While Sleeping in 4 Days or Less

Photo of author
Written By Mac telligence.com

Lorem ipsum dolor sit amet consectetur pulvinar ligula augue quis venenatis. 

Why do MacBook batteries drain while in sleep mode? The answer is because MacBook is not entirely inactive while asleep, the computer is still it’s doing things requiring power. Whenever the MacBook performs tasks, it drains the batteries because it needs the energy to perform those tasks.

If your MacBook’s battery is draining while it is sleeping, it happens for two reasons: the Mac gets awakened periodically by an external event (network, Bluetooth signal, or peripheral hardware), or there is an application that runs in the background that does not let MacBook go to sleep.

To fix the problem you need to find the app or process that keeps the Mac awake even when you close the lid.

However, every Mac environment is unique. You and I have different apps installed, so it is hard for me to tell which applications are causing battery drainage. In this post, I will provide tools to explore and find rogue apps or processes running on your Mac.

We will try to fix the battery issues in 4 days or less. Each day we will try progressively more advanced techniques. While I hope we wouldn’t need to resort to the most radical remedies, at some point, you may need to try something out of your comfort zone.

But before we start, let’s understand that you may always have some little battery discharge. What I want to say, is if after Day 1 the battery loss changes from 30% to 5%, it may be not worth it to keep pushing and implementing Day 2 techniques. You need to know when to stop.

Day 1

On day 1, you will try everything that does not require special skills. Since we are going to change many things at once, if even one change works, we wouldn’t know exactly which change fixed the issue.

If you like to make minimal changes to the MacBook Pro or MacBook Air, implement only one change every day and verify the next morning if the fix was efficient or not. If the change did not help, you could revert it.

But, if you want to get it done as soon as possible, then it makes sense to apply all fixes in one day. And it’s exactly what we are going to do. We will cram all possible changes on the first day and measure them the next day.

Scan for viruses

What? Didn’t you know that Mac can get a virus? Unfortunately, this happens. If you want to find out more about Mac viruses and ways to protect your laptop from them, check my article:

There might be a virus on my Mac! What Do I Need to Do?

I want you to set up either Mac Internet Security from Intego or Norton 360 for Mac today, and then conduct the scan.

And why these two? On my MacBook, I tried 117 malware samples, and only these two apps were able to find and get rid of every virus.

Why does this work?

The goals of any malware are:

  • Do damage to your computer.
  • Hide, so you can’t find and delete it.

When malware is running, you may not see anything on the screen. Even when you think you closed all apps, the virus may still be running in the background and draining the battery.

On the other hand, if you already have active anti-malware protection, there is a possibility that the antivirus is using energy. We will see how to find out this in later sections.

Check battery state

If the MacBook is several years old, it is possible that the battery does not hold a charge as effectively as before.

The easiest way to check the battery state is by holding the Option (Alt) key and clicking on the battery icon in the top right corner of the screen.

Obviously, for this method to work, you must have a battery icon configured to appear on the screen.

Below is the screenshot from my MacBook Pro.

Battery Condition

As you can see, the state is Normal. This is what you want to see on your MacBook. There are other states besides Normal:

  • Replace Soon
  • Replace Now
  • Service Battery

Check out my post Should I Drain my MacBook Battery Before Recharging to learn more about what each stage represents as well as other battery-related topics including battery life cycles, battery capacity, and techniques to prolong the longevity of MacBook Pro batteries.

How does this function?

It’s time to replace the battery if it is not in the Normal state. If the hardware is failing, altering the system further serves no purpose.

A new battery in the US will cost you between $129 and $199, according to Mac Service and Repair.

Run OS updates

  1. Open the System Preferences app.
  2. Click on Software Update pane.
  3. Wait for Mac to check if there any updates available
  4. If there any updates, then open the App Store and click on Updates.
Run OS updates
Check for OS updates

Why does this work?

macOS updates sometimes have fixes for battery usage. If there was a problem with the OS, you want that fix installed.

Start in Safe mode

What is Safe mode?

When MacBook starts in a safe mode (also called safe boot), it does not load many things that generally run on start. For instance, if you have the DropBox running on startup, it will not load automatically. Also, most external devices will not be available; graphics may be slower, wifi limited, etc.

Why does this work?

By itself, the safe mode is not very useful. After all, why would you run your MacBook in a reduced fashion? However, the booting in the Safe mode triggers some internal checks, which may cause some issues with the MacBook performance. All you need is to boot in Safe mode and then restart in a regular way.

How to boot in Safe mode?

  • Reboot MacBook.
  • Before MacBook starts, press and hold the Shift key.
  • When the Apple logo appears, you can release the Shift key.
  • Log in.
  • Reboot again (without holding the Shift key).

Exceptions:

If you have FileVault enabled, then you need to enter the password twice.
If you have a firmware password enabled, then first disable the firmware password, reboot in safe mode, and turn the password back on.

Reset PRAM/NVRAM and SMC

All MacBooks have some vital settings saved in PRAM (Parameter RAM) and NVRAM (non-volatile RAM). Sometimes the data in those memory pockets gets corrupted, and the MacBook Pro (or Air) starts misbehaving. Apple recommends resetting those settings when you think there is an issue with sound, display, disk, etc.

Similarly, Apple recommends resetting SMC (System Management Controller), which is responsible for many things and among them Battery Management and Thermal management. The most important for us they suggest resetting SMC if:

  • Your computer’s fans run at high speed, even though it isn’t under heavy usage and is properly ventilated.
  • Your Mac notebook doesn’t respond properly when you close or open the lid.
  • The battery doesn’t charge properly.

There are detailed instructions on resetting PRAM/NVRAM and SMC from Apple, so I am not going to repeat them here:

There are two things I want to add to those instructions:

Similar to Safe Mode resetting PRAM does not work when a firmware password is enabled. So, first, disable the firmware password, reset PRAM and SMC, and turn the password back on.

Many people report that they had to reset settings multiple times, sometimes up to 6. Since, you don’t have a visible problem such as a black screen or lack of sound, to verify that resetting worked, I suggest repeating the procedures several times just in case. In other words, reset PRAM two times and then reset SMC at least two times.

Disable Power Nap while on battery power

Power Nap is a great way to have your MacBook do some useful work while it is not in use. When MacBook is in Power Nap state, it updates Mail messages, syncs Contacts, Calendar, Notes, and Reminders settings. It also syncs iCloud photos with other devices. It also updates the location of the laptop for the Find My Mac feature.

The only problem is the power part: a Power nap drains the battery. There are two ways to enable the Power Nap state: when on battery or power adapter. It is ok to have it enabled when Mac is plugged into the power, but you need to turn it off while the laptop is not powered.

How to turn it off

  1. Open the System Preferences app.
  2. Click on the Energy Saver pane.
  3. Click on the Battery tab.
  4. Make sure that Enable Power Nap while on battery power is unchecked.
Open the System Preferences app
Disable Power Nap on battery power

Disable Bluetooth

Unlike Power Nap, Bluetooth is usually enabled on MacBooks by default. If you are not using any Bluetooth devices with the laptop such as keyboard, mouse, or headphones, you can disable Bluetooth altogether:

  1. Open the System Preferences app.
  2. Click on the Bluetooth pane.
  3. Click on Turn Bluetooth Off button

If you use Bluetooth devices, then the best you can do is to disable the wakeup setting:

  1. Open System Preferences app.
  2. Click on the Bluetooth pane.
  3. Click on the Advanced button
  4. Uncheck the third setting: Allow Bluetooth devices to wake this computer.
Allow Bluetooth devices to wake this computer
Disallow Bluetooth devices to wake MacBook

Why does this work?

If Bluetooth is enabled, the MacBook periodically will wake up to check for signals from other devices and hence use energy. So, turning it off should prevent waking up.

Turn off notifications

Like iPhone MacBooks also have a Do not disturb option. When this setting is On, then the MacBook does not respond to notifications from different applications. It is possible to set the time when notifications are disabled, but in our case, we care more about sleep mode.

Since all we care about reducing the number of app activities when MacBook is sleeping, let’s do the following:

  1. Open System Preferences app.
  2. Click on Notifications pane.
  3. Click on Do Not Disturb item on the left.
  4. Enable When the display is sleeping option

Why does this work?

When notifications enabled, the apps have to check if new notifications available periodically. Setting Do not disturb option prevents those checks and reduce battery drainage.

Prepare for Day 2

You made a lot of changes in Day 1, and now we need to prepare for the next day activities. We will be using Activity Monitor a lot, so it’s time to learn some basics about this app.

Read my post about Activity Monitor if you never used it before or need a refresher.

Enable required settings in Activity Monitor:

  1. Start Activity Monitor
  2. Switch to the Energy tab
  3. In the app menu (menu bar at the top of the screen) click on View -> Columns.
  4. Make sure Energy Impact and Preventing Sleep columns are checked.
  5. Click on the View menu again and enable the Applications in the last 12 hours option.
Start Activity Monitor

Activity Monitor Energy Settings

Continue working on your MacBook as usual, but complete these final tasks before turning it off for the evening:

  1. Disconnect any external devices and the external display (USB, USB-C, LAN). Eject any SD cards you may have. The computer often awakens from sleep while using any of those devices.

2. Launch Activity Monitor. The apps that will keep your MacBook from going to sleep can be found by sorting the Apps list by the Preventing Sleep column. It was Spotify in my situation, so I stopped using it. Keep in mind that shutting an app is different from quitting.

Activity Monitor Energy Settings
Spotify Preventing MacBook from Sleep

3. Next, select View -> Remove CPU History from the menu or press Command+K on your keyboard to clear the history. Stop using Activity Monitor.

4. Record the battery’s current percentage.

5. Save this page as a bookmark so you can return to it later.

I was unable to locate a setting that would restrict history to periods shorter than 12 hours. Therefore, you must wait at least 12 hours after closing a MacBook lid before opening it the next day. In reality, I would hold off for a bit longer than 12 hours—possibly an additional hour or 30 minutes.

Day 2

Verify the battery’s percentage. Congratulations if it is close to the value you noted yesterday!

It’s time to identify the Mac apps that are consuming the most battery life if the MacBook is still losing a substantial amount of energy.

  1. Launch Activity Monitor.
  2. Toggle to the Energy tab.
  3. Ensure that the option for Applications in the Last 12 Hours is enabled. If you didn’t, do it right away.
  4. Sort by the average energy impact column. A column called “Energy Impact” describes the impact right now. The average number for the past 12 hours is shown in the Avg Energy Impact column.

Every user’s computer is run by a different set of software, as I said at the outset. Therefore, your list will be unique from mine or from someone else’s. You may determine that the source of the energy used is DropBox. Google Drive or iCloud Safari Bookmark Syncing could be the cause.

Even though Power Nap should prevent issues with some apps, it’s still conceivable that they include bugs. Although the energy impact can be minimal, even minimal energy use over a 12-hour period can result in a 10% charge loss.

The so-called Utility apps are an additional category of programs. The NoSleep app is installed by certain people. By blocking the MacBook from entering sleep mode, the NoSleep program enables users to read or watch movies.

However, as the name suggests, NoSleep is likely to keep the MacBook from going to sleep when it should (when the lid is closed). Or it can be a program like flux, which alters the brightness of the screen.

What then should you do if you identify the offender? Before putting the MacBook to sleep, exit the application.

Day 3

The time has come for more sophisticated methods if the MacBooks are still depleting the battery. You’ll make use of the Terminal app this time.

Warning! If you have FileVault enabled, you shouldn’t conduct the following steps because they could cause the system to crash when your MacBook goes to sleep and FileVault is activated.

Read my post, “Do I Really Need FileVault,” if you’re unsure of what Filevault is or how to determine if it’s activated.

Activate the following command on the Terminal:

pmset -g | grep hibernatemode

It ought to print three by default. It should be changed to 25 with the following command:
sudo pmset -b hibernatemode 25

Hit Enter after entering the password.

How does this function?

In macOS, pmset is a command-line tool. To obtain or modify power management settings, utilize the software. The -g argument stands for obtaining information, while the -b parameter stands for changing the battery parameters. The following values can be entered for the hibernatemode parameter:

  • RAM is not powered during sleeping (0).
  • 1- System completely turned off and RAM contents copied to disc
  • 3- RAM contents are powered and written to disc Using secure virtual memory in mode
  • 5- is the same as using it in mode 1.
  • 7- Similar to mode 3, but for use with secure virtual memory, is a mode
  • 25- System completely turned off, RAM contents copied to disc

RAM is now powered (hibernatemode = 3) by default. Although it isn’t designed to take much power, in certain circumstances it results in battery depletion when you’re sleeping.

Additional adjustments may facilitate entering hibernation state more rapidly. Standby, standbydelaylow, standbydelayhigh, and autopoweroffdelay are the options available. We wish to change the default behavior of the MacBook, which does not enter standby mode for three hours.

Enter those four values into the Terminal and run the pmset -g command.

Run the following commands one by one to alter them now:

sudo pmset -a standby 1
sudo pmset -a standbydelaylow 10
sudo pmset -a standbydelayhigh 10
sudo pmset -a autopoweroffdelay 60

Reboot and leave MacBook overnight.

Day 4

Was the problem solved? No?

Hmm, I had hoped the problem would have been corrected by now. If not, let’s first undo the modification we did the previous day.

Launch the Terminal program.
Use the following command to return hibernatemode to 3: sudo pmset -b hibernatemode 3.

Reset all other settings to their original positions.

Changes to the tcpkeepalive option are the final solution.

How does this function?

When there is no communication taking place between two computers, TCP keep-alive is intended to stop network connections from being terminated. It operates by initiating a timer that transmits a message on a regular basis while maintaining the network connection. Applications like iCloud won’t wake up a sleeping MacBook if this behavior is disabled.

Run the command listed below to alter the setting (but first, read the warning below):
tcpkeepalive 0 with sudo pmset -b

If the option was enabled, one of the cautions that the command will display is one regarding problems with Find My Mac. In essence, it states that if you disable the keep-alive option, Find My Mac won’t periodically update iCloud with the position of the MacBook.

iCloud with the position of the MacBook

Warnings when disabling tcpkeepalive

Therefore, if you close your MacBook, carry it to another location, and leave it there without remembering, you won’t be able to locate the laptop till it is opened.

Enabling Find My Mac on a stolen MacBook would be useless until the criminal connected it to his or her own home WiFi. It will only take place while the MacBook is up.

The caution is not a big concern, is what I’m trying to convey. For the reasons I just mentioned, I would ignore them.

Restart the Mac and leave it unattended.

Day 5

The topic of this post is how to solve the MacBook battery drain problem in four days or less.

By Day 5, if the issue has not been resolved, all conventional troubleshooting techniques have been used.
So, use the following command in the Terminal to set tcpkeepalive back to 1:
run sudo pmset -b one tcpkeepalive

Then, I’d advise searching the log for problems. It’s possible that you’ll discover a solution-related clue while reading the log file. If not, you can upload the log file to an Apple forum and seek help from more experienced users there.

Activate the following command in the Terminal:

PMSET -G Log to /Desktop/PMSET-Log.txt

PMSET-LOG.TXT will be generated on the Desktop by this command.

Conclusion

We went over a number of troubleshooting techniques, most of which will stop the MacBook’s battery from draining when it is sleeping. You could always leave the MacBook charging overnight if the problem was not resolved.

If your MacBook is reasonably fresh (from 2013 or later), keeping it plugged in won’t shorten its battery life. When the battery is fully charged, the MacBook will stop charging.