Contribute
Register

[Guide] How to patch DSDT for working battery status

Thanks I'll repatch it again.
 
The DSDT is not correctly patched. I didn't check everything, but just for example, BFCB is (still) 16-bit and is accessed in _BIF.

I have BFCB in _BIF and BTPB in _BTP both are 16. trying to fix BFCB store problem by using the following:

into device label EC0 code_regex BFCB,\s+16, replace_matched begin BF11,8,BF12,8, end;

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (B1B2(^^EC0.BF11,^^EC0.BF12), end;

I got the error code 6088 Object is not accessible from this scope (B1B2)

the second problem how to fix this one:

Store (Local0, ^^EC0.BTPB).

I tryied:

into method label _BTP code_regex \\^\^EC0\.BTPB) replaceall_matched begin (B1B2(^^EC0.BTP0,^^EC0.BTP1), end;

but i got The value “\\^\^EC0\.BTPB)” is invalid.

All the issues were fixed except
 
I have BFCB in _BIF and BTPB in _BTP both are 16. trying to fix BFCB store problem by using the following:

into device label EC0 code_regex BFCB,\s+16, replace_matched begin BF11,8,BF12,8, end;

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (B1B2(^^EC0.BF11,^^EC0.BF12), end;

I got the error code 6088 Object is not accessible from this scope (B1B2)

Your patches place B1B2 into Scope (_SB.PCI0.LPCB.EC0). As a result, you must refer to it by that scope using the dot operator.

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (\_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), end;

You have done this elsewhere in your patches, so I'm not sure why you forgot about it in this instance.

Note: If you had followed the guide, B1B2 would be at root scope.

the second problem how to fix this one:

Store (Local0, ^^EC0.BTPB).

I tryied:

into method label _BTP code_regex \\^\^EC0\.BTPB) replaceall_matched begin (B1B2(^^EC0.BTP0,^^EC0.BTP1), end;

but i got The value “\\^\^EC0\.BTPB)” is invalid.

B1B2 can only be used for reads. Store (Local0, ^^EC0.BTPB) is a write.

It needs to be translated into two separate stores:
Code:
Store(Local0, ^^EC0.BF11)
Store(ShiftRight(Local0,8), ^^EC0.BF12)
 
Thanks RehabMan. :clap:
 
RehabMan, please be patient :silent:. I am almost done I have 2 issues just to make it easier:

1- BFCB in BAT1 - _BIF.

I have done the following:

into device label EC0 code_regex BFCB,\s+16, replace_matched begin BF11,8,BF12,8, end;

the fix:

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (\_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), end;

I got it stored as:

Store (_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), Local2)

with error 6085 - Object not found or not accessible from scope (_SB.LPCB.EC0.B1B2)

2- BTPB in BAT1 - _BTP:

I already sone the following:

into device label EC0 code_regex BTPB,\s+16, replace_matched begin BTP0,8,BTP1,8, end;

and it is stored as:

Store (Local0, ^^EC0.BTPB)

Actually i Don't know how to apply the fix. this is the last try then i'll give up :banghead:
 
RehabMan, please be patient :silent:. I am almost done I have 2 issues just to make it easier:

1- BFCB in BAT1 - _BIF.

I have done the following:

into device label EC0 code_regex BFCB,\s+16, replace_matched begin BF11,8,BF12,8, end;

the fix:

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (\_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), end;

I got it stored as:

Store (_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), Local2)

with error 6085 - Object not found or not accessible from scope (_SB.LPCB.EC0.B1B2)

You have to escape the backslash...

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (\\_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), end;


2- BTPB in BAT1 - _BTP:

I already sone the following:

into device label EC0 code_regex BTPB,\s+16, replace_matched begin BTP0,8,BTP1,8, end;

and it is stored as:

Store (Local0, ^^EC0.BTPB)

Actually i Don't know how to apply the fix. this is the last try then i'll give up :banghead:

Look at existing examples in the repo.
 
Just patched my DSDT to allow battery status on my HP Pavilion 15-199sa laptop.

Working:
  • Estimated Battery Time
  • Percentage + Graphical Meter
  • Detects charger
  • 4/5 Hour Battery Life

Its my first patch so please excuse any mistakes.
I attached both the clean and patched DSL files and also the patch script in a text file.

Feedback if you may.

Thanks

View attachment [NEW] HP Pavilion 15-p199sa.zip
 
You have to escape the backslash...

into method label _BIF code_regex \(\^\^EC0\.BFCB, replaceall_matched begin (\\_SB.LPCB.EC0.B1B2(^^EC0.BF11,^^EC0.BF12), end;




Look at existing examples in the repo.

Thanks RehabMan finally i got it working. everything is perfect no problems at all percentage indicator remaining time to full al the stuff.

attached is the patch + Original DSDT + Patched DSDT with mutex.

Thanks for your help

please note that this patch applied to HP 15 R100nx maybe for all R100 series.

thanks again :D
 

Attachments

  • DSDT HP 15 R100nx.zip
    139.8 KB · Views: 61
Just patched my DSDT to allow battery status on my HP Pavilion 15-199sa laptop.

Working:
  • Estimated Battery Time
  • Percentage + Graphical Meter
  • Detects charger
  • 4/5 Hour Battery Life

Its my first patch so please excuse any mistakes.
I attached both the clean and patched DSL files and also the patch script in a text file.

Feedback if you may.

Thanks

View attachment 131741

I'm pretty sure that the existing patch "HP G6 2221ss" will work for your laptop.

Please test and let me know...
 
Thanks RehabMan finally i got it working. everything is perfect no problems at all percentage indicator remaining time to full al the stuff.

attached is the patch + Original DSDT + Patched DSDT with mutex.

Thanks for your help

please note that this patch applied to HP 15 R100nx maybe for all R100 series.

thanks again :D

These involve only a few small changes to the "HP Folio 13 1010es" patch.

I'll add them to that patch file instead.
 
Back
Top