Contribute
Register

[Guide] How to patch DSDT for working battery status

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.
 
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:
 
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?
 
Need Help, No patch Available
Laptop Avita Liber 14N
i3 8130u
 

Attachments

  • DSDT.aml
    157.1 KB · Views: 75
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: 70
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:
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: 63
  • Compile errors 1.png
    Compile errors 1.png
    370.1 KB · Views: 101
  • Compile errors 2.png
    Compile errors 2.png
    406.4 KB · Views: 84
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?
 
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.
 
@Feartech Hi, Need your help, HP8470p battery % & icon not working.
Thanks
 

Attachments

  • PR-Hp8470p.zip
    5.5 MB · Views: 120
Back
Top