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
188,929
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
188,929
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
188,929
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
188,929
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?
 
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 my statement was inaccurate, the actual capacity is 4400 mah, but the manufacture date is N/A - this data cannot be retrieved by any app either in Windows or in Mac, I supposed early 2014 as the laptop manufacture date. So FruitJuice seems to show the default for itself manufacture date of 30.11.1979 when it's unable to retrieve the actual one.
 
Joined
Jun 10, 2014
Messages
7
Motherboard
HP 15an050nr
CPU
i5 6200u 2.3 GHz
Graphics
intel HD 520
Mobile Phone
iOS
"Looking through the rest of the the EC, we look for all fields larger than 8-bit, and for each one, search the rest of the DSDT to see if they are accessed. It is common that some fields are not accessed and for those we don't have to do anything. So, the next field we see is BMN0"

None of the Fields are accessed, using Sierra 10.12.2 Everything is just going over my head please help.
Attached all the files

Outputs
kextstat|grep -y acpiplat
Code:
 13    2 0xffffff7f824d7000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) B8468080-CED9-30EA-B151-33368AF9555B <12 11 7 6 5 4 3 1>
kextstat|grep -y applelpc
kextstat|grep -y appleintelcpu
sudo touch /System/Library/Extensions && sudo kextcache -u /
Code:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RealtekRTL8100.kext
KernelCache ID: DC6A93B10D784EA808A4194E079DDF3D
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
 

Attachments

Top