1Revenger1 Posted May 1, 2021 Share Posted May 1, 2021 (edited) Over the past few days, I've been working on ECEnabler, with u/midi1996's help with testing. ECEnabler is a Lilu plugin which allows macOS to read any size of EC field, meaning that no more ACPI patches are needed to split EC fields up within ACPI. I got tired of trying to make a complicated automated ACPI battery patcher (like SSDTTime), especially when dealing with all different vendors. I eventually had the idea to try patching macOS instead, which turns out to be much easier. Hopefully this saves you guys a little time with not having to go through Rehabman's patching guide Link: https://github.com/1Revenger1/ECEnabler Obligatory picture showing it working: There are a few caveats to this plugin: You may still need ACPI patches to combine data from 2 batteries This plugin will not help some devices such as the Surface Pro 7 which don't use ACPI Operating Regions/Fields to get their battery info. Supported macOS versions: Mac OS X Lion (10.7) through macOS Ventura (13) Edited July 4, 2022 by 1Revenger1 Ventura 11 3 Link to comment Share on other sites More sharing options...
Andrey1970 Posted May 1, 2021 Share Posted May 1, 2021 3 hours ago, 1Revenger1 said: Unfortunately doesn't work in macOS Lion, since Lilu doesn't support that version. We've tested from Mountain Lion all the way to Big Sur though and have had great success. Lilu supported 10.6+ (not all APIs will be functional). https://github.com/acidanthera/Lilu/commit/244a51a957ee49f1a60dec9cd680ea0e2fdafcd3 Link to comment Share on other sites More sharing options...
1Revenger1 Posted May 1, 2021 Author Share Posted May 1, 2021 27 minutes ago, Andrey1970 said: Lilu supported 10.6+ (not all APIs will be functional). https://github.com/acidanthera/Lilu/commit/244a51a957ee49f1a60dec9cd680ea0e2fdafcd3 I did test with the "-liluforce" boot arg in 10.7, and it does appears to apply the patches correctly (though I don't have an old enough device to test with that has a working EC). Without "-liluforce" though, Lilu disables itself, and breaks ECEnabler, so I figured it was safer to just say it was unsupported. Attached is the log without "-liluforce" log.txt Link to comment Share on other sites More sharing options...
vit9696 Posted May 2, 2021 Share Posted May 2, 2021 That's a bug, best to always be reported to bugtracker. Fixed in master. Link to comment Share on other sites More sharing options...
1Revenger1 Posted May 2, 2021 Author Share Posted May 2, 2021 6 minutes ago, vit9696 said: That's a bug, best to always be reported to bugtracker. Fixed in master. Wasn't aware it was a bug, sorry. I've just tested on my system though, and it works in 10.7. I'll update the readme and post, thanks! 1 Link to comment Share on other sites More sharing options...
makk Posted May 5, 2021 Share Posted May 5, 2021 Thank you! Question: just drop this in EFI? What patches are you referring to? 1 SSDT-EC.aml 2 EC0 to EC rename 3 SSDT-USBX-EC.am. 4 Battery patches in ACPI>DSDT>Patches Link to comment Share on other sites More sharing options...
1Revenger1 Posted May 7, 2021 Author Share Posted May 7, 2021 On 5/5/2021 at 3:09 PM, makk said: 1 SSDT-EC.aml 2 EC0 to EC rename 3 SSDT-USBX-EC.am. 4 Battery patches in ACPI>DSDT>Patches You still need a device named EC to boot Catalina+, so you still need SSDT-EC or SSDT-USBX-EC (my preference is to use those over EC0 to EC rename) Battery patches which split read/writes to 'Field Units' (Values within ACPI Fields) greater than 8 bits in size can be dropped now. SMCBatteryManager/ACPIBatteryManager and Lilu are both required. 1 Link to comment Share on other sites More sharing options...
makk Posted May 7, 2021 Share Posted May 7, 2021 (edited) 5 hours ago, 1Revenger1 said: You still need a device named EC to boot Catalina+, so you still need SSDT-EC or SSDT-USBX-EC (my preference is to use those over EC0 to EC rename) Battery patches which split read/writes to 'Field Units' (Values within ACPI Fields) greater than 8 bits in size can be dropped now. SMCBatteryManager/ACPIBatteryManager and Lilu are both required. Thanks Rev I'm unsure what is above 8bits in my config.plist ACPI>Patch 38 or so patches Can you look at my config.plist config.plist.zip SSDT-4x0G2b.aml.zip Edited May 7, 2021 by makk Link to comment Share on other sites More sharing options...
Allan Posted May 11, 2021 Share Posted May 11, 2021 @1Revenger1 congrats for your work. I've moved your topic to a appropriate area: Lilu and plugins Link to comment Share on other sites More sharing options...
eugene28 Posted December 30, 2021 Share Posted December 30, 2021 What a great plugin. Many thanks for sharing! Link to comment Share on other sites More sharing options...
makk Posted February 4, 2022 Share Posted February 4, 2022 (edited) 1Revenger1 Finally have the ECEnabler up. the issue I'm having now, EHO1 is not loading. XHC is handling both USB2 and USB3 attached are some configurations files if you have time to glance at them? Thanks! it is great! Edited February 22, 2022 by makk Link to comment Share on other sites More sharing options...
makk Posted February 22, 2022 Share Posted February 22, 2022 (edited) Greetings @1Revenger1 , What order should this be in ECEnabler in the Kernel? and what do you recommend the order in ACPI as well for the other SSDT's as I am not sure where to place it? Where should I put ECEnabler? I have Lilu, VirtualSMC, ECEnabler, SMCBattery, Whatevergreen, AppleALC, in this order specifically. ACPI's ssdt_data.aml, SSDT-USB-reset.aml, SSDT-EC-LAPTOP.aml, and then a specific hot patch. I had to understand the renaming scheme that was done originally for Clover. I was missing the part where there is no need to rename the old school way for the new Opencore, Lilu and plugins. Completely missed the boat.j Thank you for this work! It is truly nice to have! config.plist.zip Edited February 22, 2022 by makk 1 Link to comment Share on other sites More sharing options...
1Revenger1 Posted February 22, 2022 Author Share Posted February 22, 2022 (edited) Order doesn't matter as long as it's after Lilu. ACPI order doesn't matter either unless your SSDTs depend on stuff from another SSDT. Edited February 22, 2022 by 1Revenger1 1 Link to comment Share on other sites More sharing options...
makk Posted February 23, 2022 Share Posted February 23, 2022 (edited) Greetings 1Rev, Here are the files. Opencore 0.7.7 Release Monterey 12.2 SIP Enabled (all) Gatekeeper Disabled FileVault disabled AppleSecureBoot disabled Took out the VoodooRMI and VoodooSMBus kexts out for the time being Thank you! Take a look. The SSDT-4x0G2b.aml has SBUS in it from the get go and updated that portion of it using the Patches in MaciASL (Intel Series 9 chipset) from the and added DTGP which was not present. Originally was on Clover that came with the Project version 4071R which Rehabman modified to work with High Sierra and Mojave. Quite extensive project and has many ASL's. As mentioned afore, kextstat | grep SMBus <> reveals IOSMBusFamily, AppleSMBusController Looking at the System DSDT reveals I2CE AppleSMBusPCI is not loading. Should this be loading? If so what is the fix to get it to load? SSDT-4x0G2b.aml.zip config.plist.zip dmesg.txt.zip ACPIlog.txt.zip kernellog.txt.zip MacBook Pro.zip Edited February 23, 2022 by makk Link to comment Share on other sites More sharing options...
Recommended Posts