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.