GUIDE How to Patch DSDT for a working Battery Meter

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
2,696
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
11.0.x
Bootloader
  1. OpenCore
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
How to Patch DSDT for a working Battery Meter

An EliteMacx86 Exclusive Guide - This guide covers implementation of Battery meter on macOS using Clover and OpenCore.

Overview


For a laptop, a working battery meter is must. Enabling Battery meter will help you to monitor your Battery so that you do not over charge your Laptop or you don’t get out of your Battery. In macOS, the battery meter doesn't works 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 laptop.

RehabMan has developed a kext called ACPIBatteryManager.kext which can be found here: https://github.com/RehabMan/OS-X-ACPI-Battery-Driver
Thanks to him for his great contribution as always for the Hackintosh community.

Many patches is available in the RehabMan repository and can be used for making a battery meter to 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.

After applying the necessary patches, it's time to apply the patches for a working battery matter.

Applying the Patches


To Apply the patch, follow the steps below.

1. Open your DSDT using MaciASL
2. The battery patches starts with "[bat]".
3. Depending on your laptop model, select the patch from the left pane in MaciASL.
4. Click on Apply
5. Click on Close

Note:
  • The laptop model no. needs to be exact for the proper functioning of the battery meter.
  • Some laptops model may not be listed. In this case, you'll need to select a patch which is nearest to your laptop model.
For example, 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 the installation.
Go to File
Select Save as
A dialogue box will appear asking the location and the file extension to save the file.
Select ACPI(ACPI Machine Language)
Click on Save

Adding required kext


After patching the DSDT, the next step is to install the Battery kext to serve the purpose.
Download VirtualSMC.

For Clover:
If you're using Clover, copy the kext from Kexts folder from the VirtualSMC folder to EFI/Clover/kexts/Other

For OpenCore:
If you're using OpenCore, copy the kext from Kexts folder from the VirtualSMC folder to EFI/OC/Kexts. You'll also need to add the kexts entries in Kernel section of your config.plist

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:

Shekhar Kausalye

New member
Joined
Oct 9, 2018
Messages
16
Motherboard
Acer Swift SF314-55G
CPU
Intel® Core™ i5-8265U CPU @ 1.60GHz
Graphics
Intel® UHD Graphics 620 and NVIDIA GeForce MX250
OS X/macOS
10.13.x
Bootloader
  1. Clover (UEFI)
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Hello
I am having small doubt. I have patched the DSDT & SSDTs. Now as I want to enable Battery Meter I am following this above guide. So which DSDT & SSDTs should I take for patching Battery Meter. Also do I need dsl files of DSDT & SSDTs for this patching (if yes then should I have to create these dsl files form the EFI/CLOVER/ACPI/patched folder and then apply the above patches; because DSDT & SSDTs stored here are latest patched). Or should I directly open the DSDT & SSDTs aml files using MaciASL from EFI/CLOVER/ACPI/patched and apply the above patches then save the file (whether this is allowed or not?).
Also I need to apply above patched in DSDT & All SSDTs????

Sorry for making so much confusion despite of above well explained guide.
Thanking you.
 
Last edited by a moderator:

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
2,696
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
11.0.x
Bootloader
  1. OpenCore
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hello
I am having small doubt. I have patched the DSDT & SSDTs. Now as I want to enable Battery Meter I am following this above guide. So which DSDT & SSDTs should I take for patching Battery Meter. Also do I need dsl files of DSDT & SSDTs for this patching (if yes then should I have to create these dsl files form the EFI/CLOVER/ACPI/patched folder and then apply the above patches; because DSDT & SSDTs stored here are latest patched). Or should I directly open the DSDT & SSDTs aml files using MaciASL from EFI/CLOVER/ACPI/patched and apply the above patches then save the file (whether this is allowed or not?).
Also I need to apply above patched in DSDT & All SSDTs????

Sorry for making so much confusion despite of above well explained guide.
Thanking you.
The guide says to apply the patches in the DSDT not any other SSDTs. If you're starting from scratch, and the DSDT is not patched, you can use the .dsl file and apply all the patches. If already patched, just apply the battery patch to the .aml file of your DSDT, the patched one.
 

Shekhar Kausalye

New member
Joined
Oct 9, 2018
Messages
16
Motherboard
Acer Swift SF314-55G
CPU
Intel® Core™ i5-8265U CPU @ 1.60GHz
Graphics
Intel® UHD Graphics 620 and NVIDIA GeForce MX250
OS X/macOS
10.13.x
Bootloader
  1. Clover (UEFI)
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Thanks. Now the thing is clear for me. (y)(y)(y).
Will do the patch and reply.


Hey its working. The Battery meter is shown in menu bar.
Thanks.(y)
 
Last edited:

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
2,696
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
11.0.x
Bootloader
  1. OpenCore
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS

Sro

New member
Joined
Sep 12, 2019
Messages
15
Motherboard
Digiboard
CPU
Intel core i3
Graphics
Intel HD 4000
OS X/macOS
10.14.x
Bootloader
  1. Clover (UEFI)
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
What can i do to find out wich notbook model is closest to mine? The one i have is not listened there: CCE N325 i3. Thanks for ur atention.
 

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
2,696
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
11.0.x
Bootloader
  1. OpenCore
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
What can i do to find out wich notbook model is closest to mine? The one i have is not listened there: CCE N325 i3. Thanks for ur atention.
What's your Laptop model no.?
 

Sro

New member
Joined
Sep 12, 2019
Messages
15
Motherboard
Digiboard
CPU
Intel core i3
Graphics
Intel HD 4000
OS X/macOS
10.14.x
Bootloader
  1. Clover (UEFI)
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
What's your Laptop model no.?
CCE model N325 - HM75 - 7 Series/216 (intel core i3 Ivy bridge) graphics Intel HD 4000.
or is it something else then this?
 

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
2,696
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
11.0.x
Bootloader
  1. OpenCore
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
CCE model N325 - HM75 - 7 Series/216 (intel core i3 Ivy bridge) graphics Intel HD 4000.
or is it something else then this?
Can you provide link to your Laptop model?
 

Similar threads

Trending Threads

Latest posts

Forum statistics

Threads
553
Messages
5,564
Members
4,944
Latest member
Melgio