Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
Aug 31, 2011
Messages
36
Motherboard
Lenovo Y550 + Sierra 10.12.4 (Clover)
CPU
Pentium Core 2 Duo T6600
Graphics
Nvidia Geforce G 110M
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
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.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,093
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Aug 31, 2011
Messages
36
Motherboard
Lenovo Y550 + Sierra 10.12.4 (Clover)
CPU
Pentium Core 2 Duo T6600
Graphics
Nvidia Geforce G 110M
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
_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!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,093
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Aug 13, 2014
Messages
1
Motherboard
N76VB
CPU
i7-3630QM
Graphics
HD4000/740M
Mac
Classic Mac
Mobile Phone
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: 41
  • 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: 95
Joined
Dec 13, 2010
Messages
14
Motherboard
msi h81m-p33
CPU
i5-4460
Graphics
gtx760
Mac
  1. MacBook Pro
patch
#Maintained by: RehabMan for: Laptop Patches
#battery_Lenovo-y580.txt

fully working on the laptop Lenovo G510
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,093
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Jun 21, 2015
Messages
22
Motherboard
Asus Maximus Extreme
CPU
Intel core 2 duo E8500
Graphics
Nvidia Geforce 210
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
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: 48

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,093
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Thank you both @Simmy, @mavvert. I'll add comments to that effect.
 
Top