Contribute
Register

[Guide] How to patch DSDT for working battery status

Third time is the charm....I think....lol...

Found one more problem...

This patch:
Code:
into_all method label SBTC code_regex Store\s+\(0xFA,\s+MAXC\) replaceall_matched begin Store(0xFA, XC00)\n\t\t\t\t\t\t\tStore(0xFA, XC01) end;

Should be:
Code:
into_all method label SBTC code_regex Store\s+\(0xFA,\s+MAXC\) replaceall_matched begin Store(0xFA, XC00)\n\t\t\t\t\t\t\tStore(Zero, XC01) end;

Please test...
 
Found one more problem...

This patch:
Code:
into_all method label SBTC code_regex Store\s+\(0xFA,\s+MAXC\) replaceall_matched begin Store(0xFA, XC00)\n\t\t\t\t\t\t\tStore(0xFA, XC01) end;

Should be:
Code:
into_all method label SBTC code_regex Store\s+\(0xFA,\s+MAXC\) replaceall_matched begin Store(0xFA, XC00)\n\t\t\t\t\t\t\tStore(Zero, XC01) end;

Please test...

Ok, now that's the first one that I don't quite understand. Is the 'zero' needed because of the offset?

It replaces it correctly, compiles and I'm using it right now. The battery status appears to be working as it should, but it was working with all the errors I had as well. :-/
 

Attachments

  • HP Elite X2 1012-batterypatch.zip
    95 KB · Views: 113
Ok, now that's the first one that I don't quite understand. Is the 'zero' needed because of the offset?

Store(Zero, MAXC) will store 0 into both the high order byte of MAXC and the low order byte.
Store(0xFA, MAXC) will store 0 into the high order byte of MAXC and 0xFA into the low order byte.
You changed it to write 0xFA into both high and low order bytes. It is the same as Store(0xFAFA, MAXC), which of course, is not the same as Store(0xFA, MAXC).
When you break MAXC,16 into XC00 and XC01, XC00 is the low order byte, XC01 is the high order byte.
 
It replaces it correctly, compiles and I'm using it right now. The battery status appears to be working as it should, but it was working with all the errors I had as well. :-/

Thanks. Added to github.
 
@RehabMan: is there an existing patch I can use for my HP G4 2240BR laptop from your repository? I see there are some patches for HP, but none for my model. Appreciate your help.

Read post #1.
 
Hi,

I have a HP Envy 14-1200 notebook, and I am not sure what I have done wrong, but my battery status returns "No Battery Available". I have attached the problem report exports.

Thanks!
 

Attachments

  • Problem Report.zip
    1.9 MB · Views: 130
Hello. Please Help. Acer aspire 5930g. can't make the correct edit in the dsdt. Mac os el capitan
 

Attachments

  • DSDT.aml.zip
    17.3 KB · Views: 125
I am using the El Capitan for the hp specter 1323et laptop, what I did is battery zero. How can I fix the situation I do not understand anything from your guides I do not have a patch available please help me
 
Hi,

I have a HP Envy 14-1200 notebook, and I am not sure what I have done wrong, but my battery status returns "No Battery Available". I have attached the problem report exports.

Thanks!

You forgot to disable the second battery object (no battery detected there).
Change BAT1._STA to return zero.
 
Back
Top