Contribute
Register

[Guide] How to patch DSDT for working battery status


I thought you mentioned in other thread that there is no difference between /L/E or S/L/E. I will place them in L/E.
I would very much appreciate that you point out which part of ACPI that I did not follow the instructions in the above mentioned link.
Thanks.
 
I would very much appreciate that you point out which part of ACPI that I did not follow the instructions in the above mentioned link.

You seem to be doing a strange mix of hotpatch and static patch (SSDT-BATT.aml/etc).
Novices should use static patch with hotpatch only for renames.
Hotpatch is for experts... suggest doing static patch prior to attempting hotpatch.
 
I'm helping an online friend with patching DSDT for battery status only.
he has Lenovo Thinkpad t540p, core i5 4300m, ihd4600
I've tried many patches from repo but nothing seems to work

patches I've tried:-
Lenovo t430u
Lenovo t440p
Lenovo W550s, etc

then I tried to create a patch
firstly I applied
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;
then applied patch for 16-bit fields
Code:
into device label EC code_regex HWAC,\s+16, replace_matched begin HC00,8,HC01,8, end;
into device label EC code_regex HWAK,\s+16, replace_matched begin HK00,8,HK01,8, end;
into device label EC code_regex HSPD,\s+16, replace_matched begin HD00,8,HD01,8, end;
into method label \_WAK code_regex \_SB.PCI0.LPC.EC.HWAC, replaceall_matched begin B1B2(\\_SB.PCI0.LPC.EC.HC00,\\_SB.PCI0.LPC.EC.HC01), end;
into method label _L1D code_regex \_SB.PCI0.LPC.EC.HWAC, replaceall_matched begin B1B2(\\_SB.PCI0.LPC.EC.HC00,\\_SB.PCI0.LPC.EC.HC01), end;

after this applied
into method label B1B4 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B4, 4, NotSerialized)\n
{\n
Store(Arg3, Local0)\n
Or(Arg2, ShiftLeft(Local0, 8), Local0)\n
Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
Return(Local0)\n
}\n
end;
and then applied patch for 32-bit fields
Code:
into device label EC code_regex HDEN,\s+32 replace_matched begin DEN0,8,DEN1,8,DEN2,8,DEN3,8 end;
into device label EC code_regex HDEP,\s+32 replace_matched begin DEP0,8,DEP1,8,DEP2,8,DEP3,8 end;

please tell me where have I mistaken
 

Attachments

  • CLOVER.zip
    2.2 MB · Views: 67
  • patched-DSDT.aml
    64 KB · Views: 111
I'm helping an online friend with patching DSDT for battery status only.
he has Lenovo Thinkpad t540p, core i5 4300m, ihd4600
I've tried many patches from repo but nothing seems to work

patches I've tried:-
Lenovo t430u
Lenovo t440p
Lenovo W550s, etc

then I tried to create a patch
firstly I applied
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;
then applied patch for 16-bit fields
Code:
into device label EC code_regex HWAC,\s+16, replace_matched begin HC00,8,HC01,8, end;
into device label EC code_regex HWAK,\s+16, replace_matched begin HK00,8,HK01,8, end;
into device label EC code_regex HSPD,\s+16, replace_matched begin HD00,8,HD01,8, end;
into method label \_WAK code_regex \_SB.PCI0.LPC.EC.HWAC, replaceall_matched begin B1B2(\\_SB.PCI0.LPC.EC.HC00,\\_SB.PCI0.LPC.EC.HC01), end;
into method label _L1D code_regex \_SB.PCI0.LPC.EC.HWAC, replaceall_matched begin B1B2(\\_SB.PCI0.LPC.EC.HC00,\\_SB.PCI0.LPC.EC.HC01), end;

after this applied
into method label B1B4 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B4, 4, NotSerialized)\n
{\n
Store(Arg3, Local0)\n
Or(Arg2, ShiftLeft(Local0, 8), Local0)\n
Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
Return(Local0)\n
}\n
end;
and then applied patch for 32-bit fields
Code:
into device label EC code_regex HDEN,\s+32 replace_matched begin DEN0,8,DEN1,8,DEN2,8,DEN3,8 end;
into device label EC code_regex HDEP,\s+32 replace_matched begin DEP0,8,DEP1,8,DEP2,8,DEP3,8 end;

please tell me where have I mistaken

The patch for "Lenovo T440p" appears to be a match. You should try it.
Attach problem reporting files as per FAQ if not working.
 
If I had new asus, What differ this perform than n55sl battery patch?
 
Hello RehabMan.
I'm working on a Dell Latitude 7280 (i5-6300 Skylake but with a similar Kabylake BIOS). 10.13.3 latest.
I've followed this guide or at least I think I did.
Found an ECOR OperationRegion with embeddedcontrol, just one, applied "Fix Mutex with non-zero SyncLevel", and operating system patches.
Having BAT1 in DSDT but not in registry put just a Return (0) to it.
Put ACPIBatteryManager in LE.

But no way.

Status it is OK, percentage and status connected or not are working, but if I boot with plug connected never dim the screen and never goes to sleep after unplugging the power supply.
Or if I start with no plug never undim a goes back to bright while status will increase % and finally solid battery icon.

I've enclose a log show output in grep with batter after installing, again in LE, debug version of your manager: for what I do understand I don't see any error, failing or whatever.

Can you check my work please? What I'm missing. Something wrong in config.plist?

Thank you.
 

Attachments

  • debug_24140.zip
    1.2 MB · Views: 62
Hello RehabMan.
I'm working on a Dell Latitude 7280 (i5-6300 Skylake but with a similar Kabylake BIOS). 10.13.3 latest.
I've followed this guide or at least I think I did.
Found an ECOR OperationRegion with embeddedcontrol, just one, applied "Fix Mutex with non-zero SyncLevel", and operating system patches.
Having BAT1 in DSDT but not in registry put just a Return (0) to it.
Put ACPIBatteryManager in LE.

But no way.

Status it is OK, percentage and status connected or not are working, but if I boot with plug connected never dim the screen and never goes to sleep after unplugging the power supply.
Or if I start with no plug never undim a goes back to bright while status will increase % and finally solid battery icon.

I've enclose a log show output in grep with batter after installing, again in LE, debug version of your manager: for what I do understand I don't see any error, failing or whatever.

Can you check my work please? What I'm missing. Something wrong in config.plist?

Thank you.

Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

Also APFS+NVMe is a bad idea (due to TRIM being enabled for NVMe). You should install on HFS+J instead. Read here:
https://www.tonymacx86.com/threads/...n-high-sierra-update-or-fresh-install.232855/

If you really want APFS, you should read here regarding abm_firstpolldelay:
https://www.tonymacx86.com/threads/readme-common-problems-in-10-13-high-sierra.233582/
 
Thanks.
I did suppose you were telling me this.
But if I do install FakeSMC in LE no boot, and keeping a copy of it in CKO (and one in LE), no keyboard (with your PS2) and no more I2C TP. Can be APFS+?

Will move the rest of them.

Will try to do a fresh installation on HFS+J.

Can you confirm battery patching is OK?

Thanks
 
Back
Top