RehabMan / OS-X-ACPI-Battery-Driver

Implements an Advanced Configuration and Power Interface (ACPI) based battery manager kernel extension (kext/driver) for non-Apple laptops running OS X.
Other
178 stars 58 forks source link

Refactor #30

Closed the-darkvoid closed 6 years ago

the-darkvoid commented 6 years ago
tluck commented 6 years ago

FWIW -- this code/method works for my Lenovo T420 and Dell M4800.

the-braveknight commented 6 years ago

If I'm correct, this eliminates the need to use first poll delay. I'm not sure tho...

RehabMan commented 6 years ago

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.

RehabMan commented 6 years ago

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.

RehabMan commented 6 years ago

Also worth testing is VirtualSMC.kext (instead of FakeSMC.kext) + SMCBatteryManager.kext (still need battery ACPI patches).

RehabMan commented 6 years ago

Merged. Build with these changes is 1.90.