Contribute
Register

[Guide] How to patch DSDT for working battery status

No idea what you're asking.
Sorry, I mean, no matter what I do, the battery status display doesn't work, so I found a source code. I hope you can see it and give me a way.
 
Simple math... for example:

Offset (0x1C),
BRC0, 16, //1c
BTP0, 16, //1e
BCC0, 16, //20
BCV0, 16, //22
BME0, 16,//24
FCC0, 16,//26
BDC0, 16,//28
BDV0, 16,//2a
BMD0, 16,//2c
BSN0, 16,//2e
MANA, 96,//30
Hi RehabMan - Thanks for the help. I think I understand the offsets now. I have revised my patch and have tried to apply it to my DSDT.dsl. (I am also applying the two _VoodooI2C-Patches - they resolve a lot of other errors I was getting trying to compile)

Now I am only receiving one error when I try to compile:

Line 14544, Code 6126, Message: syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

Could you take a look?
 

Attachments

  • Archive.zip
    5.2 MB · Views: 78
Sorry, I mean, no matter what I do, the battery status display doesn't work, so I found a source code. I hope you can see it and give me a way.

Read post #1.
 
Hi RehabMan - Thanks for the help. I think I understand the offsets now. I have revised my patch and have tried to apply it to my DSDT.dsl. (I am also applying the two _VoodooI2C-Patches - they resolve a lot of other errors I was getting trying to compile)

Now I am only receiving one error when I try to compile:

Line 14544, Code 6126, Message: syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

Could you take a look?

The DSDT.dsl you attached has no errors.
 
The DSDT.dsl you attached has no errors.
I understand. I guess I should do this one patch at a time.

If I take that DSDT.dsl, and apply my patch only, I get 16 errors, 35 warnings, 78 remarks, and 142 optimizations. I have attached a PDF of the errors - could you look at them, and also at my patch in archive.zip, and see what I am doing wrong?
 

Attachments

  • DSDT with patch compile errors.zip
    891.3 KB · Views: 123
  • Archive.zip
    5.2 MB · Views: 123
If I take that DSDT.dsl, and apply my patch only, I get 16 errors,

Your errors are obviously caused by incorrectly coded patches.
Fix the patches.
 
Your errors are obviously caused by incorrectly coded patches.
Fix the patches.
Yes - I agree. This is the first time I have ever done a patch. I don’t have anyone to review my work so I don’t know what is wrong with my patch. I used the the other patches as an example as you suggested, but obviously something is not right.
 
Last edited:
Your errors are obviously caused by incorrectly coded patches.
Fix the patches.

The mistakes are relatively obvious.
Example:
You patched BDC0 to DC00, DC01, but then refer to DC01/DC02.

You need to check your work.
 
The mistakes are relatively obvious.
Example:
You patched BDC0 to DC00, DC01, but then refer to DC01/DC02.

You need to check your work.
I fixed the obvious errors in the patch, but after that, there were still 8 errors where the patch did not change the objects to the replacement values that I defined in the patch. I do not know why the patch did not perform these 8 replacements. I was able to manually edit these 8 values in the DSDT.dsl file and then successfully compile the new/patched DSDT.aml.

While I feel this is a success and I have my battery status working now (thank you again for your help), I would like to understand why the patch did not change the 8 objects. To that end, I have attached revised troubleshooting files, as well as a list of the errors (DSDT with patch compile errors.png), and the final patched DSDT with manual corrections. If you could help me with this understanding, I am hoping to change the patch to catch these last 8 values, and then the patch should be good for you to add to your repository for this laptop model.
 

Attachments

  • Archive.zip
    5.4 MB · Views: 191
Back
Top