Contribute
Register

[Guide] How to patch DSDT for working battery status

hello,RehabMan,This is my ioreg. I can't find the relevant content according to your posts. Is there any way to solve the problem of power display?

What do you mean by "power display"?
 
Hi @RehabMan,

I followed your guide and battery icon shows up in the menubar, but the problem is it always shows 99% when AC plugged in, and 100% when AC unplugged. Battery status is right under windows. Can you take a look at this?

Thanks!

ACPI not patched correctly. For example, no evidence of "OS Check Fix" patch.
 
Greetings - I am attempting to patch my DSDT to get the battery status working. I have followed the guide in the first post and have created a text file of the patch. I am anything but a coder, so it is probably wrong in many ways, so if someone could take a look, I would appreciate it. I can tell you for sure that the offsets are totally wrong - I have changed the text color for those to RED. I have no idea how to calculate the offsets.

Also, I am not sure how to apply the patch in MaciASL. Once I get the DSDT patched, should it be placed in /EFI/EFI/CLOVER/ACPI/patched?

I have attached the patch as well as all the problem reporting files.

Thanks!

You should check for an existing patch that may apply to your DSDT before attempting to create one.
 
You should check for an existing patch that may apply to your DSDT before attempting to create one.
Hi RehabMan - thank you for looking at this. I did look for an existing patch that would work for my DSDT, but none of them seemed a good match. I should have mentioned that in my previous post.
 
Hi RehabMan - thank you for looking at this. I did look for an existing patch that would work for my DSDT, but none of them seemed a good match. I should have mentioned that in my previous post.

Use existing patches as examples for how to make a set of patches for your DSDT.
 
Ok - I changed my patch to match the patch for a Lenovo N480. However, there is one thing that I have not been able to set properly in the patch - I have no idea how to calculate the offsets to fix the 64/96/128-bit registers. In the guide you state "Keep in mind the sizes are in bits, but the offsets are in bytes. The offsets I have in the comments below are in hex." but I don't understand how to calculate the offsets. I have highlighted the offsets in the patch in red (they are just from the guide - they are not my attempt to guess)

I have attached new reporting files, along with the updated patch (DSDT patch 2). I am hoping that once I can get the offsets, the patch will be complete. Then I will just have to figure out how to apply it.
 

Attachments

  • Archive.zip
    5.2 MB · Views: 62
Ok - I changed my patch to match the patch for a Lenovo N480. However, there is one thing that I have not been able to set properly in the patch - I have no idea how to calculate the offsets to fix the 64/96/128-bit registers. In the guide you state "Keep in mind the sizes are in bits, but the offsets are in bytes. The offsets I have in the comments below are in hex." but I don't understand how to calculate the offsets. I have highlighted the offsets in the patch in red (they are just from the guide - they are not my attempt to guess)

I have attached new reporting files, along with the updated patch (DSDT patch 2). I am hoping that once I can get the offsets, the patch will be complete. Then I will just have to figure out how to apply it.

The offset of any EC register is the offset of the previous register + size or offset specified in an immediately prior Offset directive.
 
I apologize, while I understand it is just adding numbers, with the conversion of bytes, bits, and hex, I do not know how to do this. In my DSDT file, the values (in red) where I need to calculate the offsets are:

Offset (0x1C),
BRC0, 16,
BTP0, 16,
BCC0, 16,
BCV0, 16,
BME0, 16,
FCC0, 16,
BDC0, 16,
BDV0, 16,
BMD0, 16,
BSN0, 16,
MANA, 96,

Offset (0x8B),
TSHT, 8,
DENA, 64,
CHEM, 32,
BAAC, 16,
RTE0, 16,
ATE0, 16,
ATF0, 16,
FWIN, 64,
BARC, 128,
 
ACPI not patched correctly. For example, no evidence of "OS Check Fix" patch.
Thanks for your time, i went through the whole patch process again, and still no luck. Can you take a lookt at it one more time?
 

Attachments

  • DSDT-common-patches-noFixMutex-noAddImei.dsl
    430.6 KB · Views: 62
  • patch.txt
    11.3 KB · Views: 90
  • debug_8457.zip
    1.3 MB · Views: 57
What do you mean by "power display"?
sorry,is Battery status display,I don't find "EmbeddedControl", so I put the battery driver on L/E, but battery status is 100%. no change.connection charger already shows "Use the battery". Is there any way? My files are at #4985
 
Back
Top