Jump to content

[Kext] ECEnabler 1.0.2 - Instant battery status (sorta)


1Revenger1
 Share

9 posts in this topic

Recommended Posts

Posted (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:
r/hackintosh - ECEnabler: No more ACPI patches for battery! (Sorta)

There are a few caveats to this plugin:

  1. You may still need ACPI patches to combine data from 2 batteries
  2. 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 Monterey (12)

Edited by 1Revenger1
Change supported versions
  • Like 8
  • Thanks 3
Link to comment
Share on other sites

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

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

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!

  • Like 1
Link to comment
Share on other sites

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

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.

 

Link to comment
Share on other sites

Posted (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 by makk
Link to comment
Share on other sites

  • Allan pinned this topic
  • 1Revenger1 changed the title to [Kext] ECEnabler 1.0.2 - Instant battery status (sorta)
 Share

×
×
  • Create New...