Looking for help debugging some ACPI issues with SMCBatteryManager. Any ACPI/C++ gurus out there?

I'll make a very long story as short as possible:

Skylake Laptop (OC 0.7.3, Big Sur)

TL;DR: ACPI State Changes (SCI events) aren't triggering quick polling in SMCBatteryManager. The result of this is once my battery charges to 100% and the OS registers the charging is complete, polling stops (Expected behavior). The issue is that because there are no state changes registered in ACPI, when I unplug after reaching 100%, my battery state never changes (polling gets turned off once the battery is fully charged).

Additional info:

Another side effect is that my battery only updates once every 60 seconds. SMCBatteryManager will quickPoll each second for 60 seconds when a change is made, and revert to polling once every minute, however since that doesn't happen my battery state changes only happen once a minute.

I've been trying to nail this down since my ACPI programmatically DOES work in other OS's, but SMCBatteryManager simply won't pick them up. Polling resumes after I resume from sleep, so I know that TGPE (Method for refreshing hardware status changes in my DSDT) does get called when waking up.

If anyone out there is interested in helping, I would hugely appreciate it. If I/we are able to figure out what's going wrong, I'll happily submit the bug to acidanthera to make sure it's addressed in the next build of SMCBatteryManager/VirtualSMC. I'd just like to learn how to debug something like this. I do know how to read/write C++ and was tempted to just manually build my own version of VirtualSMC to accommodate my specific machine but I need help nailing down exactly what's wrong. (Root cause, not just address the symptom without creating new side effects)

edit - all standard OpenCore troubleshooting has already been done. ECEnabler doesn't apply due to my battery being a directly-exposed device with only 8-bit registers. In addition, all other battery functions are indeed working fine. It's just the issue with quickPolling that's causing my current issues.

submitted by /u/enigmahack
[link] [comments]