Contribute
Register

Lenovo ThinkPad E440- El Capitan (Clover)

Status
Not open for further replies.
hi since i did the patch for the power mangment, this error is ocurring

...
0xffffff910b4abfb0 : 0xffffff80003f4896
Kernel Extensions in backtrace:
com.paragon-software.filesystems.ntfs(82.0)[D28EF3F5-8EBC-709B-594E-B32FFC8C2002]@0xffffff7f8225e000->0xffffff7f82292fff

As you can see, Paragon is a bad idea...
 
Hi, again sr. rehabman, a few days back i reinstall my laptop and start again.
- i install El capitan following your guide http://www.tonymacx86.com/el-capita...de-booting-os-x-installer-laptops-clover.html
- Patch my DSDT/SSDT following this guide https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
- Do the patch for native power managment following this guide https://www.tonymacx86.com/threads/guide-native-power-management-for-laptops.175801/
- Do the patch for battery Status following this guide https://www.tonymacx86.com/threads/guide-how-to-patch-dsdt-for-working-battery-status.116102/
- Do the patch for backlight control following this guide https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
- Do the patch for my AppleHDA following this guide http://www.insanelymac.com/forum/files/file/496-applehda-patcher/
http://www.insanelymac.com/forum/files/file/496-applehda-patcher/
So i have pretty much everything working (i think so?), but now i have a bug in my battery AC control, when arrive to 100% of charge, change to power adapter (everything normally), but past a minute change back to battery, i dont know what happen if you could help me. I tryed to find the code reference that you left me in post #25, but with out luck. So i left the everything according to Problem Reporting instructions. I hope you can help me. Regards

kextstat|grep -y acpiplat
13 2 0xffffff7f82470000 0x66000 0x66000 com.apple.driver.AppleACPIPlatform (4.0) 295F7A91-2DF7-3FFE-9550-A0C1A6F9D575 <12 11 7 6 5 4 3 1>

kextstat|grep -y appleintelcpu

kextstat|grep -y applelpc
72 0 0xffffff7f81e7f000 0x3000 0x3000 com.apple.driver.AppleLPC (3.1) 0C90B22D-637B-3000-8C44-B7955D57E10A <71 12 5 4 3>

kextstat|grep -y applehda
78 1 0xffffff7f82147000 0x1c000 0x1c000 com.apple.driver.AppleHDAController (272.50) 7A5FAC87-3715-3982-8CCC-D4FA619D62C3 <77 76 75 12 7 6 5 4 3 1>
112 0 0xffffff7f822c0000 0xb2000 0xb2000 com.apple.driver.AppleHDA (272.50) BD6DEC43-A9EF-39D5-B29F-F7F0534DF346 <111 96 78 77 76 75 6 5 4 3 1>

sudo touch /System/Library/Extensions && sudo kextcache -u /

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 RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_LPCSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_CPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_ACPISensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDAHardwareConfigDriver.kext
kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AppleHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
 

Attachments

  • CLOVER.zip
    1.9 MB · Views: 77
  • Randy’s MacBook Pro.ioreg.zip
    406.7 KB · Views: 58
  • RehabMan.zip
    38.3 KB · Views: 81
Hi, again sr. rehabman, a few days back i reinstall my laptop and start again.
- i install El capitan following your guide http://www.tonymacx86.com/el-capita...de-booting-os-x-installer-laptops-clover.html
- Patch my DSDT/SSDT following this guide https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
- Do the patch for native power managment following this guide https://www.tonymacx86.com/threads/guide-native-power-management-for-laptops.175801/
- Do the patch for battery Status following this guide https://www.tonymacx86.com/threads/guide-how-to-patch-dsdt-for-working-battery-status.116102/
- Do the patch for backlight control following this guide https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
- Do the patch for my AppleHDA following this guide http://www.insanelymac.com/forum/files/file/496-applehda-patcher/
So i have pretty much everything working (i think so?), but now i have a bug in my battery AC control, when arrive to 100% of charge, change to power adapter (everything normally), but past a minute change back to battery, i dont know what happen if you could help me. I tryed to find the code reference that you left me in post #25, but with out luck. So i left the everything according to Problem Reporting instructions. I hope you can help me. Regards

kextstat|grep -y acpiplat
13 2 0xffffff7f82470000 0x66000 0x66000 com.apple.driver.AppleACPIPlatform (4.0) 295F7A91-2DF7-3FFE-9550-A0C1A6F9D575 <12 11 7 6 5 4 3 1>

kextstat|grep -y appleintelcpu

kextstat|grep -y applelpc
72 0 0xffffff7f81e7f000 0x3000 0x3000 com.apple.driver.AppleLPC (3.1) 0C90B22D-637B-3000-8C44-B7955D57E10A <71 12 5 4 3>

kextstat|grep -y applehda
78 1 0xffffff7f82147000 0x1c000 0x1c000 com.apple.driver.AppleHDAController (272.50) 7A5FAC87-3715-3982-8CCC-D4FA619D62C3 <77 76 75 12 7 6 5 4 3 1>
112 0 0xffffff7f822c0000 0xb2000 0xb2000 com.apple.driver.AppleHDA (272.50) BD6DEC43-A9EF-39D5-B29F-F7F0534DF346 <111 96 78 77 76 75 6 5 4 3 1>

sudo touch /System/Library/Extensions && sudo kextcache -u /

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 RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_LPCSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_CPUSensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_ACPISensors.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDAHardwareConfigDriver.kext
kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AppleHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext

https://github.com/RehabMan/Laptop-DSDT-Patch/issues/23

Note that this same issue is already identified in the battery patching guide... (why do people not read?)
 
Sorry, i forgot the tell you that i also try this fix, but those not work, when y paste it in MaciASL do nothing. Any suggestion???.
 
Sorry, i forgot the tell you that i also try this fix, but those not work, when y paste it in MaciASL do nothing. Any suggestion???.

You will need to debug/analyze/code review your _BST method. Probably same issue, slightly different code there.

Likely flawed logic here:
Code:
                    Method (GBST, 4, NotSerialized)
                    {
...
                        If (And (Arg1, 0x20))
                        {
                            Store (0x02, Local0)
                        }
                        ElseIf (And (Arg1, 0x40))
                        {
                            Store (One, Local0)
                        }
                        Else
                        {
                            Store (Zero, Local0)
                        }

ACPIDebug.kext can be useful in debugging the logic of the method. As well as the log output from the debug version of ACPIBatteryManager.kext.

Depending on the specifics... you might be able to implement a work around in ACPIBatteryManager.kext itself...

For example, something like this:
Code:
SPEEDY-NUC:battery.git rehabman$ git diff
diff --git a/AppleSmartBatteryManager/AppleSmartBattery.cpp b/AppleSmartBatteryManager/AppleSmartBattery.cpp
index cf7d615..5579de4 100644
--- a/AppleSmartBatteryManager/AppleSmartBattery.cpp
+++ b/AppleSmartBatteryManager/AppleSmartBattery.cpp
@@ -1622,6 +1622,10 @@ IOReturn AppleSmartBattery::setBatteryBST(OSArray *acpibat_bst)
         }
     }

+    // discharging, but at zero rate is impossible... (correcting logic flaw in some ACPI implementations)
+    if ((currentStatus & BATTERY_DISCHARGING) && !fCurrentRate)
+        currentStatus &= ~BATTERY_DISCHARGING;
+
     if (currentStatus ^ fStatus)
     {
         // The battery has changed states
 
Last edited:
Due to my lack of experience and knowledge in this programming language I have only been able to trace the code, I have not been able to make any changes that were worthwhile and that solved the problem.

Here is my debugin code efforts.

With 99% load almost 100% and connected to the power supply.

11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x26, } ">11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6: 07: 02,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
... ..
11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x26, } ">11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge, change to Battery Power

11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}

Full Charge change to Power Adapter

11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:20:20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:20:20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge change to Battery Power
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: 0x46
Arg1", 0x46, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}

Full Charge change to Power Adapter

11/17/16 6:21:20 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge change to Battery Power

11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: 0x46
Arg1", 0x46, } ">11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,


Testing now without the power adapter plugged in

11/17/16 6:23:04 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6: 23: 34,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:24:04 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6: 24: 04,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6: 24: 04,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6: 24: 04.000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:24:34,000 PM kernel [0]: ACPIDebug: "Entering GBST"

It can be seen only enters the first conditional when the power adapter is connected and is being charged.
It enters the second conditional when it reaches 100% load and the power adapter is connected or when it does not have the power adapter.
It never reaches the third conditional or the final (else).

As you can see I have only been able to determine that, and with my lack of knowledge it is impossible to fix it since I do not enter the syntax or most of the code.

I hope this information can be useful and can help me find an answer.
 
Due to my lack of experience and knowledge in this programming language I have only been able to trace the code, I have not been able to make any changes that were worthwhile and that solved the problem.

Here is my debugin code efforts.

With 99% load almost 100% and connected to the power supply.

11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x26, } ">11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6: 07: 02,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6: 07: 02.000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
... ..
11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x26, } ">11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:18:19:00 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge, change to Battery Power

11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:18:49,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}

Full Charge change to Power Adapter

11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:19:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6: 20: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:20:20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:20:20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge change to Battery Power
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: 0x46
Arg1", 0x46, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}

Full Charge change to Power Adapter

11/17/16 6:21:20 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6: 21: 20,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: 0x26
Arg1", 0x26, } ">11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x26}
11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Arg1", 0x26,}
", 0x2, } ">11/17/16 6:21:50,000 PM kernel [0]: ACPIDebug: { "First if, the value of Local0 ->", 0x2,}

Full Charge change to Battery Power

11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: 0x46
Arg1", 0x46, } ">11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6: 22: 20,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,


Testing now without the power adapter plugged in

11/17/16 6:23:04 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:23:04 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46,}
11/17/16 6: 23: 34,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:23:34:00 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:24:04 PM kernel [0]: ACPIDebug: "Entering GBST"
Arg1", 0x46, } ">11/17/16 6: 24: 04,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6: 24: 04,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6: 24: 04.000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}
11/17/16 6:24:34,000 PM kernel [0]: ACPIDebug: "Entering GBST"

It can be seen only enters the first conditional when the power adapter is connected and is being charged.
It enters the second conditional when it reaches 100% load and the power adapter is connected or when it does not have the power adapter.
It never reaches the third conditional or the final (else).

As you can see I have only been able to determine that, and with my lack of knowledge it is impossible to fix it since I do not enter the syntax or most of the code.

I hope this information can be useful and can help me find an answer.

It is not possible to provide analysis without seeing the associated code.
And you will also find the output from the debug ACPIBatteryManager.kext useful.
Read the ACPI spec and the code in ACPIBatteryManager.kext so you know what the ACPI methods should be doing.

Also, you should try my ACPIBatteryManager code change mentioned in my previous post.
 
It is not possible to provide analysis without seeing the associated code.

this is the method GBST
Code:
 Method (GBST, 4, NotSerialized)
                    {
                        Acquire (BATM, 0xFFFF)
                        \RMDT.P2("Inside Method GBST -> Arg1", Arg1)
                        If (And (Arg1, 0x20) | 0x00)
                        {
                            \RMDT.P2("First if, el valor de Arg1", Arg1)
                            Store (0x02, Local0)
                            \RMDT.P2("First if, el valor de Local0 ->", Local0)
                        }
                        ElseIf (And (Arg1, 0x40))
                        {
                            \RMDT.P2("Second if, el valor de Arg1", Arg1)
                            Store (0x01, Local0)
                            \RMDT.P2("Second if, el valor de Local0 ->", Local0)
                        }
                        Else
                        {
                            \RMDT.P2("Last if, el valor de Arg1", Arg1)
                            Store (0x00, Local0)
                            \RMDT.P2("Last if, el valor de Local0 ->", Local0)
                        }

                        If (LEqual (And (Arg1, 0x07), 0x07))
                        {
                            Store (0x04, Local0)
                            Store (0x00, Local1)
                            Store (0x00, Local2)
                            Store (0x00, Local3)
                        }
                        Else
                        {
                            Store (Arg0, HIID)
                            Store (B1B2(BV00,BV01), Local3)
                            If (Arg2)
                            {
                                Multiply (B1B2(BR00,BR01), 0x0A, Local2)
                            }
                            Else
                            {
                                Store (B1B2(BR00,BR01), Local2)
                            }

                            Store (B1B2(BA00,BA01), Local1)
                            If (LGreaterEqual (Local1, 0x8000))
                            {
                                If (And (Local0, 0x01))
                                {
                                    Subtract (0x00010000, Local1, Local1)
                                }
                                Else
                                {
                                    Store (0x00, Local1)
                                }
                            }
                            ElseIf (LNot (And (Local0, 0x02)))
                            {
                                Store (0x00, Local1)
                            }

                            If (Arg2)
                            {
                                Multiply (Local3, Local1, Local1)
                                Divide (Local1, 0x03E8, Local7, Local1)
                            }
                        }

                        Store (Local0, Index (Arg3, 0x00))
                        Store (Local1, Index (Arg3, 0x01))
                        Store (Local2, Index (Arg3, 0x02))
                        Store (Local3, Index (Arg3, 0x03))
                        Release (BATM)
                        Return (Arg3)
                    }

this is the _BST
Code:
Method (_BST, 0, NotSerialized)  // _BST: Battery Status
                        {
                            XOr (DerefOf (Index (BT0I, 0x00)), 0x01, Local0)
                            \RMDT.PUSH("Entering GBST")
                            \RMDT.P1(HB0S)
                            Return (GBST (0x00, HB0S, Local0, BT0P))
                        }

And you will also find the output from the debug ACPIBatteryManager.kext useful.
How i can get the output, can you linked me a guide or something (maybe I'm blind already:banghead::crazy:)

Read the ACPI spec and the code in ACPIBatteryManager.kext so you know what the ACPI methods should be doing.

Also, you should try my ACPIBatteryManager code change mentioned in my previous post.

I'm reading the ACPI spec right now, i will try to change the code in ACPIBatteryManager, let see what happens:roll2:
 
this is the method GBST
Code:
 Method (GBST, 4, NotSerialized)
                    {
                        Acquire (BATM, 0xFFFF)
                        \RMDT.P2("Inside Method GBST -> Arg1", Arg1)
                        If (And (Arg1, 0x20) | 0x00)
                        {
                            \RMDT.P2("First if, el valor de Arg1", Arg1)
                            Store (0x02, Local0)
                            \RMDT.P2("First if, el valor de Local0 ->", Local0)
                        }
                        ElseIf (And (Arg1, 0x40))
                        {
                            \RMDT.P2("Second if, el valor de Arg1", Arg1)
                            Store (0x01, Local0)
                            \RMDT.P2("Second if, el valor de Local0 ->", Local0)
                        }
                        Else
                        {
                            \RMDT.P2("Last if, el valor de Arg1", Arg1)
                            Store (0x00, Local0)
                            \RMDT.P2("Last if, el valor de Local0 ->", Local0)
                        }

                        If (LEqual (And (Arg1, 0x07), 0x07))
                        {
                            Store (0x04, Local0)
                            Store (0x00, Local1)
                            Store (0x00, Local2)
                            Store (0x00, Local3)
                        }
                        Else
                        {
                            Store (Arg0, HIID)
                            Store (B1B2(BV00,BV01), Local3)
                            If (Arg2)
                            {
                                Multiply (B1B2(BR00,BR01), 0x0A, Local2)
                            }
                            Else
                            {
                                Store (B1B2(BR00,BR01), Local2)
                            }

                            Store (B1B2(BA00,BA01), Local1)
                            If (LGreaterEqual (Local1, 0x8000))
                            {
                                If (And (Local0, 0x01))
                                {
                                    Subtract (0x00010000, Local1, Local1)
                                }
                                Else
                                {
                                    Store (0x00, Local1)
                                }
                            }
                            ElseIf (LNot (And (Local0, 0x02)))
                            {
                                Store (0x00, Local1)
                            }

                            If (Arg2)
                            {
                                Multiply (Local3, Local1, Local1)
                                Divide (Local1, 0x03E8, Local7, Local1)
                            }
                        }

                        Store (Local0, Index (Arg3, 0x00))
                        Store (Local1, Index (Arg3, 0x01))
                        Store (Local2, Index (Arg3, 0x02))
                        Store (Local3, Index (Arg3, 0x03))
                        Release (BATM)
                        Return (Arg3)
                    }

this is the _BST
Code:
Method (_BST, 0, NotSerialized)  // _BST: Battery Status
                        {
                            XOr (DerefOf (Index (BT0I, 0x00)), 0x01, Local0)
                            \RMDT.PUSH("Entering GBST")
                            \RMDT.P1(HB0S)
                            Return (GBST (0x00, HB0S, Local0, BT0P))
                        }


How i can get the output, can you linked me a guide or something (maybe I'm blind already:banghead::crazy:)



I'm reading the ACPI spec right now, i will try to change the code in ACPIBatteryManager, let see what happens:roll2:

These are battery status values:
Code:
#define BATTERY_CHARGED 0
#define BATTERY_DISCHARGING 1
#define BATTERY_CHARGING 2
#define BATTERY_CRITICAL 4

As here:
Full Charge change to Battery Power
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: "Entering GBST"
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: 0x46
Arg1", 0x46, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Inside Method GBST -> Arg1", 0x46}
11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Arg1", 0x46,}
", 0x1, } ">11/17/16 6:20:50,000 PM kernel [0]: ACPIDebug: { "Second if, the value of Local0 ->", 0x1,}

Is wrong... The Local0=0x01 eventually goes to battery status. And 1 means discharging. Correct transition when battery is full, still connected to AC (not discharging, not charging) is to battery status 0 (BATTERY_CHARGED).

Assuming currentRate is zero when that happens, the workaround for this ACPI non-compliant code (that mention for ACPIBatteryManager.kext) should fix it...

But you could also fix the _BST code too... Let me know if the ACPIBatteryManager work around works for it, and I'll consider including the fix in a future build.
 
Assuming currentRate is zero when that happens, the workaround for this ACPI non-compliant code (that mention for ACPIBatteryManager.kext) should fix it...

I already add the code to the driver, but i don't have the proper build environment, you could help me to get the driver whit that fix??

But you could also fix the _BST code too

Also i would like to know how to fix the _BST.
 
Status
Not open for further replies.
Back
Top