- Joined
- Jul 22, 2018
- Messages
- 8,263
- Motherboard
- Supermicro X11SPA-T
- CPU
- Intel Xeon W-3275 28 Core
- Graphics
- 2xAMD RX 580 8GB
- OS X/macOS
- 13.x
- Bootloader
- OpenCore (UEFI)
- Mac
- Mac mini
- MacBook Pro
- Mobile Phone
- Android
- iOS
How to Patch DSDT for a working Battery Meter
An EliteMacx86 Exclusive Guide - This guide covers the implementation of the Battery meter on macOS using Clover and OpenCore. This will also enable Trackpad Preferences under System Preferences>Trackpad.
Overview
For a laptop, a working battery meter is a must. Enabling the Battery meter will help you to monitor your Battery so that you do not overcharge your Laptop or you don’t get out of your Battery. In macOS, the battery meter doesn't work out of the box. This is because the laptop battery hardware is not compatible with the AppleSMbus hardware. You need to use ACPI to access the battery state when running macOS on the laptop.
Many patches are available in the RehabMan repository and can be used for making a battery meter work for almost any laptop.
Before you start the patching, get to know about your hardware.
To start the patching for the battery meter, follow the DSDT and SSDTs patching guide below.
www.elitemacx86.com
After applying the necessary patches, it's time to apply the patches for a working battery matter.
Dual Battery
On Apple computers, no Mac has multiple batteries and due to this macOS does not have proper support for Laptops with Dual Batteries and bugs can occur in macOS itself when presented with multiple power sources. For Dual Batteries Laptops, the idea is to implement the ACPI patches such that the two "real" battery objects are disabled and a new battery object is created that consolidates the two real battery objects, such that the systems sees only one power source. In short, you need to merge the two batteries as one in ACPI. Refer to the Dual Battery Guide for more information.
Cycle Count
RehabMan's ACPIBatteryManager had zprood's _BIF extension technique for providing cycle count. This technique is not supported by the new SMCBatteryManger. Refer to Cycle Count Guide for more information
Supplemental Battery Information
A majority of Laptops provide supplemental battery information such as the manufactured date and battery temperature in the EC fields. However, the traditional
Enabling Battery Status
STEP 1: Remove Outdated Kexts
The first step is to remove the depreciated kexts which can interfere with the Battery Status implementation. To remove such, follow the steps below.
Kext Removal
If you're using NullCPUPowerManagement, it is recommended to remove it. See notes below.
1. Mount your ESP
2. Remove VoodooBattery.kext
STEP 2: Enable Battery Status
Method #1: Kext Only
Using this method, ACPI patching is not required for a working battery meter.
STEP 1: Add Required Kexts
1. Download VirtualSMC.kext and ECEnabler.kext from the downloads section of this forum.
2. Mount ESP
For Clover:
If you're using Clover, copy the
Copy
For OpenCore:
If you're using OpenCore, copy the
Copy
You'll also need to add the kexts entry in the Kernel section of your config.plist
STEP 2: Restart your Laptop
After performing all the above steps, restart your system for the applied changes to take effect.
You should see a Battery Meter in the menu bar.
Method #2: Using ACPI Patch
Using this method, you need to patch the ACPI.
STEP 1: Applying the Patches
To apply the patch, follow the steps below.
1. Download MaciASL from the downloads section of this forum.
2. Open your DSDT using MaciASL
3. The battery patches start with "[bat]".
4. Depending on your laptop model, select the patch from the left pane in MaciASL.
5. Click on Apply
6. Click on Close
For example, a typical laptop from ASUS:
Laptop: ASUS VivoBook X510UA
Battery Patch: [bat] ASUS N55SL/VivoBook
Compiling
After patching the DSDT and SSDTs, you need to compile the files.
Simply click on compile and look for errors. If there's any error, fix it and again click on Compile.
If there's no error, the files will be compiled successfully.
Saving the ACPI file
After compiling, the next step is to save the file for installation.
1. Go to File
2. Select Save as
3. A dialogue box will appear asking the location and the file extension to save the file.
4. Select ACPI(ACPI Machine Language)
5. Click on Save
STEP 2: Add Required Kext
After patching the DSDT, the next step is to install the Battery kext to serve the purpose.
1. Download VirtualSMC from the downloads section of this forum.
2. Mount ESP
For Clover:
If you're using Clover, copy the
For OpenCore:
If you're using OpenCore, copy the SMCBatteryManager kext from the VirtualSMC>Kexts folder to
STEP 3: Restart your Laptop
After performing all the above steps, restart your system for the applied changes to take effect.
You should see a Battery Meter in the menu bar.
Credits :
RehabMan
An EliteMacx86 Exclusive Guide - This guide covers the implementation of the Battery meter on macOS using Clover and OpenCore. This will also enable Trackpad Preferences under System Preferences>Trackpad.
Overview
For a laptop, a working battery meter is a must. Enabling the Battery meter will help you to monitor your Battery so that you do not overcharge your Laptop or you don’t get out of your Battery. In macOS, the battery meter doesn't work out of the box. This is because the laptop battery hardware is not compatible with the AppleSMbus hardware. You need to use ACPI to access the battery state when running macOS on the laptop.
Many patches are available in the RehabMan repository and can be used for making a battery meter work for almost any laptop.
Before you start the patching, get to know about your hardware.
[FAQ] READ FIRST! Questions related to Laptop
Before posting your queries, several common questions have been already answered and some exists in the sticky threads in the Laptop support forum. Read this post before you start your journey with your laptop before posting your doubts and queries... If you ask a question which has been...
www.elitemacx86.com
To start the patching for the battery meter, follow the DSDT and SSDTs patching guide below.

GUIDE - How to Patch Laptop DSDT and SSDTs
How to Patch Laptop DSDT and SSDTs This guide covers patching Laptop DSDT and SSDTs for macOS/OS X. By following this guide, you'll be able to patch your OEM DSDT/SSDTs. I. Overview To enable macOS features and various hardware and maintain stability, DSDT and SSDTs patching are required...

After applying the necessary patches, it's time to apply the patches for a working battery matter.
Dual Battery
On Apple computers, no Mac has multiple batteries and due to this macOS does not have proper support for Laptops with Dual Batteries and bugs can occur in macOS itself when presented with multiple power sources. For Dual Batteries Laptops, the idea is to implement the ACPI patches such that the two "real" battery objects are disabled and a new battery object is created that consolidates the two real battery objects, such that the systems sees only one power source. In short, you need to merge the two batteries as one in ACPI. Refer to the Dual Battery Guide for more information.
Cycle Count
RehabMan's ACPIBatteryManager had zprood's _BIF extension technique for providing cycle count. This technique is not supported by the new SMCBatteryManger. Refer to Cycle Count Guide for more information
Supplemental Battery Information
A majority of Laptops provide supplemental battery information such as the manufactured date and battery temperature in the EC fields. However, the traditional
_BIF
, _BIX
and _BST
methods do not support supplemental battery information. Luckily, SMCBatteryManager supports two additional methods CBIS
and CBSS
respectively to provide the supplementation battery information on macOS. Refer to Supplemental Battery Information Guide for more information.Enabling Battery Status
STEP 1: Remove Outdated Kexts
The first step is to remove the depreciated kexts which can interfere with the Battery Status implementation. To remove such, follow the steps below.
Kext Removal
If you're using NullCPUPowerManagement, it is recommended to remove it. See notes below.
1. Mount your ESP
2. Remove VoodooBattery.kext
NOTES:
- If you're using OpenCore, you'll also need to remove the kext entries from your kernel section in your config.plist
- For Catalina and prior, make sure these kexts don't exist in Library/Extensions or System/Library/Extensions.
STEP 2: Enable Battery Status
Method #1: Kext Only
Using this method, ACPI patching is not required for a working battery meter.
STEP 1: Add Required Kexts
1. Download VirtualSMC.kext and ECEnabler.kext from the downloads section of this forum.
2. Mount ESP
For Clover:
If you're using Clover, copy the
SMCBatteryManager.kext
from the VirtualSMC>Kexts folder to EFI/Clover/kexts/Other
Copy
ECEnabler.kext
to EFI/Clover/kexts/Other
For OpenCore:
If you're using OpenCore, copy the
SMCBatteryManager.kext
from the VirtualSMC>Kexts folder and ECEnaber.kext
to EFI/OC/Kexts.
Copy
ECEnabler.kext
to EFI/OC/Kexts
You'll also need to add the kexts entry in the Kernel section of your config.plist
STEP 2: Restart your Laptop
After performing all the above steps, restart your system for the applied changes to take effect.
You should see a Battery Meter in the menu bar.
NOTE:
If you want to have any additional functionality beyond the battery meter such as cycle count, temperature, and other supplemental data, you'll need to patch the ACPI. The same applies if you have a Dual Battery Laptop.
Method #2: Using ACPI Patch
Using this method, you need to patch the ACPI.
STEP 1: Applying the Patches
To apply the patch, follow the steps below.
1. Download MaciASL from the downloads section of this forum.
2. Open your DSDT using MaciASL
3. The battery patches start with "[bat]".
4. Depending on your laptop model, select the patch from the left pane in MaciASL.
5. Click on Apply
6. Click on Close
NOTES:
|
For example, a typical laptop from ASUS:
Laptop: ASUS VivoBook X510UA
Battery Patch: [bat] ASUS N55SL/VivoBook
Compiling
After patching the DSDT and SSDTs, you need to compile the files.
Simply click on compile and look for errors. If there's any error, fix it and again click on Compile.
If there's no error, the files will be compiled successfully.
Saving the ACPI file
After compiling, the next step is to save the file for installation.
1. Go to File
2. Select Save as
3. A dialogue box will appear asking the location and the file extension to save the file.
4. Select ACPI(ACPI Machine Language)
5. Click on Save
STEP 2: Add Required Kext
After patching the DSDT, the next step is to install the Battery kext to serve the purpose.
1. Download VirtualSMC from the downloads section of this forum.
2. Mount ESP
For Clover:
If you're using Clover, copy the
SMCBatteryManager.kext
from the VirtualSMC>Kexts folder to EFI/Clover/kexts/Other
For OpenCore:
If you're using OpenCore, copy the SMCBatteryManager kext from the VirtualSMC>Kexts folder to
EFI/OC/Kexts
. You'll also need to add the kexts entry in the Kernel section of your config.plistNOTES:
|
STEP 3: Restart your Laptop
After performing all the above steps, restart your system for the applied changes to take effect.
You should see a Battery Meter in the menu bar.
Credits :
RehabMan
Last edited: