Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
May 4, 2020
Messages
35
Motherboard
HP 8537
CPU
i5-8265U
Graphics
UHD 620
Hi, I need your help with battery patch

HP Probook 440 G6

Here's the situation:
I've patched the DSDT and got the battery indicator which shows right amount of charge (booted to linux and compared the remaining charge). Furthermore - sometimes it shows the remaining time of charge/discharge!
But then all of a sudden something clicks in it and it gives a warning of low battery level and stops showing the remaining time (thought it still shows the remaining charge)

I suppose the problem is in patch I've applied.
I took it from here https://www.tonymacx86.com/threads/...g-battery-status.116102/page-500#post-2021126 thanks to @anor4k I've got the battery working though a bit limited

What I've tried so far - installed debug version of VirtualSMC, enabled debug (-sbatdbg in boot_arg) and tired to view logs like this
Code:
log show --last boot --predicate 'sender="Lilu" and eventMessage contains "SMCBattery"'

But I do not see any errors and I'm stuck :(
Please help me with this
I can provide any info (EFI, logs etc.)
 
Last edited:
Joined
Mar 13, 2017
Messages
19
Motherboard
HP AU620TX
CPU
I5 7200U
Graphics
Nvidia 940MX
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Hello, after patching my HP Au620tx laptop with this DSDT patch (https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/battery/battery_HP-G6-2221ss.txt) and using ACPI Battery Manager kext the Percentage of battery is showing up in Catalina. The Percentage is valid, but after booting in Catalina, my battery settings break, and the Percentage gets stuck there; even in windows after plugging the AC Adapter, the battery percentage won't change. I have to press my laptop power button for 30 seconds when it is completely shut down. After logging in windows back again, the battery starts working, but when I log back into Catalina, the battery percentage gets stuck.
Help Please.

Update 1 :
Okay, So now I checked the registers in this patch (https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/battery/battery_HP-DV6-3165sf.txt), which match with my registers. I applied that patch, and now the Battery seems to be lowering when the AC power is disconnected, but again when I plug the AC adapter back in, it doesn't charge. It still displays Battery is not charging.
 
Joined
May 4, 2020
Messages
35
Motherboard
HP 8537
CPU
i5-8265U
Graphics
UHD 620
Hi, I need your help with battery patch

HP Probook 440 G6

Here's the situation:
I've patched the DSDT and got the battery indicator which shows right amount of charge (booted to linux and compared the remaining charge). Furthermore - sometimes it shows the remaining time of charge/discharge!
But then all of a sudden something clicks in it and it gives a warning of low battery level and stops showing the remaining time (thought it still shows the remaining charge)

I suppose the problem is in patch I've applied.
I took it from here https://www.tonymacx86.com/threads/...g-battery-status.116102/page-500#post-2021126 thanks to @anor4k I've got the battery working though a bit limited

What I've tried so far - installed debug version of VirtualSMC, enabled debug (-sbatdbg in boot_arg) and tired to view logs like this
Code:
log show --last boot --predicate 'sender="Lilu" and eventMessage contains "SMCBattery"'

But I do not see any errors and I'm stuck :(
Please help me with this
I can provide any info (EFI, logs etc.)
Ok I've fixed the problem and now I have fully working battery with remaining time and no annoying warnings!!
HP Probook 440 G6
here it is:
 
Joined
Aug 11, 2016
Messages
171
Motherboard
Asus Z170I PRO Gaming
CPU
i5 6600k
Graphics
GTX 1060
Currently trying to patch the battery on my Huawei Matebook X Pro 2020 (i5-10210U).

I followed the guide but end up with a lot of "51037, 6126, syntax error, unexpected PARSEOP_CLOSE_PAREN, expecting PARSEOP_EXP_INDEX_LEFT" errors.

This is one example of the code in question:
Code:
If ((Arg0 == 0x02))
            {
                Local0 = ECRD (RefOf (B1B2(SN00,SN01)))
                BMB1 [0x03] = NTOC (Local0)
                BMB1 [0x02] = NTOC ((Local0 >> 0x04))
                BMB1 [One] = NTOC ((Local0 >> 0x08))
                BMB1 [Zero] = NTOC ((Local0 >> 0x0C))
                Return (BMB1) /* \_SB_.PCI0.LPCB.HWEC.ECBM.BMB1 */
            }

I read up on this and found another post by rehabman stating that RefOf does not work with B1B2. So where am I supposed to go from here?
 
Joined
Jun 21, 2020
Messages
1
Motherboard
motherboard OR system make & model # > See Rules!
CPU
i3-8130U
Graphics
UHD 620
Need Help, No patch Available
Laptop Avita Liber 14N
i3 8130u
 

Attachments

  • DSDT.aml
    157.1 KB · Views: 13
Joined
Jul 28, 2020
Messages
1
Motherboard
Acer zoro_bh
CPU
Intel Core i5 5200U
Graphics
Intel HD Graphics 5500
Hi, RehabMan.

I have tried following your guide to fix the battery status of my Acer E5-573-54ZV but I didn't get success.


When i searched for 'embeddedcontrol' on my DSDT, as suggested, this is what i get:

Code:
OperationRegion (VERM, EmbeddedControl, Zero, 0xFF)
Field (VERM, ByteAcc, NoLock, Preserve)
{
    LNPS,   8
}

So i couldn't patch the DSDT and my battery status is not showing at all. I have already tried using your ACPIBatteryManager kext but it continues not showing battery status.

I will attach the files asked for problem reporting. Everything is working, I just can't get the battery status showing.

I hope you can help me. Thanks in advance!
 

Attachments

  • RehabMan.zip
    11.4 MB · Views: 15
Joined
Jun 24, 2020
Messages
3
Motherboard
ASRock H110M-HDV R3.0
CPU
Intel® Core™ i3-6100
Graphics
SAPPHIRE PULSE RADEON RX 560 2GB 16 CU (45W)
Mobile Phone
  1. Android
Hi, RehabMan.

I have tried following your guide to fix the battery status of my Acer E5-573-54ZV but I didn't get success.


When i searched for 'embeddedcontrol' on my DSDT, as suggested, this is what i get:

Code:
OperationRegion (VERM, EmbeddedControl, Zero, 0xFF)
Field (VERM, ByteAcc, NoLock, Preserve)
{
    LNPS,   8
}

So i couldn't patch the DSDT and my battery status is not showing at all. I have already tried using your ACPIBatteryManager kext but it continues not showing battery status.

I will attach the files asked for problem reporting. Everything is working, I just can't get the battery status showing.

I hope you can help me. Thanks in advance!

Your EC region is similar to me. Considering it is already 8 bit, it will work out of the box without patching.
I'm using VirtualSMC with SMCBatteryManager.kext and it works out of the box.
 
Last edited:
Joined
Dec 29, 2016
Messages
1
Motherboard
Asus Maximus VII Hero
CPU
Intel I7 4790
Graphics
EVGA GTX 1070FTW
Mobile Phone
  1. Android
  2. iOS
Hi Everyone, i have tried patching too and cant get the battery status.

The PC is an HP Pavilion Power 15-cb028nl.

Searching for embeddedcontrol return so many thing, but those with more than 8 are these:

SMD0, 256,
BADC, 16,
BFCC, 16,
MCUR, 16,
MBRM, 16,
MBCV, 16,

i have tried to patch with battery_HP-Pavilion-n012tx.txt from the repo and get errors when compiling, then i tried to patch manualy but without result.

I attach my DSDT and the schreenshot of the errors(if can help), hope anyone can help me.
Thanks in advance.
 

Attachments

  • DSDT.aml
    131.1 KB · Views: 7
  • Compile errors 1.png
    Compile errors 1.png
    370.1 KB · Views: 14
  • Compile errors 2.png
    Compile errors 2.png
    406.4 KB · Views: 17
Joined
Dec 8, 2019
Messages
3
Motherboard
Eluktronics MAG-15
CPU
Intel i7-9750H CPU @ 2.60GHz
Graphics
UHD 630 | RTX 2070
MAG-15 Eluktronics

Hi,

I've read through but am still not sure what I am doing wrong everytime I go compile it gives me an error can anyone help?
 
Joined
Aug 7, 2012
Messages
11
Motherboard
Acer Aspire E 15 E5-575G-57D4
CPU
i5-7200U
Graphics
HD 620/ 940MX
Mobile Phone
  1. Android
Your EC region is similar to me. Considering it is already 8 bit, it will work out of the box without patching.
I'm using VirtualSMC with SMCBatteryManager.kext and it works out of the box.
Are you running on Clover or Opencore? I have the exact same on opencore . But I don't see Battery Status.
 
Top