Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
Apr 14, 2019
Messages
72
Motherboard
Dell Inspiron 7586
CPU
i7-8565U
Graphics
UHD 620
Mobile Phone
  1. Android
How to patch DSDT for working battery status



The only problem I found was in this line in _BTP:
Code:
                                Store (Local0, ^^PCI0.LPCB.H_EC.BTPC)

Needs this patch:
Code:
into method label _BTP code_regex Store\s\((.*),\s\^\^PCI0\.LPCB\.H_EC\.BTPC\) replace_matched
begin
Store(ShiftRight(%1,8), ^^PCI0.LPCB.H_EC.BPC1) Store(%1, ^^PCI0.LPCB.H_EC.BPC1)
end;

The other patch related to _BTP is not effective and so I removed it.
Thanks for the fix, I ran into this problem as well.
Why is BPC1 used twice? What happens to BPC0?
 
Joined
Jul 16, 2010
Messages
445
Motherboard
Asus Pro WS x299 Sage II
CPU
i9-10980XE
Graphics
RX 5500 XT
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
Offset is used to change the offset of the next field.
By definition, any field that directly follows Offset(X) is at offset X.
Read the ACPI specification.



Wrong. BCT0 is at offset 0x2f (0x20 + (120/8)).

Now I am completely lost again why is the final offset 0x2f? The previous offset is 0x21 and not 0x20 in my example above. 0x21 to decimal is 33 plus 120/8 which is 15. 15 plus 33 is 48 and 48 decimal converted back to hexadecimal is 0x30.

Rehabman is not around anymore to answer maybe Feartech or someone with complete knowledge of offsets can let me know why this is 0x2f rather than 0x30. Thanks!

Edited:

The other question becomes are the calculations of offsets based on the ones already coded in the DSDT, even if there are fields 3-4 deep for example? I know they are for the next field but the following field is that value based off the original offset in the DSDT or the offset you calculate for the 2nd and 3rd etc fields before you come across the next offset already set in the DSDT. This was not explained well at all.



Edited:

Never-mind it is from the first Offset set by the DSDT then you use that converted to decimal and add this each time.

Edited Again:

Actually what he replied to me with is incorrect because if I go by exactly what he wrote for my DSDT example then in his DSDT example from the original post his BCT0 would be calculated at offset 0x2B and not 0x30.
 
Last edited:
Joined
Feb 25, 2018
Messages
3
Motherboard
Intel H61
CPU
i5-8250U
Graphics
HD 620
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
Hi ya,

I was wondering if you could help me finalise my battery indicator, I have a working charging indicator and chime, but the battery fails to charge more than 6%, I have added the patch for the Probook 430 G6 as suggested, but I'm still getting only 6% on the battery charge. I have used SMCBattery and ACPI battery kexts, all this seems to do is tell me I need a new battery :( I have a Probook 440G6 and using Opencore 0.6.8, I have attached my EFI, if you could take a look for me, that would be awesome :) Thanks in advance!

nayga73

PS. Using Big Sur 11.2.3
 

Attachments

  • EFI.zip
    22.2 MB · Views: 5
Last edited:
Joined
Apr 9, 2021
Messages
3
Motherboard
MSI Z490 GAMING PLUS
CPU
I9-10900
Graphics
UHD 630
Ok for the past few days I have been trying everything I can to get as much working on my HP EliteBook x360 1030 G3 with an i7-8650U and Clover. However I never figured out the battery Indicator and the Webcam. So I went after Open Core and OMG is totally different beast.

I did find someone's config from another HP with a similar CPU and I started messing with that config, it was for Big Sur but I added the EFI to my Catalina USB and started to mess with it. After a lot of messing around with the config.plist and using his ACPI files and adding some more ACPI files and kexts I managed to get.

Catalina with latest update working with

Sound with boot arguments in config.plist and AppleALC.kext
Intel HD Graphics 620 with some stuff added to config.plist
Internal Wifi with itlwm.kext
Bluetooth with IntelBluetoothFirmware.kext and IntelBluetoothInjector.kext
TouchPad worked great with that EFI and the kexts files that were in it
Touch Screen worked out of the box with the settings and kext files in the EFI folder
Brightness and Volume hot keys working
Battery Indicator working

Not working
Webcam - with USBInjectAll.kext I can see it and the system sees it but anything that wants to use it can't use it. It just shows a black screen

Really the only thing I would like to fix is the webcam now but I can't figured it out, Not sure which kexts or settings take care of it. I'm using OpenCore now
Can you share your EFI? I can't solve the battery display problem.
 
Last edited:
Joined
Dec 15, 2016
Messages
41
Motherboard
ASUS-B360M-Gaming S
CPU
I7-8700ES
Graphics
RX560
Mobile Phone
  1. iOS
Thanks for RehabMan,
Regards from China.
QQ20210419-0.png
 

Attachments

  • 2020418-Lenovo-B450-bat.zip
    27.6 KB · Views: 6
Joined
Mar 8, 2021
Messages
17
Motherboard
HP 14-dq1077wm 86C8
CPU
Intel Core i3-1005G1
Graphics
Intel UHD Graphics rev7
Mobile Phone
  1. Android
hello, can someone help me please, i just started hackintosh on my hp 14dq1077wm Intel core i3-1005G1.
I am unable to get battery status on macOS Catalina.
I attached my DSDT, can someone please build the patch for me.
I am a newbie in hackintosh and trying to understand patching but is too afraid to deal with it by myself in fear to break my windows (yes i have dualboot Catalina alongside win10).
If i can get the battery status working with the touchpad i am converting my HP to a full hackintosh. bye bye win10.
Hope to be able to get by this battery patch first.
Thanks in advance to all the good samaritans of the hackintosh community.
 

Attachments

  • DSDT.aml
    270.3 KB · Views: 4
Joined
Dec 15, 2016
Messages
41
Motherboard
ASUS-B360M-Gaming S
CPU
I7-8700ES
Graphics
RX560
Mobile Phone
  1. iOS
hello, can someone help me please, i just started hackintosh on my hp 14dq1077wm Intel core i3-1005G1.
I am unable to get battery status on macOS Catalina.
I attached my DSDT, can someone please build the patch for me.
I am a newbie in hackintosh and trying to understand patching but is too afraid to deal with it by myself in fear to break my windows (yes i have dualboot Catalina alongside win10).
If i can get the battery status working with the touchpad i am converting my HP to a full hackintosh. bye bye win10.
Hope to be able to get by this battery patch first.
Thanks in advance to all the good samaritans of the hackintosh community.
#Maintained by: RehabMan for: Laptop Patches
#battery_HP-DV6-3165sf.txt

# created by RehabMan 2014-01-09
# based on battery_HP-G6-2221ss.txt
# additional patches for dv6-3165sf provided by chihab222, credit gsly

# works for:
# HP Pavilion dv6-3165sf
# HP Pavilion dv6661ev, courtesy angelol
# HP N050
# HP dv5-1030el, courtesy information from matti157
# HP G62-400 CTO, courtesy information from mnfesq
# HP G62-120eg, courtesy information from affe1980
# Compaq CQ61-230SL, courtesy mingo1976
# HP Pavilion DV6-3250, per mavvert
# HP DV7-3020ea, per Dsynos80
# Compaq CQ42-263tu, courtesy subluq
# HP DV5-1153ei, per Redhishan
# HP Pavilion G4 1214tx, per miraj27

into definitionblock code_regex External\s+\(\\TNOT\) remove_matched;

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

# rename device LPC to LPCB
into device label LPC set_label begin LPCB end;
into_all method code_regex PCI0\.LPC\. replaceall_matched begin PCI0.LPCB. end;
into_all method code_regex \^LPC\. replaceall_matched begin ^LPCB. end;

# SMD0, 256,
# BFCC, 16,
# MCUR, 16,
# MBRM, 16,
# MBCV, 16,
# SMW0, 16
# FLD1, 128
# FLD2, 192
# FLD3, 256

# deal with 256-bit SMD0
into device label EC0 code_regex SMD0,\s+256 replace_matched
begin
//SMD0, 256,\n
SD00,8,SD01,8,SD02,8,SD03,8,\n
SD04,8,SD05,8,SD06,8,SD07,8,\n
SD08,8,SD09,8,SD0A,8,SD0B,8,\n
SD0C,8,SD0D,8,SD0E,8,SD0F,8,\n
SD10,8,SD11,8,SD12,8,SD13,8,\n
SD14,8,SD15,8,SD16,8,SD17,8,\n
SD18,8,SD19,8,SD1A,8,SD1B,8,\n
SD1C,8,SD1D,8,SD1E,8,SD1F,8
end;

# 16-bit EC registers
into device label EC0 code_regex MFCA,\s+16 replace_matched begin FCA0,8,FCA1,8 end;
into device label EC0 code_regex BFCC,\s+16 replace_matched begin FCC0,8,FCC1,8 end;
into device label EC0 code_regex MCUR,\s+16 replace_matched begin CUR0,8,CUR1,8 end;
into device label EC0 code_regex MBRM,\s+16 replace_matched begin BRM0,8,BRM1,8 end;
into device label EC0 code_regex MBCV,\s+16 replace_matched begin BCV0,8,BCV1,8 end;
into device label EC0 code_regex SMW0,\s+16 replace_matched begin SMWX,8,SMWY,8 end;

# added for dv6661ev
into device label EC0 code_regex BADC,\s+16 replace_matched begin ADC0,8,ADC1,8 end;
into device label EC0 code_regex BADV,\s+16 replace_matched begin ADV0,8,ADV1,8 end;

# deal with 64-bit FLD0
into device label EC0 code_regex FLD0,\s+64 replace_matched
begin
//FLD0, 64,\n
F000,8,F001,8,F002,8,F003,8,\n
F004,8,F005,8,F006,8,F007,8,\n
end;

# deal with 128-bit FLD1
into device label EC0 code_regex FLD1,\s+128 replace_matched
begin
//FLD1, 128,\n
F100,8,F101,8,F102,8,F103,8,\n
F104,8,F105,8,F106,8,F107,8,\n
F108,8,F109,8,F10A,8,F10B,8,\n
F10C,8,F10D,8,F10E,8,F10F,8,\n
end;

# deal with 192-bit FLD2
into device label EC0 code_regex FLD2,\s+192 replace_matched
begin
//FLD2, 192,\n
F200,8,F201,8,F202,8,F203,8,\n
F204,8,F205,8,F206,8,F207,8,\n
F208,8,F209,8,F20A,8,F20B,8,\n
F20C,8,F20D,8,F20E,8,F20F,8,\n
F210,8,F211,8,F212,8,F213,8,\n
F214,8,F215,8,F216,8,F217,8,\n
end;

# deal with 256-bit FLD3
into device label EC0 code_regex FLD3,\s+256 replace_matched
begin
//FLD3, 256,\n
F300,8,F301,8,F302,8,F303,8,\n
F304,8,F305,8,F306,8,F307,8,\n
F308,8,F309,8,F30A,8,F30B,8,\n
F30C,8,F30D,8,F30E,8,F30F,8,\n
F310,8,F311,8,F312,8,F313,8,\n
F314,8,F315,8,F316,8,F317,8,\n
F318,8,F319,8,F31A,8,F31B,8,\n
F31C,8,F31D,8,F31E,8,F31F,8
end;

# 16-bit method access
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.MFCA, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.FCA0,^^PCI0.LPCB.EC0.FCA1), end;
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.BFCC, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.FCC0,^^PCI0.LPCB.EC0.FCC1), end;
into method label CLRI code_regex \(\^\^LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(^^LPCB.EC0.BRM0,^^LPCB.EC0.BRM1), end;
into method label CLRI code_regex \(\^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;
into method label GBIF code_regex \(\^\^PCI0\.LPCB\.EC0\.BFCC, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.FCC0,^^PCI0.LPCB.EC0.FCC1), end;
into method label GBCO code_regex \(\^\^PCI0\.LPCB\.EC0\.MCUR, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.CUR0,^^PCI0.LPCB.EC0.CUR1), end;

# added for dv6661ev
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.BADC, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.ADC0,^^PCI0.LPCB.EC0.ADC1), end;
into method label UPBI code_regex \(\^\^PCI0\.LPCB\.EC0\.BADV, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.ADV0,^^PCI0.LPCB.EC0.ADV1), end;


# rewrite buggy UPBS method, provided by chihab222, credit gsly
into method label UPBS remove_entry;
into device label BAT0 insert
begin
Method (UPBS, 0, NotSerialized)\n
{\n
Store (^^PCI0.LPCB.EC0.MBST, Index (PBST, Zero))\n
^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x0A, RefOf (Local0))\n
Store (Local0, Index (PBST, One))\n
^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x0F, RefOf (Local1))\n
Store (Local1, Index (PBST, 0x02))\n
^^PCI0.LPCB.EC0.SMRD (0x09, 0x16, 0x09, RefOf (Local2))\n
Store (Local2, Index (PBST, 0x03))\n
}\n
end;

# deal with SMD0

into device label EC0 insert
begin
Method (RSMD, 0, Serialized)\n
{\n
Name (TEMP, Buffer(0x20) { })\n
Store (SD00, Index(TEMP, 0x00))\n
Store (SD01, Index(TEMP, 0x01))\n
Store (SD02, Index(TEMP, 0x02))\n
Store (SD03, Index(TEMP, 0x03))\n
Store (SD04, Index(TEMP, 0x04))\n
Store (SD05, Index(TEMP, 0x05))\n
Store (SD06, Index(TEMP, 0x06))\n
Store (SD07, Index(TEMP, 0x07))\n
Store (SD08, Index(TEMP, 0x08))\n
Store (SD09, Index(TEMP, 0x09))\n
Store (SD0A, Index(TEMP, 0x0A))\n
Store (SD0B, Index(TEMP, 0x0B))\n
Store (SD0C, Index(TEMP, 0x0C))\n
Store (SD0D, Index(TEMP, 0x0D))\n
Store (SD0E, Index(TEMP, 0x0E))\n
Store (SD0F, Index(TEMP, 0x0F))\n
Store (SD10, Index(TEMP, 0x10))\n
Store (SD11, Index(TEMP, 0x11))\n
Store (SD12, Index(TEMP, 0x12))\n
Store (SD13, Index(TEMP, 0x13))\n
Store (SD14, Index(TEMP, 0x14))\n
Store (SD15, Index(TEMP, 0x15))\n
Store (SD16, Index(TEMP, 0x16))\n
Store (SD17, Index(TEMP, 0x17))\n
Store (SD18, Index(TEMP, 0x18))\n
Store (SD19, Index(TEMP, 0x19))\n
Store (SD1A, Index(TEMP, 0x1A))\n
Store (SD1B, Index(TEMP, 0x1B))\n
Store (SD1C, Index(TEMP, 0x1C))\n
Store (SD1D, Index(TEMP, 0x1D))\n
Store (SD1E, Index(TEMP, 0x1E))\n
Store (SD1F, Index(TEMP, 0x1F))\n
Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
Method (WSMD, 1, Serialized)\n
{\n
Name (TEMP, Buffer(0x20) { })\n
Store (Arg0, TEMP)\n
Store (DerefOf(Index(TEMP, 0x00)), SD00)\n
Store (DerefOf(Index(TEMP, 0x01)), SD01)\n
Store (DerefOf(Index(TEMP, 0x02)), SD02)\n
Store (DerefOf(Index(TEMP, 0x03)), SD03)\n
Store (DerefOf(Index(TEMP, 0x04)), SD04)\n
Store (DerefOf(Index(TEMP, 0x05)), SD05)\n
Store (DerefOf(Index(TEMP, 0x06)), SD06)\n
Store (DerefOf(Index(TEMP, 0x07)), SD07)\n
Store (DerefOf(Index(TEMP, 0x08)), SD08)\n
Store (DerefOf(Index(TEMP, 0x09)), SD09)\n
Store (DerefOf(Index(TEMP, 0x0A)), SD0A)\n
Store (DerefOf(Index(TEMP, 0x0B)), SD0B)\n
Store (DerefOf(Index(TEMP, 0x0C)), SD0C)\n
Store (DerefOf(Index(TEMP, 0x0D)), SD0D)\n
Store (DerefOf(Index(TEMP, 0x0E)), SD0E)\n
Store (DerefOf(Index(TEMP, 0x0F)), SD0F)\n
Store (DerefOf(Index(TEMP, 0x10)), SD10)\n
Store (DerefOf(Index(TEMP, 0x11)), SD11)\n
Store (DerefOf(Index(TEMP, 0x12)), SD12)\n
Store (DerefOf(Index(TEMP, 0x13)), SD13)\n
Store (DerefOf(Index(TEMP, 0x14)), SD14)\n
Store (DerefOf(Index(TEMP, 0x15)), SD15)\n
Store (DerefOf(Index(TEMP, 0x16)), SD16)\n
Store (DerefOf(Index(TEMP, 0x17)), SD17)\n
Store (DerefOf(Index(TEMP, 0x18)), SD18)\n
Store (DerefOf(Index(TEMP, 0x19)), SD19)\n
Store (DerefOf(Index(TEMP, 0x1A)), SD1A)\n
Store (DerefOf(Index(TEMP, 0x1B)), SD1B)\n
Store (DerefOf(Index(TEMP, 0x1C)), SD1C)\n
Store (DerefOf(Index(TEMP, 0x1D)), SD1D)\n
Store (DerefOf(Index(TEMP, 0x1E)), SD1E)\n
Store (DerefOf(Index(TEMP, 0x1F)), SD1F)\n
}\n
end;

into method label SMRD code_regex \(SMW0 replaceall_matched begin (B1B2(SMWX,SMWY) end;
into method label SMWR code_regex Store\s+\((.*),\s+SMW0\) replaceall_matched
begin
// Store(%1, SMW0)\n
Store(%1, SMWX) Store(ShiftRight(%1, 8), SMWY)
end;
into method label SMRD code_regex \(SMD0, replaceall_matched begin (RSMD(), end;
into method label SMWR code_regex Store\s+\((.*),\s+SMD0\) replaceall_matched begin WSMD(%1) end;

# deal with FLD3

into device label EC0 insert
begin
Method (RFL3, 0, Serialized)\n
{\n
Name (TEMP, Buffer(0x20) { })\n
Store (F300, Index(TEMP, 0x00))\n
Store (F301, Index(TEMP, 0x01))\n
Store (F302, Index(TEMP, 0x02))\n
Store (F303, Index(TEMP, 0x03))\n
Store (F304, Index(TEMP, 0x04))\n
Store (F305, Index(TEMP, 0x05))\n
Store (F306, Index(TEMP, 0x06))\n
Store (F307, Index(TEMP, 0x07))\n
Store (F308, Index(TEMP, 0x08))\n
Store (F309, Index(TEMP, 0x09))\n
Store (F30A, Index(TEMP, 0x0A))\n
Store (F30B, Index(TEMP, 0x0B))\n
Store (F30C, Index(TEMP, 0x0C))\n
Store (F30D, Index(TEMP, 0x0D))\n
Store (F30E, Index(TEMP, 0x0E))\n
Store (F30F, Index(TEMP, 0x0F))\n
Store (F310, Index(TEMP, 0x10))\n
Store (F311, Index(TEMP, 0x11))\n
Store (F312, Index(TEMP, 0x12))\n
Store (F313, Index(TEMP, 0x13))\n
Store (F314, Index(TEMP, 0x14))\n
Store (F315, Index(TEMP, 0x15))\n
Store (F316, Index(TEMP, 0x16))\n
Store (F317, Index(TEMP, 0x17))\n
Store (F318, Index(TEMP, 0x18))\n
Store (F319, Index(TEMP, 0x19))\n
Store (F31A, Index(TEMP, 0x1A))\n
Store (F31B, Index(TEMP, 0x1B))\n
Store (F31C, Index(TEMP, 0x1C))\n
Store (F31D, Index(TEMP, 0x1D))\n
Store (F31E, Index(TEMP, 0x1E))\n
Store (F31F, Index(TEMP, 0x1F))\n
Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
/*\n
Method (WFL3, 1, Serialized)\n
{\n
Name (TEMP, Buffer(0x20) { })\n
Store (Arg0, TEMP)\n
Store (DerefOf(Index(TEMP, 0x00)), F300)\n
Store (DerefOf(Index(TEMP, 0x01)), F301)\n
Store (DerefOf(Index(TEMP, 0x02)), F302)\n
Store (DerefOf(Index(TEMP, 0x03)), F303)\n
Store (DerefOf(Index(TEMP, 0x04)), F304)\n
Store (DerefOf(Index(TEMP, 0x05)), F305)\n
Store (DerefOf(Index(TEMP, 0x06)), F306)\n
Store (DerefOf(Index(TEMP, 0x07)), F307)\n
Store (DerefOf(Index(TEMP, 0x08)), F308)\n
Store (DerefOf(Index(TEMP, 0x09)), F309)\n
Store (DerefOf(Index(TEMP, 0x0A)), F30A)\n
Store (DerefOf(Index(TEMP, 0x0B)), F30B)\n
Store (DerefOf(Index(TEMP, 0x0C)), F30C)\n
Store (DerefOf(Index(TEMP, 0x0D)), F30D)\n
Store (DerefOf(Index(TEMP, 0x0E)), F30E)\n
Store (DerefOf(Index(TEMP, 0x0F)), F30F)\n
Store (DerefOf(Index(TEMP, 0x10)), F310)\n
Store (DerefOf(Index(TEMP, 0x11)), F311)\n
Store (DerefOf(Index(TEMP, 0x12)), F312)\n
Store (DerefOf(Index(TEMP, 0x13)), F313)\n
Store (DerefOf(Index(TEMP, 0x14)), F314)\n
Store (DerefOf(Index(TEMP, 0x15)), F315)\n
Store (DerefOf(Index(TEMP, 0x16)), F316)\n
Store (DerefOf(Index(TEMP, 0x17)), F317)\n
Store (DerefOf(Index(TEMP, 0x18)), F318)\n
Store (DerefOf(Index(TEMP, 0x19)), F319)\n
Store (DerefOf(Index(TEMP, 0x1A)), F31A)\n
Store (DerefOf(Index(TEMP, 0x1B)), F31B)\n
Store (DerefOf(Index(TEMP, 0x1C)), F31C)\n
Store (DerefOf(Index(TEMP, 0x1D)), F31D)\n
Store (DerefOf(Index(TEMP, 0x1E)), F31E)\n
Store (DerefOf(Index(TEMP, 0x1F)), F31F)\n
}\n
*/\n
end;


# deal with FLD2

into device label EC0 insert
begin
Method (RFL2, 0, Serialized)\n
{\n
Name (TEMP, Buffer(0x18) { })\n
Store (F200, Index(TEMP, 0x00))\n
Store (F201, Index(TEMP, 0x01))\n
Store (F202, Index(TEMP, 0x02))\n
Store (F203, Index(TEMP, 0x03))\n
Store (F204, Index(TEMP, 0x04))\n
Store (F205, Index(TEMP, 0x05))\n
Store (F206, Index(TEMP, 0x06))\n
Store (F207, Index(TEMP, 0x07))\n
Store (F208, Index(TEMP, 0x08))\n
Store (F209, Index(TEMP, 0x09))\n
Store (F20A, Index(TEMP, 0x0A))\n
Store (F20B, Index(TEMP, 0x0B))\n
Store (F20C, Index(TEMP, 0x0C))\n
Store (F20D, Index(TEMP, 0x0D))\n
Store (F20E, Index(TEMP, 0x0E))\n
Store (F20F, Index(TEMP, 0x0F))\n
Store (F210, Index(TEMP, 0x10))\n
Store (F211, Index(TEMP, 0x11))\n
Store (F212, Index(TEMP, 0x12))\n
Store (F213, Index(TEMP, 0x13))\n
Store (F214, Index(TEMP, 0x14))\n
Store (F215, Index(TEMP, 0x15))\n
Store (F216, Index(TEMP, 0x16))\n
Store (F217, Index(TEMP, 0x17))\n
Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
/*\n
Method (WFL2, 1, Serialized)\n
{\n
Name (TEMP, Buffer(0x18) { })\n
Store (Arg0, TEMP)\n
Store (DerefOf(Index(TEMP, 0x00)), F200)\n
Store (DerefOf(Index(TEMP, 0x01)), F201)\n
Store (DerefOf(Index(TEMP, 0x02)), F202)\n
Store (DerefOf(Index(TEMP, 0x03)), F203)\n
Store (DerefOf(Index(TEMP, 0x04)), F204)\n
Store (DerefOf(Index(TEMP, 0x05)), F205)\n
Store (DerefOf(Index(TEMP, 0x06)), F206)\n
Store (DerefOf(Index(TEMP, 0x07)), F207)\n
Store (DerefOf(Index(TEMP, 0x08)), F208)\n
Store (DerefOf(Index(TEMP, 0x09)), F209)\n
Store (DerefOf(Index(TEMP, 0x0A)), F20A)\n
Store (DerefOf(Index(TEMP, 0x0B)), F20B)\n
Store (DerefOf(Index(TEMP, 0x0C)), F20C)\n
Store (DerefOf(Index(TEMP, 0x0D)), F20D)\n
Store (DerefOf(Index(TEMP, 0x0E)), F20E)\n
Store (DerefOf(Index(TEMP, 0x0F)), F20F)\n
Store (DerefOf(Index(TEMP, 0x10)), F210)\n
Store (DerefOf(Index(TEMP, 0x11)), F211)\n
Store (DerefOf(Index(TEMP, 0x12)), F212)\n
Store (DerefOf(Index(TEMP, 0x13)), F213)\n
Store (DerefOf(Index(TEMP, 0x14)), F214)\n
Store (DerefOf(Index(TEMP, 0x15)), F215)\n
Store (DerefOf(Index(TEMP, 0x16)), F216)\n
Store (DerefOf(Index(TEMP, 0x17)), F217)\n
}\n
*/\n
end;


# deal with FLD1

into device label EC0 insert
begin
Method (RFL1, 0, Serialized)\n
{\n
Name (TEMP, Buffer(0x10) { })\n
Store (F100, Index(TEMP, 0x00))\n
Store (F101, Index(TEMP, 0x01))\n
Store (F102, Index(TEMP, 0x02))\n
Store (F103, Index(TEMP, 0x03))\n
Store (F104, Index(TEMP, 0x04))\n
Store (F105, Index(TEMP, 0x05))\n
Store (F106, Index(TEMP, 0x06))\n
Store (F107, Index(TEMP, 0x07))\n
Store (F108, Index(TEMP, 0x08))\n
Store (F109, Index(TEMP, 0x09))\n
Store (F10A, Index(TEMP, 0x0A))\n
Store (F10B, Index(TEMP, 0x0B))\n
Store (F10C, Index(TEMP, 0x0C))\n
Store (F10D, Index(TEMP, 0x0D))\n
Store (F10E, Index(TEMP, 0x0E))\n
Store (F10F, Index(TEMP, 0x0F))\n
Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
/*\n
Method (WFL1, 1, Serialized)\n
{\n
Name (TEMP, Buffer(0x10) { })\n
Store (Arg0, TEMP)\n
Store (DerefOf(Index(TEMP, 0x00)), F100)\n
Store (DerefOf(Index(TEMP, 0x01)), F101)\n
Store (DerefOf(Index(TEMP, 0x02)), F102)\n
Store (DerefOf(Index(TEMP, 0x03)), F103)\n
Store (DerefOf(Index(TEMP, 0x04)), F104)\n
Store (DerefOf(Index(TEMP, 0x05)), F105)\n
Store (DerefOf(Index(TEMP, 0x06)), F106)\n
Store (DerefOf(Index(TEMP, 0x07)), F107)\n
Store (DerefOf(Index(TEMP, 0x08)), F108)\n
Store (DerefOf(Index(TEMP, 0x09)), F109)\n
Store (DerefOf(Index(TEMP, 0x0A)), F10A)\n
Store (DerefOf(Index(TEMP, 0x0B)), F10B)\n
Store (DerefOf(Index(TEMP, 0x0C)), F10C)\n
Store (DerefOf(Index(TEMP, 0x0D)), F10D)\n
Store (DerefOf(Index(TEMP, 0x0E)), F10E)\n
Store (DerefOf(Index(TEMP, 0x0F)), F10F)\n
}\n
*/\n
end;

# deal with FLD0

into device label EC0 insert
begin
Method (RFL0, 0, Serialized)\n
{\n
Name (TEMP, Buffer(0x10) { })\n
Store (F000, Index(TEMP, 0x00))\n
Store (F001, Index(TEMP, 0x01))\n
Store (F002, Index(TEMP, 0x02))\n
Store (F003, Index(TEMP, 0x03))\n
Store (F004, Index(TEMP, 0x04))\n
Store (F005, Index(TEMP, 0x05))\n
Store (F006, Index(TEMP, 0x06))\n
Store (F007, Index(TEMP, 0x07))\n
Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
/*\n
Method (WFL0, 1, Serialized)\n
{\n
Name (TEMP, Buffer(0x10) { })\n
Store (Arg0, TEMP)\n
Store (DerefOf(Index(TEMP, 0x00)), F000)\n
Store (DerefOf(Index(TEMP, 0x01)), F001)\n
Store (DerefOf(Index(TEMP, 0x02)), F002)\n
Store (DerefOf(Index(TEMP, 0x03)), F003)\n
Store (DerefOf(Index(TEMP, 0x04)), F004)\n
Store (DerefOf(Index(TEMP, 0x05)), F005)\n
Store (DerefOf(Index(TEMP, 0x06)), F006)\n
Store (DerefOf(Index(TEMP, 0x07)), F007)\n
}\n
*/\n
end;

into method label SMRD code_regex \(FLD([0-3]), replaceall_matched begin (RFL%1(), end;
 
Joined
Dec 11, 2020
Messages
3
Motherboard
gigabyte z490
CPU
Core i3-10100
Graphics
intel 630
@sunnyboy958

have a hp14-dq1033cl (costco), using the battery patch above(battery_HP-DV6-3165sf.txt), but it cannot work after applying the patch, can someone help? thanks, DSDT attached
 

Attachments

  • DSDT.aml
    275.7 KB · Views: 1
Joined
Sep 11, 2020
Messages
3
Motherboard
HP 15s-fq1148ns
CPU
i7-1065G7
Graphics
Intel Iris Plus G7
Mobile Phone
  1. iOS
A new LiLu plugin has been released to finish this patching nightmare once for all.
It is working like a charm on my HP laptop using OC. Just copy to OC/Kext, Snapshot config using ProperTree, restart and BOOM!

 
Joined
May 4, 2021
Messages
6
Motherboard
HP Pavilion dv6 7017tx
CPU
i7-3610QM
Graphics
4000
A new LiLu plugin has been released to finish this patching nightmare once for all.
It is working like a charm on my HP laptop using OC. Just copy to OC/Kext, Snapshot config using ProperTree, restart and BOOM!

Thanks your kindly reply. It did resolved my problem.
 
Top