Jump to content
onemanosx

[Guide] Laptop Battery Indicator - The DSDT Patching Horror

Recommended Posts

[ref]hawkins1986[/ref], There are no parse ops errors when i opened your DSDT.


However, you may have forgotten to solve for MAXC device.


Use the latest version of macIASL, too. https://github.com/acidanthera/MaciASL/releases

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]hawkins1986[/ref], I am assuming you did not do the battery patch yourself. The DSDT you sent me clearly shows it is patched but not entirely. You should refer back to that kind soul who helped you with that or start from scratch by reading the guide.


From what I see, MAXC had been renamed and the integer was not adressed. Hence, the error from the screenshot I uploaded. You can compare the integer names by referring back to the original un-edited DSDT.aml, if you are up to troubleshoot.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]hawkins1986[/ref], Look thru the patch in RH Repo again for MAXC integer. It might be disabled for some reason. Or find out the renamed integer for MAXC and solve it.


EDIT:

Without checking for previous patch works, I only solved the MAXC error.

Try and see if works.

 

DSDT.aml.zip

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]hawkins1986[/ref], I suggest you go through the patch again. :) and also ensure you have the correct battery kext loaded.


Some precooked patches may be problematic and its always good to double check. Good Luck.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

HP Probook 450 G5



#16 Bit Integers

into device label EC0 code_regex CCUR,\s+16, replace_matched begin RUC0,8,RUC1,8, end;
into device label EC0 code_regex BDC,\s+16, replace_matched begin CDB0,8,CDB1,8, end;
into device label EC0 code_regex BFC,\s+16, replace_matched begin CFB0,8,CFB1,8, end;
into device label EC0 code_regex BRTE,\s+16, replace_matched begin ETR0,8,ETR1,8, end;
into device label EC0 code_regex BME,\s+16, replace_matched begin EMB0,8,EMB1,8, end;
into device label EC0 code_regex BDV,\s+16, replace_matched begin VDB0,8,VDB1,8, end;
into device label EC0 code_regex BCV1,\s+16, replace_matched begin VCB0,8,VCB1,8, end;
into device label EC0 code_regex BATE,\s+16, replace_matched begin ETA0,8,ETA1,8, end;
into device label EC0 code_regex BPR,\s+16, replace_matched begin RPB0,8,RPB1,8, end;
into device label EC0 code_regex BCR,\s+16, replace_matched begin RCB0,8,RCB1,8, end;
into device label EC0 code_regex BRC,\s+16, replace_matched begin CRB0,8,CRB1,8, end;
into device label EC0 code_regex BCC,\s+16, replace_matched begin CCB0,8,CCB1,8, end;
into device label EC0 code_regex BPV,\s+16, replace_matched begin VPB0,8,VPB1,8, end;
into device label EC0 code_regex BCV2,\s+16, replace_matched begin CV20,8,CV21,8, end;
into device label EC0 code_regex BCV3,\s+16, replace_matched begin CV30,8,CV31,8, end;
into device label EC0 code_regex BCV4,\s+16, replace_matched begin CV40,8,CV41,8, end;
into device label EC0 code_regex BATF,\s+16, replace_matched begin FTA0,8,FTA1,8, end;
into device label EC0 code_regex BCL,\s+16, replace_matched begin LCB0,8,LCB1,8, end;
into device label EC0 code_regex MAXC,\s+16, replace_matched begin CXA0,8,CXA1,8, end;
into device label EC0 code_regex BSN,\s+16, replace_matched begin NSB0,8,NSB1,8, end;
into device label EC0 code_regex BDAT,\s+16, replace_matched begin TAD0,8,TAD1,8, end;
into device label EC0 code_regex CBT,\s+16, replace_matched begin TBC0,8,TBC1,8, end;
into device label EC0 code_regex ACPR,\s+16, replace_matched begin RPC0,8,RPC1,8, end;

 

#Fix 16 Bit Integers (Manual Patch)

 

#Fix 16 bit registers
CCUR - B1B2(\_SB_.PCI0.LPCB.EC0.RUC0,\_SB_.PCI0.LPCB.EC0.RUC1)
BDC - B1B2(\_SB_.PCI0.LPCB.EC0.CDB0,\_SB_.PCI0.LPCB.EC0.CDB1)
BFC - B1B2(\_SB_.PCI0.LPCB.EC0.CFB0,\_SB_.PCI0.LPCB.EC0.CFB1)
BRTE - B1B2(\_SB_.PCI0.LPCB.EC0.ETR0,\_SB_.PCI0.LPCB.EC0.ETR1)
BME - B1B2(\_SB_.PCI0.LPCB.EC0.EMB0,\_SB_.PCI0.LPCB.EC0.EMB1)
BDV - B1B2(\_SB_.PCI0.LPCB.EC0.VDB0,\_SB_.PCI0.LPCB.EC0.VDB1)
BCV1 - B1B2(\_SB_.PCI0.LPCB.EC0.VCB0,\_SB_.PCI0.LPCB.EC0.VCB1)
BATE - B1B2(\_SB_.PCI0.LPCB.EC0.ETA0,\_SB_.PCI0.LPCB.EC0.ETA1)
BPR - B1B2(\_SB_.PCI0.LPCB.EC0.RPB0,\_SB_.PCI0.LPCB.EC0.RPB1)
BCR - B1B2(\_SB_.PCI0.LPCB.EC0.RCB0,\_SB_.PCI0.LPCB.EC0.RCB1)
BRC - B1B2(\_SB_.PCI0.LPCB.EC0.CRB0,\_SB_.PCI0.LPCB.EC0.CRB1)
BCC - B1B2(\_SB_.PCI0.LPCB.EC0.CCB0,\_SB_.PCI0.LPCB.EC0.CCB1)
BPV - B1B2(\_SB_.PCI0.LPCB.EC0.VPB0,\_SB_.PCI0.LPCB.EC0.VPB1)
BCV2 - B1B2(\_SB_.PCI0.LPCB.EC0.CV20,\_SB_.PCI0.LPCB.EC0.CV21)
BCV3 - B1B2(\_SB_.PCI0.LPCB.EC0.CV30,\_SB_.PCI0.LPCB.EC0.CV31)
BCV4 - B1B2(\_SB_.PCI0.LPCB.EC0.CV40,\_SB_.PCI0.LPCB.EC0.CV41)
BATF - B1B2(\_SB_.PCI0.LPCB.EC0.FTA0,\_SB_.PCI0.LPCB.EC0.FTA1)
BCL - B1B2(\_SB_.PCI0.LPCB.EC0.LCB0,\_SB_.PCI0.LPCB.EC0.LCB1)
MAXC - B1B2(\_SB_.PCI0.LPCB.EC0.CXA0,\_SB_.PCI0.LPCB.EC0.CXA1)
BSN - B1B2(\_SB_.PCI0.LPCB.EC0.NSB0,\_SB_.PCI0.LPCB.EC0.NSB1)
BDAT - B1B2(\_SB_.PCI0.LPCB.EC0.TAD0,\_SB_.PCI0.LPCB.EC0.TAD1)
CBT - B1B2(\_SB_.PCI0.LPCB.EC0.TBC0,\_SB_.PCI0.LPCB.EC0.TBC1)
ACPR - B1B2(\_SB_.PCI0.LPCB.EC0.RPC0,\_SB_.PCI0.LPCB.EC0.RPC1)

 

Finally, apply the necessary standard patches

 

#Standard Patching
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;

#Standard utility methods to read/write buffers from/to EC

into device label EC0 insert
begin
Method (RE1B, 1, NotSerialized)\n
{\n
OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
Return(BYTE)\n
}\n
Method (RECB, 2, Serialized)\n
{\n
ShiftRight(Arg1, 3, Arg1)\n
Name(TEMP, Buffer(Arg1) { })\n
Add(Arg0, Arg1, Arg1)\n
Store(0, Local0)\n
While (LLess(Arg0, Arg1))\n
{
	Store(RE1B(Arg0), Index(TEMP, Local0))\n
	Increment(Arg0)\n
	Increment(Local0)\n
}\n
Return(TEMP)\n
}\n
end;

into device label EC0 insert
begin
Method (WE1B, 2, NotSerialized)\n
{\n
   OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
   Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
   Store(Arg1, BYTE)\n
}\n
Method (WECB, 3, Serialized)\n
{\n
   ShiftRight(Arg1, 3, Arg1)\n
   Name(TEMP, Buffer(Arg1) { })\n
   Store(Arg2, TEMP)\n
   Add(Arg0, Arg1, Arg1)\n
   Store(0, Local0)\n
   While (LLess(Arg0, Arg1))\n
   {\n
       WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n
       Increment(Arg0)\n
       Increment(Local0)\n
   }\n
}\n
end;

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]mesutgooner[/ref], Your BatteryPatch.txt contents do not exist in your DSDT table.


To be clear, your table did not have SBFC, SBAC etc. No idea where you get these integers.

 

SBRC,16,
SBFC,16,
SBAC,16,
SBVO,16,
SBBM,16,
SBCC,16
SBDC,16,
SBDV,16,
SBSN,16

VIDA,16,
PIDA,16,
VIDB,16,
PIDB,16
SBCH,32
SBMN,128

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]mesutgooner[/ref], Your BatteryPatch.txt contents do not exist in your DSDT table.


To be clear, your table did not have SBFC, SBAC etc. No idea where you get these integers.

 

SBRC,16,
SBFC,16,
SBAC,16,
SBVO,16,
SBBM,16,
SBCC,16
SBDC,16,
SBDV,16,
SBSN,16

VIDA,16,
PIDA,16,
VIDB,16,
PIDB,16
SBCH,32
SBMN,128

 

I searched all ECOR in DSDT to get the intergers because when I searched embedded control, it showed up like this

OperationRegion (ECOR, EmbeddedControl, Zero, 0x0100)

Field (ECOR, ByteAcc, NoLock, Preserve)

Link to comment
Share on other sites

[ref]mesutgooner[/ref], I am not on my mac right now. But, I recall your DSDT only requires ONE 16 bit fix. Read the guide again and see if you can solve it.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Link to comment
Share on other sites

[ref]mesutgooner[/ref], I am not on my mac right now. But, I recall your DSDT only requires ONE 16 bit fix. Read the guide again and see if you can solve it.

HWAC,   16, 
HWAK,   16, 
HSPD,   16, 
HDEN,   32, 
HDEP,   32, 

 

I saw 16bits integer and 32 bits integers with my latest dsdt dump and u r right, only hwac needs to be fixed, thanks :D

origin.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.





×
  • Create New...