Jump to content
onemanosx

[Guide] Laptop Battery Indicator - The DSDT Patching Horror

Recommended Posts

[ref]erinviegas[/ref], Looks like the patch you are using is not relevant to your DSDT. Also, it seems that your DSDT in clover/acpi/others might just work as is. Make sure VirtualSMC, Lilu and SMCBatteryManager kexts are current. And that the kexts are installed together in a single location. I suggest keeping all third party kexts in clover/kexts/others instead.

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]yamvmax[/ref], You can post your specific issues faced while implementing your patch or wait patiently.


Not many of us sit in front of the computer 24hrs :P

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]yamvmax[/ref], You can post your specific issues faced while implementing your patch or wait patiently.


Not many of us sit in front of the computer 24hrs :P

My battery display not working, along with keyboard backlight. My main issue is the battery. I will wait. Sorry, didnt know if anyone was looking into it.

ASUS VivoBook Flip 14 TP412UA-IH31T

Link to comment
Share on other sites

[ref]yamvmax[/ref], Before I go any further, lets test your own patched DSDT. Please download smcbatterymanager.kext and replace acpibatterymanager.kext.


When using virtualsmc.kext, it is paired with smcbatterymanager.kext and not acpibatterymanager.kext


https://github.com/acidanthera/VirtualSMC/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]yamvmax[/ref], Before I go any further, lets test your own patched DSDT. Please download smcbatterymanager.kext and replace acpibatterymanager.kext.


When using virtualsmc.kext, it is paired with smcbatterymanager.kext and not acpibatterymanager.kext


https://github.com/acidanthera/VirtualSMC/releases

 

Im dealing with a new problem...I had to reinstall everything due to a bad kext, now my patched dsdt makes my comp not boot. Is this normal? Do i need to repatch my dsdt? I thought my patched dsdt would have been fine.

ASUS VivoBook Flip 14 TP412UA-IH31T

Link to comment
Share on other sites

 

 

Im dealing with a new problem...I had to reinstall everything due to a bad kext, now my patched dsdt makes my comp not boot. Is this normal? Do i need to repatch my dsdt? I thought my patched dsdt would have been fine.

DSDT should be fine with last working config

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]yamvmax[/ref], Before I go any further, lets test your own patched DSDT. Please download smcbatterymanager.kext and replace acpibatterymanager.kext.


When using virtualsmc.kext, it is paired with smcbatterymanager.kext and not acpibatterymanager.kext


https://github.com/acidanthera/VirtualSMC/releases

 

I am back up running, I tried what you said....Nothing, still no battery. Are any edits to be done to my dsdt???


Added in 22 minutes 30 seconds:

I think my biggest issue is patching my dsdt...I get errors. I try using MacIASL, but i get syntex errors


Added in 2 minutes 29 seconds:

Also, I still have ACIPoller.kext...Leave that?

ASUS VivoBook Flip 14 TP412UA-IH31T

Link to comment
Share on other sites

[ref]yamvmax[/ref], No idea what ACIPoller kext does.


Disable all patches shown here


https://imgur.com/iBT8eVO


There are also other patches you dont need. But that is not the scope in this topic here.


Try this: DSDT.aml.zip.


Use Virtualsmc +SMCBatteryManager Kexts

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]yamvmax[/ref], No idea what ACIPoller kext does.


Disable all patches shown here


https://imgur.com/iBT8eVO


There are also other patches you dont need. But that is not the scope in this topic here.


Try this: DSDT.aml.zip.


Use Virtualsmc +SMCBatteryManager Kexts

It wont boot. It starts, then i get the zero with slash through it


Added in 8 minutes 5 seconds:

Did you use my patched dsdt??? Because the one you uploaded is my original. My patched is patched for touchscreen and track pad working, which do with the patched.

DSDT.zip

ASUS VivoBook Flip 14 TP412UA-IH31T

Link to comment
Share on other sites

[ref]yamvmax[/ref], I'll post the patch and you do it. That will be better.

 

#16 bits registers
into device label H_EC code_regex B1DC,\s+16, replace_matched begin ONE0,8,MAN1,8, end;
into device label H_EC code_regex B1FV,\s+16, replace_matched begin VF10,8,VF11,8, end;
into device label H_EC code_regex B1FC,\s+16, replace_matched begin CF10,8,CF11,8, end;
into device label H_EC code_regex B1CR,\s+16, replace_matched begin RC10,8,RC11,8, end;
into device label H_EC code_regex B1RC,\s+16, replace_matched begin CR10,8,CR11,8, end;
into device label H_EC code_regex B1LC,\s+16, replace_matched begin CL10,8,CL11,8, end;

 

Manual Patch

B1DC - B1B2(\_SB_.PCI0.LPCB.H_EC.ONE0,\_SB_.PCI0.LPCB.H_EC.MAN1)
B1FV - B1B2(\_SB_.PCI0.LPCB.H_EC.VF10,\_SB_.PCI0.LPCB.H_EC.VF11)
B1FC - B1B2(\_SB_.PCI0.LPCB.H_EC.CF10,\_SB_.PCI0.LPCB.H_EC.CF11)
B1CR - B1B2(\_SB_.PCI0.LPCB.H_EC.RC10,\_SB_.PCI0.LPCB.H_EC.RC11)
B1RC - B1B2(\_SB_.PCI0.LPCB.H_EC.CR10,\_SB_.PCI0.LPCB.H_EC.CR11)
B1LC - B1B2(\_SB_.PCI0.LPCB.H_EC.CL10,\_SB_.PCI0.LPCB.H_EC.CL11)

 

Standard H_EC patch

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 H_EC 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 H_EC 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;

 

Read the guide on 1st post on how-to

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]yamvmax[/ref], I'll post the patch and you do it. That will be better.

 

#16 bits registers
into device label H_EC code_regex B1DC,\s+16, replace_matched begin ONE0,8,MAN1,8, end;
into device label H_EC code_regex B1FV,\s+16, replace_matched begin VF10,8,VF11,8, end;
into device label H_EC code_regex B1FC,\s+16, replace_matched begin CF10,8,CF11,8, end;
into device label H_EC code_regex B1CR,\s+16, replace_matched begin RC10,8,RC11,8, end;
into device label H_EC code_regex B1RC,\s+16, replace_matched begin CR10,8,CR11,8, end;
into device label H_EC code_regex B1LC,\s+16, replace_matched begin CL10,8,CL11,8, end;

 

Manual Patch

B1DC - B1B2(\_SB_.PCI0.LPCB.H_EC.ONE0,\_SB_.PCI0.LPCB.H_EC.MAN1)
B1FV - B1B2(\_SB_.PCI0.LPCB.H_EC.VF10,\_SB_.PCI0.LPCB.H_EC.VF11)
B1FC - B1B2(\_SB_.PCI0.LPCB.H_EC.CF10,\_SB_.PCI0.LPCB.H_EC.CF11)
B1CR - B1B2(\_SB_.PCI0.LPCB.H_EC.RC10,\_SB_.PCI0.LPCB.H_EC.RC11)
B1RC - B1B2(\_SB_.PCI0.LPCB.H_EC.CR10,\_SB_.PCI0.LPCB.H_EC.CR11)
B1LC - B1B2(\_SB_.PCI0.LPCB.H_EC.CL10,\_SB_.PCI0.LPCB.H_EC.CL11)

 

Standard H_EC patch

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 H_EC 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 H_EC 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;

 

Read the guide on 1st post on how-to

 

I have been trying manual patches for weeks. I just cant figure it out. Im so lost.

ASUS VivoBook Flip 14 TP412UA-IH31T

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...