Contribute
Register

Lenovo ThinkPad E440- El Capitan (Clover)

Status
Not open for further replies.
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??

It can be a bit tricky to setup Xcode with the proper SDK...
See attached:
 

Attachments

  • RehabMan-Battery-2016-1118.zip
    44.7 KB · Views: 78
The new driver works perfectly :headbang::headbang:, it detects the status changes correctly:clap::clap:, thank you very much:mrgreen::mrgreen:
 
The new driver works perfectly :headbang::headbang:, it detects the status changes correctly:clap::clap:, thank you very much:mrgreen::mrgreen:

Note that it was actually detecting the status changes "more correctly" prior to this fix... it is just that your DSDT is giving false/incorrect status changes. :)
 
Note that it was actually detecting the status changes "more correctly" prior to this fix... it is just that your DSDT is giving false/incorrect status changes. :)
So this means that the fix isn't right?? will be a better solution to correct the DSDT?? What changes will be necessary to perform in DSDT to get the correct status changes???
 
So this means that the fix isn't right?? will be a better solution to correct the DSDT?? What changes will be necessary to perform in DSDT to get the correct status changes???

The fix is fine for your system. I'm more worried about the work around in ACPIBatteryManager.kext causing a problem with a system that has a correct DSDT. Time will tell, but probably the worst that could happen is a slightly delayed detection of AC adapter unplugged.

If you want to fix your DSDT, you would have to find and correct the logic bug within it.
 
The fix is fine for your system. I'm more worried about the work around in ACPIBatteryManager.kext causing a problem with a system that has a correct DSDT. Time will tell, but probably the worst that could happen is a slightly delayed detection of AC adapter unplugged.

You are right there is a small delay (2 second maybe) when the AC adapter is disconnected, is this a serious problem?

If you want to fix your DSDT, you would have to find and correct the logic bug within it.

I will try to correct it, so i wonder if you could help me to understand the syntax and guide me to solve the issue. I have a few questions now
- what means the
Code:
If (And (Arg1,0x02) ) {....}
? i have an idea but I'm not pretty sure
- It is possible create a syntax like the one in the kext fix
Code:
if ((currentStatus & BATTERY_DISCHARGING) && !fCurrentRate)
       currentStatus &= ~BATTERY_DISCHARGING;
if it is possible how would be?
 
You are right there is a small delay (2 second maybe) when the AC adapter is disconnected, is this a serious problem?

Would require analysis of the debug output from ACPIBatteryManager.kext.
Some ECs do not transition status to battery right away.

I will try to correct it, so i wonder if you could help me to understand the syntax and guide me to solve the issue. I have a few questions now
- what means the If (And (Arg1,0x02) ) {....}? i have an idea but I'm not pretty sure

It tests for bit 1 (zero based bit numbering) being set in Arg1.

- It is possible create a syntax like the one in the kext fix
if ((currentStatus & BATTERY_DISCHARGING) && !fCurrentRate)
currentStatus &= ~BATTERY_DISCHARGING;
if it is possible how would be?

I think if you look at the code carefully, you'll see that Local0 is where the status is... eventually placed into the return package at position 0 (which is where the charging/discharging status is, per ACPI spec).

So you only have to determine why it is set to 1 instead of zero when battery is fully charged.
 
Status
Not open for further replies.
Back
Top