Contribute
Register

[Guide] How to patch DSDT for working battery status

When they are equal, it means your battery is in near perfect health, maximum capacity as designed.

As you run cycles on it, MaxCapacity will fall, since the battery becomes degraded.

I doubt it, my battery has almost 4 years.. I'll try to review my DSDT, maybe some EC left in 16bit and must be converted to 8bit.
 
I doubt it, my battery has almost 4 years.. I'll try to review my DSDT, maybe some EC left in 16bit and must be converted to 8bit.

_BST/_BIF would fail outright if there were 16-bit EC fields being accessed.
 
_BST/_BIF would fail outright if there were 16-bit EC fields being accessed.

Hello RehanMan,

Finally I've managed how to show battery cycles.

In my DSDT exist CYC0, searching on internet I've understand that return battery cycles.

I've modify my _BIF from this:

Method (_BIF, 0, NotSerialized)
{
Name (STAT, Package (0x0D)
{
Zero,
0x0FA0,
0x0FA0,
One,
0x2B5C,
0x01A4,
0x9C,
0x0108,
0x0EC4,
"PABAS024",
"3658Q",
"LION",
"COMPAL"
})
If (ECOK ())
{
Store (^^EC0.BDN0, Local0)
If (LEqual (Local0, 0x02))
{
Store ("PA3457U ", Index (STAT, 0x09))
}

If (LEqual (Local0, 0x08))
{
Store ("PA3457U ", Index (STAT, 0x09))
}

Sleep (0x14)
Store (B1B2 (^^EC0.DC00, ^^EC0.DC01), BFC1)



To this:

Method (_BIF, 0, NotSerialized)
{
Name (STAT, Package (0x0E)
{
Zero,
0x0FA0,
0x0FA0,
One,
0x2B5C,
0x01A4,
0x9C,
0x0108,
0x0EC4,
"PABAS024",
"3658Q",
"LION",
"COMPAL",
Zero
})
If (ECOK ())
{
Store (^^EC0.BDN0, Local0)
If (LEqual (Local0, 0x02))
{
Store ("PA3457U ", Index (STAT, 0x09))
}

If (LEqual (Local0, 0x08))
{
Store ("PA3457U ", Index (STAT, 0x09))
}

Sleep (0x14)
Store (^^EC0.CYC0, Index (STAT, 0x0D))
Sleep (0x14)
Store (B1B2 (^^EC0.DC00, ^^EC0.DC01), BFC1)


And now I see that my battery has 154 cycles.


I found something strange before last change in my DSDT. When my battery is discharging, at 7% stop to decrease but obviously the battery still discharging.

What do you think could be the problem?
How calculate this value your kext?


Thanks again!
 
Hello RehanMan,

Finally I've managed how to show battery cycles.

In my DSDT exist CYC0, searching on internet I've understand that return battery cycles.

I've modify my _BIF from this:
...

And now I see that my battery has 154 cycles.

Yup.

I found something strange before last change in my DSDT. When my battery is discharging, at 7% stop to decrease but obviously the battery still discharging.

What do you think could be the problem?
How calculate this value your kext?

Value is not calculated. It comes directly from what is given by DSDT _BST.
 
Hey, RehabMan!

Just wanted to say massive thanks for your perfectly explained guides! Just installed El Capitan on my N76VB, fixed the PM (followed your guide) and now I've managed to get the battery status working as well. I think there's only one modification I had to do to your ASUS-G75vw patch, I've included both original and patched DSDTs and my custom patch with everything unneeded removed. Fixing the backlight and disabling the nvidia gpu are next, and then I think I'll have a fully functioning hackintosh!
 

Attachments

  • patch.zip
    121.7 KB · Views: 69
  • Screen Shot 2015-08-01 at 2.52.07 PM.png
    Screen Shot 2015-08-01 at 2.52.07 PM.png
    928.7 KB · Views: 114
patch
#Maintained by: RehabMan for: Laptop Patches
#battery_Lenovo-y580.txt

fully working on the laptop Lenovo G510
 
patch
#Maintained by: RehabMan for: Laptop Patches
#battery_Lenovo-y580.txt

fully working on the laptop Lenovo G510

Thanks, I'll add it to the comments.
 
Rehabman.

Just quick note to say that this Acer battery patch from your repository battery_Acer-Aspire-E1-571.txt
works with Acer Travelmate T253M.

Enclosed is my native DSDT for You to check with that I'm am correct in using this patch.
 

Attachments

  • DSDT.aml
    47 KB · Views: 66
Thank you both @Simmy, @mavvert. I'll add comments to that effect.
 
Back
Top