Contribute
Register

[Guide] How to patch DSDT for working battery status

How to patch DSDT for working battery status

rehabman, yesterday I checked the "BIOS" of my laptop and I deactivated the "Battery Cycle Life Extensions" option and now the percentage of battery charge reaches 100% :clap:

I suspected it could be something like that... Usually there is an OEM app that you need to run on Windows. Nice that you have a BIOS option for it.

I attached a picture of the "BIOS" with the options that I can choose for configuration.
You can tell me what could disable or enable ?. Please.
thank you very much.

You should experiment.
 
How to patch DSDT for working battery status

-
 

Attachments

  • DSDT.aml
    58.3 KB · Views: 133
How to patch DSDT for working battery status

Hello Rehabman! My EmbeddedControl is already called ERAM...it´s a little bit confuse... I tried to apply one example with 16 bits method (with all changes needed to my dsdt), and without the correction i don´t have any errors...am i doing the patch in the right place (ERAM)? Thanks
 
How to patch DSDT for working battery status

Hello Rehabman! My EmbeddedControl is already called ERAM...it´s a little bit confuse... I tried to apply one example with 16 bits method (with all changes needed to my dsdt), and without the correction i don´t have any errors...am i doing the patch in the right place (ERAM)? Thanks

Yes...
 
How to patch DSDT for working battery status


"HP G6 2221ss" or "HP DV6-3165sf" are good matches/good starting points for your DSDT.
 
How to patch DSDT for working battery status

Hello Rehabman!

You really give me a direction with this patches. But, after i patch the # 16-bit registers and # fix 16-bit methods, i stuck with this error
844, 4065, Object not found or not accessible from scope (^^PCI0.LPCB.EC0.MBRM)
from this line of DSDT
Add (Divide (B1B2(^^PCI0.LPCB.EC0.SCP0,^^PCI0.LPCB.EC0.SCP1), 0x32, ), ^^PCI0.LPCB.EC0.MBRM, Local5).
I also had patched MBRM line with this :
into method label UPBS code_regex \(\^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;



How can I fix this error? thanks
 
How to patch DSDT for working battery status

Hello Rehabman!

You really give me a direction with this patches. But, after i patch the # 16-bit registers and # fix 16-bit methods, i stuck with this error
844, 4065, Object not found or not accessible from scope (^^PCI0.LPCB.EC0.MBRM)
from this line of DSDT
Add (Divide (B1B2(^^PCI0.LPCB.EC0.SCP0,^^PCI0.LPCB.EC0.SCP1), 0x32, ), ^^PCI0.LPCB.EC0.MBRM, Local5).
I also had patched MBRM line with this :
into method label UPBS code_regex \(\^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;



How can I fix this error? thanks

Your regex will not match the target code.
 
How to patch DSDT for working battery status

Your regex will not match the target code.

I Know!! but i have another lines with MBRM and this regex works for them. Also DSCP. But my dsdt have this one line with this two targets together and i don´t know how split them...

Store (^^PCI0.LPCB.EC0.MCUR, Local5)
Store (POSW (Local5), Index (PBST, One))
Store (^^PCI0.LPCB.EC0.MBRM, Local5)
If (LEqual (^^PCI0.LPCB.EC0.S3CF, One))
{
Add (Divide (^^PCI0.LPCB.EC0.DSCP, 0x32, ), ^^PCI0.LPCB.EC0.MBRM, Local5)

Any ideas? Thanks
 
How to patch DSDT for working battery status

I Know!! but i have another lines with MBRM and this regex works for them. Also DSCP. But my dsdt have this one line with this two targets together and i don´t know how split them...

Store (^^PCI0.LPCB.EC0.MCUR, Local5)
Store (POSW (Local5), Index (PBST, One))
Store (^^PCI0.LPCB.EC0.MBRM, Local5)
If (LEqual (^^PCI0.LPCB.EC0.S3CF, One))
{
Add (Divide (^^PCI0.LPCB.EC0.DSCP, 0x32, ), ^^PCI0.LPCB.EC0.MBRM, Local5)

Any ideas? Thanks

Not tested...
Code:
into method label UPBS code_regex \^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;
 
How to patch DSDT for working battery status

Not tested...
Code:
into method label UPBS code_regex \^\^PCI0\.LPCB\.EC0\.MBRM, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;

WORKS!

Now, i have tried a lot of patches to correct the B1B4, but i don´t know what i am doing wrong.

the error is: 5220, 4065, Object not found or not accessible from scope (^^EC0.VERN)

and the location is _SB>PCI0>LPCB>MAP1>WMAB

I had tried already :

into method label WMAB code_regex \(\^\^_SB\.PCI0\.LPCB\.MAP1\.VERN, replace_matched begin (B1B4(^^EC0.ERN0,^^EC0.ERN1,^^EC0.ERN2,^^EC0.ERN3), end;

into method label WMAB code_regex \(\^\^PCI0\.LPCB\.MAP1\.VERN, replace_matched begin (B1B4(^^EC0.ERN0,^^EC0.ERN1,^^EC0.ERN2,^^EC0.ERN3), end;



into_all method label WMAB code_regex \(\^PCI0\.LPCB\.MAP1\.VERN, replaceall_matched begin (B1B4 (^PCI0.LPCB.MAP1.ERN0, ^PCI0.LPCB.MAP1.ERN1, ^PCI0.LPCB.MAP1.ERN2, ^PCI0.LPCB.MAP1.ERN3), end;

into method label WMAB code_regex \(\^\^_SB\.PCI0\.LPCB\.MAP1\.VERN, replace_matched begin (B1B4(^^PCI0.LPCB.MAP1.ERN0,^^PCI0.LPCB.MAP1.ERN1,^^PCI0.LPCB.MAP1.ERN2,^^PCI0.LPCB.MAP1.ERN3), end;


into method label WMAB code_regex \(\^\^PCI0\.LPCB\.MAP1\.VERN, replace_matched begin (B1B4(^^PCI0.LPCB.MAP1.ERN0,^^PCI0.LPCB.MAP1.ERN1,^^PCI0.LPCB.MAP1.ERN2,^^PCI0.LPCB.MAP1.ERN3), end;

into method label WMAB code_regex \(VERN, replaceall_matched begin (B1B4(ERN0,ERN1,ERN2,ERN3), end;

What am i doing wrong??

Thanks for all your paciente.
 
Back
Top