Contribute
Register

[Guide] How to patch DSDT for working battery status

I don't know what you mean by "batteries check does not start".
Means it is not working: no status changing plugging or unplugging no charging or discharging values are changed, no sleep as if power cord attached while on batteries, etc.
Until I change something in Energy SP pane: than it start working.
Thanks
 
Hi RehabMan.
I tried to make a patch for my ThinkPad P51. There's only one 16-bit data to change but after I installed the patched DSDT and reboot, macOS failed to get the battery status.
I think it is an error of the original DSDT (Near the GetBatterySTatus part). When I toggle the battery icon, the Console.app shows an error about AppleACPIPlatform (
[\_SB.PCI0.LPCB.EC.BAT0._BST] (Node ffffff804365ad20) ),
but I don't know how to fix it.
Please take a look at all the files. There's a README file in the zip.
Than you so much for your effort!

You have not patched correctly.
Use one of the existing patches that matches your DSDT (see post #1 for clues).
 
Means it is not working: no status changing plugging or unplugging no charging or discharging values are changed, no sleep as if power cord attached while on batteries, etc.
Until I change something in Energy SP pane: than it start working.
Thanks

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.

Note: Sleep is off-topic here.
 
You have not patched correctly.
Use one of the existing patches that matches your DSDT (see post #1 for clues).
Hi RehabMan.
After getting a clean dump and patched the DSDT with "[bat] Lenovo X230i", battery status is working fine on my ThinkPad P51. Thanks for your help!
Maybe you can add a comment in the patch to tell others the patch can also work on Lenovo ThinkPad P51.
 
Hi RehabMan.
After getting a clean dump and patched the DSDT with "[bat] Lenovo X230i", battery status is working fine on my ThinkPad P51. Thanks for your help!
Maybe you can add a comment in the patch to tell others the patch can also work on Lenovo ThinkPad P51.

Added. Thanks.
 
Hi!

I'm using ACPIBatteryManager.kext, and got a message today, "service battery". The battery seems to be working okay, does this indicate a hardware problem?

Képernyőfotó 2018-04-03 - 15.32.20.png
 
Hi!

I'm using ACPIBatteryManager.kext, and got a message today, "service battery". The battery seems to be working okay, does this indicate a hardware problem?

View attachment 322712

"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Here is it.
 

Attachments

  • debug_14215.zip
    1.3 MB · Views: 72
Here is it.

The message is due to your battery capacities...
MaxCapacity is 0x118f, DesignCapacity 0x1713.
So battery is degraded that max charge capacity is only 76% of design capacity (0x118f/0x1713=~76%).
ACPIBatteryManager.kext calculates a CycleCount from this delta (your estimated cycle count is 0xeb [decimal 235]).
A large cycle count also contributes to the message regarding battery health.
 
Hello, @RehabMan - First of all - thank you for all that you have done for the Hackintosh community. I love Sierra running on my old and now revitalized Thinkpad T61. I successfully applied your battery DSDT patch (battery_Lenovo-X220.txt) to my T61 and found that the following lines in your 128-bit patches did not appear to be working properly to patch my DSDT:

`into device label EC insert begin Method (RBMN, 0, Serialized) { Return(RECB(0xA0,128)) } end;`

`into device label EC insert begin Method (RBDN, 0, Serialized) { Return(RECB(0xA0,128)) } end;`

My DSDT already had these methods, so the methods are duplicated. I manually edited my DSDT so that the return value of the methods matched that of your patch. Other than that, your patches applied well and my battery indicator is working!

Now I just need to get brightness working (worked with El Capitan but not with Sierra). Thanks again!

I'll change my signature after I declare victory with the T61. My laptop is as follows:

  • Thinkpad T61 7664-RYU
  • CPU: T9300 (upgraded from T8100)
  • Memory: 8GB DDR2 800
  • Dual-boot OSX Sierra / Windows 7x64
  • Clover (Legacy) v2.4k_r4428
 
Last edited:
Back
Top