Contribute
Register

[solved] T450 DUAL Battery Status help

Status
Not open for further replies.
Sorry to bump this thread again. I sometimes confront with strange situation. Even though battery shows correct percentage, sometimes it shows with red color. Also when I click the icon, it doesn't show approximate time remaining. I option clicked battery icon and added as screenshot.

Screen_Shot_2017_02_11_at_12_29_31_AM.png
 

Attachments

  • Mustafa’s MacBook Pro.zip
    483.4 KB · Views: 78
Sorry to bump this thread again. I sometimes confront with strange situation. Even though battery shows correct percentage, sometimes it shows with red color. Also when I click the icon, it doesn't show approximate time remaining. I option clicked battery icon and added as screenshot.

Screen_Shot_2017_02_11_at_12_29_31_AM.png

Time Remaining not provided by latest Sierra (change was made by Apple).
Maybe it shows red because of Firefox being a power pig?
 
When I first booted Sierra, it gave me warning about battery. After I dismissed the dialog, battery icon stayed red. So it was red before I start Firefox or any other app.
 
When I first booted Sierra, it gave me warning about battery. After I dismissed the dialog, battery icon stayed red. So it was red before I start Firefox or any other app.

Check early logs from ACPIBatteryManager.kext.
Maybe your DSDT is returning bad data early on...
 
I have checked my DSDT. I was using your patch from your repository. I only enabled second device for second battery. I have compared my DSDT and another user's who has very similar laptop and found following differences. Could you comment whether your patch is OK or should I also made those changes.

Your Patch Other User
======= =======
B1RA, 16, XRA0, 8,
XAR1, 8,
B1SC, 16, XSC0, 8,
XSC1, 8,
B1TM, 16, XTM0, 8,
XTM1, 8,
B1SE, 16, XSE0, 8,
XSE1, 8,
B1CI, 16, XCI0, 8,
XCI1, 8,
B1CV, 16, XCV0, 8,
XCV1, 8,
 
I have checked my DSDT. I was using your patch from your repository. I only enabled second device for second battery. I have compared my DSDT and another user's who has very similar laptop and found following differences. Could you comment whether your patch is OK or should I also made those changes.

Your Patch Other User
======= =======
B1RA, 16, XRA0, 8,
XAR1, 8,
B1SC, 16, XSC0, 8,
XSC1, 8,
B1TM, 16, XTM0, 8,
XTM1, 8,
B1SE, 16, XSE0, 8,
XSE1, 8,
B1CI, 16, XCI0, 8,
XCI1, 8,
B1CV, 16, XCV0, 8,
XCV1, 8,

Questions regarding correctness of ACPI patches require "Problem Reporting" files as identified in the FAQ.
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html
 
Questions regarding correctness of ACPI patches require "Problem Reporting" files as identified in the FAQ.
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html

I will try to answer each and every question in your FAQ then I will try to ask my question again.

Q. Where do I start?
As you see, I have attached my hardware details in my profile. As you can see it in my previous 2 message I also attached my clover files. Those Clover files include original ACPI files and patched ACPI files patched by your patches which comes from your repo located at https://github.com/RehabMan/Laptop-DSDT-Patch.

Q. Does Sierra 10.12.x work?
Yes Sierra 10.2.3 is currently installed and it is working.

Q. Is there a guide for my laptop?
There is no guide for my laptop. There is only one guide which is very similar to my laptop. I borrowed some ideas and clover patches from that one.

Q. Is my laptop compatible?
Yes my laptop is compatible

Q. My keyboard and/or trackpad are not working? How to fix?
My keyboard and trackpad is working thanks to VoodooPS2 ALPS fork.

Q. Audio is not working. How to fix?
My audio is working with AppleALC and DSDT patches

Q. Ethernet is not working. How to fix?
My ethernet is working. Thanks to Realtek kext

Q. WiFi/bluetooth is not working. How to fix?
My WiFi and bluetooth is working. Because I use compatible card AR5B195. Bluetooth is working with firmware loader

Q. Brightness controls are not working. How to fix?
My brightness controls are working

Q. Battery status is not working. How to fix?
My battery status is working but sometimes it gives me an error. Let me try to iterate again, I am using your patch for the battery which says it is compatible with my hardware. I assumed till today that this patch is complete. However your thread located at https://www.tonymacx86.com/threads/guide-how-to-patch-dsdt-for-working-battery-status.116102/ says that

Later releases of AppleACPIPlatform are unable to correctly access fields within the EC (embedded controller). This causes problems for ACPIBatteryManager as the various ACPI methods for battery fail (_BIF, _STA, _BST, etc). Although it is possible to use an older version of AppleACPIPlatform (from Snow Leopard), it is desirable to use the latest version of AppleACPIPlatform because with computers that have Ivy Bridge CPUs it enables native power management for those computers. To use the latest version, DSDT must be changed to comply with the limitations of Apple's AppleACPIPlatform.

In particular, any fields in the EC larger than 8-bit, must be changed to be accessed 8-bits at one time. This includes 16, 32, 64, and larger fields.

Your thread says that 16 bit fields must also be patched. However as I said before the patch you supply, doesn't patch the 16 bits that I mentioned. Therefore I am in dilemma whether your patch is complete or not that is why I pasted diff of battery fields with your patch and another user. As you can see from the diff, 16 bits fields are divided into 8 bit fields. That is why I asked whether I should keep it as it is or change all 16 bit fields to 8 bit fields.

I added my previous report files for easy access as well. https://www.tonymacx86.com/attachments/archive-zip.233520/

If there is any important question related to my battery I haven't addressed, please reply I will try to answer them all.
 
My battery status is working but sometimes it gives me an error.

What error?
Look in your system log for associated logs from debug ACPIBatteryManager.kext.

Your thread says that 16 bit fields must also be patched. However as I said before the patch you supply, doesn't patch the 16 bits that I mentioned.

Only multi-byte EC fields that are accessed need to be patched.
16-bit fields that are not accessed by the code do not need to be patched.

Note: Your ACPI setup is wrong. You cannot provide patched SSDT-1.aml without DropOem=true. And DropOem=true then requires all SSDTs to be placed in ACPI/patched. And then... must also use SortedOrder to specify SSDT load order. Currently, the system is ignoring your SSDT-1.aml as it will conflict with OEM SSDT-1.aml already injected.
 
Note: Your ACPI setup is wrong. You cannot provide patched SSDT-1.aml without DropOem=true. And DropOem=true then requires all SSDTs to be placed in ACPI/patched. And then... must also use SortedOrder to specify SSDT load order. Currently, the system is ignoring your SSDT-1.aml as it will conflict with OEM SSDT-1.aml already injected.

Thanks. Actually I don't need SSDT-1.aml anymore. Since it had GPU disabling code inside. I moved that code to DSDT.aml I believe that SSDT-BATC.dsl is loaded. Since it is not part of standard DSDT and shows combined battery status. SortedOrder also set. Should I add DropOem=true to config.plist ?

The error I am getting is "Your Mac will sleep soon unless you plugged into a power outlet" I think I have found the possible culprit for this error. This error comes from /System/Library/CoreServices/Menu Extras/Battery.menu This app calls BatteryExtra - (void)updateMenu from time to time. This function then calls BatteryExtra - (void)_updateBatteryWarningLevel to get warning level. This function calls IOPSGetBatteryWarningLevel. If result is kIOPSLowBatteryWarningFinal (3) it checks if BatteryWarningsDisabled is not set to true, this warning is displayed. I think Battery Driver shouldn't send low battery message, if the overall capacity isn't low.

Observations:
1. This glitch only happens from time to time.
2. It fixed itself after 5-10 minutes running on battery.
3. Also battery menu icon stopped updating itself for a long time. When I entered System Preferences/Energy Saver and clicked "Show battery status in menu bar" to enable and disable the bar, bar updated its value.

I will install debug version of your kext and will report when I get this error next time. Since it doesn't happen always, it may take a while.
 
Thanks. Actually I don't need SSDT-1.aml anymore. Since it had GPU disabling code inside. I moved that code to DSDT.aml I believe that SSDT-BATC.dsl is loaded. Since it is not part of standard DSDT and shows combined battery status. SortedOrder also set. Should I add DropOem=true to config.plist ?

The error I am getting is "Your Mac will sleep soon unless you plugged into a power outlet" I think I have found the possible culprit for this error. This error comes from /System/Library/CoreServices/Menu Extras/Battery.menu This app calls BatteryExtra - (void)updateMenu from time to time. This function then calls BatteryExtra - (void)_updateBatteryWarningLevel to get warning level. This function calls IOPSGetBatteryWarningLevel. If result is kIOPSLowBatteryWarningFinal (3) it checks if BatteryWarningsDisabled is not set to true, this warning is displayed. I think Battery Driver shouldn't send low battery message, if the overall capacity isn't low.

Observations:
1. This glitch only happens from time to time.
2. It fixed itself after 5-10 minutes running on battery.
3. Also battery menu icon stopped updating itself for a long time. When I entered System Preferences/Energy Saver and clicked "Show battery status in menu bar" to enable and disable the bar, bar updated its value.

I will install debug version of your kext and will report when I get this error next time. Since it doesn't happen always, it may take a while.

Check kernel logs from debug ACPIBatteryManager.kext.
The error is happening somewhere in your battery methods in DSDT...
You may also find ACPIDebug.kext useful.
 
Status
Not open for further replies.
Back
Top