Closed the-darkvoid closed 6 years ago
FWIW -- this code/method works for my Lenovo T420 and Dell M4800.
If I'm correct, this eliminates the need to use first poll delay. I'm not sure tho...
The reasons for the battery tracker and complex figuring of AC vs. battery were added to support multiple battery scenarios better. But macOS/OS X really doesn't support multiple batteries well at all, so it is probably ok to dump the code as you have and go with this different method. I'll experiment with it.
Testing with abm_firstpolldelay=0. So far, I've had one instance of battery status not available at login (which is how you tell there is a problem), but it hasn't happened since. And that was with Mojave on APFS with TRIM enabled. Will try on a few different laptops and over more time.
Also worth testing is VirtualSMC.kext (instead of FakeSMC.kext) + SMCBatteryManager.kext (still need battery ACPI patches).
Merged. Build with these changes is 1.90.