Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
May 31, 2015
Messages
99
Motherboard
MSI GE70 2OE
CPU
Intel Haswell Core i5 4200M 2.5GHz
Graphics
Intel HD 4600 & NVIDIA GTX 765M
Mac
MacBook Pro
Mobile Phone
Android, iOS
Hello, Rehabman!
I tried to create a patch for MSI GE70 2OE laptop. Original DSDT and patch text are attached. Could you please check if it is correct?
I'm not sure because my battery still shows incorrect charge cycles (240-340 of 300(!), depending on laptop usage), age of 36 years and capacity of 47%, despite of it's good condition showed in Windows.

EDIT: I'm using Fruitjuice for battery stats. Battery life is okay, average 2 hours and 20 minutes, same as in Windows. The only thing annoying is an exclamation mark telling to replace the battery.
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hello, Rehabman!
I tried to create a patch for MSI GE70 2OE laptop. Original DSDT and patch text are attached. Could you please check if it is correct?
I'm not sure because my battery still shows incorrect charge cycles (240-340 of 300(!), depending on laptop usage), age of 36 years and capacity of 47%, despite of it's good condition showed in Windows.

EDIT: I'm using Fruitjuice for battery stats. Battery life is okay, average 2 hours and 20 minutes, same as in Windows. The only thing annoying is an exclamation mark telling to replace the battery.
The patches look ok.
Cycles are estimated based on difference between Design Capacity and Max Capacity.
 
Joined
May 31, 2015
Messages
99
Motherboard
MSI GE70 2OE
CPU
Intel Haswell Core i5 4200M 2.5GHz
Graphics
Intel HD 4600 & NVIDIA GTX 765M
Mac
MacBook Pro
Mobile Phone
Android, iOS
Yes, and it looks like Design Capacity (4400mah against real 3000mah) is incorrect, as is the Manufacture date (30 Nov 1979 against real early 2014) - my laptop is not that ancient :) Is there any way to fix this data?

So, if the patches are ok - are they worth to be added to your repo? :)
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Yes, and it looks like Design Capacity (4400mah against real 3000mah) is incorrect, as is the Manufacture date (30 Nov 1979 against real early 2014) - my laptop is not that ancient :) Is there any way to fix this data?
You should debug your DSDT with ACPIDebug.kext and the debug ACPIBatteryManager.kext.

So, if the patches are ok - are they worth to be added to your repo? :)
Clearly, the patches or your procedures are not working.
 
Joined
May 31, 2015
Messages
99
Motherboard
MSI GE70 2OE
CPU
Intel Haswell Core i5 4200M 2.5GHz
Graphics
Intel HD 4600 & NVIDIA GTX 765M
Mac
MacBook Pro
Mobile Phone
Android, iOS
You should debug your DSDT with ACPIDebug.kext and the debug ACPIBatteryManager.kext.
I patched DSDT to add RMDT device and installed your ACPIDebug.kext - which debug output do I need now and where do I get it?

Also I installed debug version of ACPIBatteryManager.kext but now the battery icon is completely gone. Is it normal? Where can I find it's debug output?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I patched DSDT to add RMDT device and installed your ACPIDebug.kext - which debug output do I need now and where do I get it?
New mechanism for debug output in 10.12. Read 10.12 thread: https://www.tonymacx86.com/threads/readme-common-some-unsolved-problems-in-10-12-sierra.202316/

In order to get output from your battery methods, you will need to add debug traces (read ACPIDebug readme). Programming experience required. You will also need to know about ACPI battery status methods (_BST, _BIF, _STA). Read ACPI spec.

Also I installed debug version of ACPIBatteryManager.kext but now the battery icon is completely gone. Is it normal? Where can I find it's debug output?
If you need help, read post #1, "Problem Reporting".
 
Joined
May 31, 2015
Messages
99
Motherboard
MSI GE70 2OE
CPU
Intel Haswell Core i5 4200M 2.5GHz
Graphics
Intel HD 4600 & NVIDIA GTX 765M
Mac
MacBook Pro
Mobile Phone
Android, iOS
I analized _BIF method, installed also "coconut battery" and after reinstallation of ACPIBatteryManager.kext to the latest release version it seems that Battery info is now correct and is same as various apps in Windows show and the _BIF method provides... The battery appears to be worn for 30% percent and now macOS shows correctly that it needs maintenance, not replacement. consider it solved.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,206
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I analized _BIF method, installed also "coconut battery" and after reinstallation of ACPIBatteryManager.kext to the latest release version it seems that Battery info is now correct and is same as various apps in Windows show and the _BIF method provides... The battery appears to be worn for 30% percent and now macOS shows correctly that it needs maintenance, not replacement. consider it solved.
Design capacity is usually printed on the exterior of the battery...
I suppose you have decided that your statement regarding it in post #3463 is inaccurate?
 
Top