Contribute
Register

<< Solved >> OpenCore battery patch

Joined
Nov 25, 2017
Messages
63
Motherboard
Toshiba Tecra Z50-C
CPU
i7-6600U
Graphics
HD 520
Mobile Phone
  1. Android
  2. iOS
  3. Other
I'm also having a bizarre battery issue that I believe is ACPI related but have no idea how to get past it. Currently with my setup, quick polling never is enabled. (Not with ACPIBatteryManager nor SMCBatteryManager)
I'm still troubleshooting things for the moment, but I'd love to pick your brain @BlvckBytes.
 
Joined
Aug 12, 2020
Messages
16
Motherboard
HP Elitebook 850 g3-OC
CPU
i5-6200U
Graphics
HD 520
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hello, guys!

// Comment:

If you need any help, just post your native DSDT along with an existing rehabman patch, if it exists. Otherwise, I'll try to patch it from scratch. If you want me to implement it properly, post your EFI folder aswell.

I will help as many people as possible!

My solution was: https://www.tonymacx86.com/threads/opencore-battery-patch.295289/post-2101803

I am working on getting my laptop up and running with OpenCore, switching from clover right now... What works: Audio, USB, USBC (Data + External Monitors), Trackpad, Touchscreen, WiFi & BT. What doesn't: My DAMN battery indicator...

// Note: DO NOT follow this immense amount of GARBAGE I did below, it will only screw your system up. Scroll down further, I have this solved, use the other approach instead. (https://www.tonymacx86.com/threads/opencore-battery-patch.295289/post-2101803)

This patch works 100% for my laptop (with clover, patching DSDT): https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/battery/battery_Razer-Blade-2014.txt

I tried my BEST to get this working in OpenCore. What I came up with (step by step, so you get my train of thought right now):
* Renamed eisaID PNP0C0A to PNP0C99 (to disable DSDT BAT0 hooking from SMCBattery)
* Renamed Device BAT0 to BATX (to don't have overlapping names in same scope)
* Renamed eisaID PNP0C0D to PNP0C98 (to disable DSDT LID0 hooking from SMCBattery)
* Renamed Device LID0 to LIDX (to don't have overlapping names in same scope)
* Renamed eisaID PNP0C09 to PNP0C00 (to disable DSDT EC0 hooking from AppleACPIEC)

Then, I re-defined those devices in SSDTs. The SSDT-EC contains EC, LID0 and BAT0, copied from the Clover DSDT which got patched with the above patch from RehabMan. I added the External lines, which should point to the correct resources in main DSDT, at least I hope I did it correctly.

Now - what's the outcome? I actually got a battery indicator! And it goes down! But - it just does not go up or show the charging bolt symbol, so it's partially corruped. I have no further ideas, since my knowledge is very limited in the ASL language.

Attached: My OC EFI, my IOREG and my origin from clover - already run through iasl decompile.

Please - if someone has any ideas - help me out here, I would be so happy if open core would finally be complete - I'm pretty close! :)
Thank you lots!
Hello i need help with this, i cant add my dsdt to my efi bc it will cause an error at boot. I have prebuilt efi for my Elitebook 850 g3.
 
Joined
Mar 8, 2017
Messages
745
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@kvmKillerman

Have you tried ECEnabler.kext? Google it up real quick, it substitutes all field-splitting related patches, so disable them when loading the kext.
 
Joined
Aug 12, 2020
Messages
16
Motherboard
HP Elitebook 850 g3-OC
CPU
i5-6200U
Graphics
HD 520
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
@kvmKillerman

Have you tried ECEnabler.kext? Google it up real quick, it substitutes all field-splitting related patches, so disable them when loading the kext.
My acpi and kext folders look like this, so you say i need to disable some of the kexts and i dont have to have dsdt in order to get battery percentage showing and brightness slider working?
 

Attachments

  • Näyttökuva 2021-12-3 kello 17.46.41.png
    Näyttökuva 2021-12-3 kello 17.46.41.png
    1.1 MB · Views: 4
  • Näyttökuva 2021-12-3 kello 17.46.53.png
    Näyttökuva 2021-12-3 kello 17.46.53.png
    987.3 KB · Views: 3
Joined
Mar 8, 2017
Messages
745
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@kvmKillerman

ACPIBatteryManager and SMCBatteryManager will clash, obviously, remove the former. Don't load SMCLightSensor if you have no sensor built-in.

ACPI folder looks good, although I have no way of telling what SSDT-840G3 is all about. Also, share your whole EFI folder if you want me to be able to really make judgememts.
 
Joined
Aug 12, 2020
Messages
16
Motherboard
HP Elitebook 850 g3-OC
CPU
i5-6200U
Graphics
HD 520
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
@kvmKillerman

ACPIBatteryManager and SMCBatteryManager will clash, obviously, remove the former. Don't load SMCLightSensor if you have no sensor built-in.

ACPI folder looks good, although I have no way of telling what SSDT-840G3 is all about. Also, share your whole EFI folder if you want me to be able to really make judgememts.
Ummm... So what do i do, can you please do like 1. 2. 3. step by step guide bc im still littlebit new with all of this. Here is my efi, i removed platform id bc i dont want to share that part of it

EDIT:

I have some sort of lightsensor on the laptop i guess that shows those blinking lights but i guess that kext is not for that then?
 

Attachments

  • EFI NO ID.zip
    31.3 MB · Views: 5
Last edited:

Feartech

Moderator
Joined
Aug 3, 2013
Messages
24,374
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
Ummm... So what do i do, can you please do like 1. 2. 3. step by step guide bc im still littlebit new with all of this. Here is my efi, i removed platform id bc i dont want to share that part of it

EDIT:

I have some sort of lightsensor on the laptop i guess that shows those blinking lights but i guess that kext is not for that then?
please update your hardware profile to allow others to help you easier

please read the faq for proper hardware profile setup:
 
Joined
Mar 8, 2017
Messages
745
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@kvmKillerman

If you want to have a working hackintosh you'll need to get into things at least to a certain degree... Your whole setup is a steaming mess tbh, and it would take quite some time to clean it up.

SMCLightSensor doesn't mean any status-leds, but rather an ambient light sensor for adaptive brightness. Check if you have it, if not, remove the kext. Also remove ACPIBatteryManager.kext, as it's legacy and only conflicts with SMCBatteryManager.kext.

You have EC region patches within SSDT-840G3.aml, with corresponding renames in the plist. That file seems like one of those "do it all", which is horrible. But just leave it as is for now, and try to remove the mentioned kexts. Otherwise, we'll have to pull out all that EC patching and let ECEnabler do it's work properly.
 
Joined
Aug 12, 2020
Messages
16
Motherboard
HP Elitebook 850 g3-OC
CPU
i5-6200U
Graphics
HD 520
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
@kvmKillerman

If you want to have a working hackintosh you'll need to get into things at least to a certain degree... Your whole setup is a steaming mess tbh, and it would take quite some time to clean it up.

SMCLightSensor doesn't mean any status-leds, but rather an ambient light sensor for adaptive brightness. Check if you have it, if not, remove the kext. Also remove ACPIBatteryManager.kext, as it's legacy and only conflicts with SMCBatteryManager.kext.

You have EC region patches within SSDT-840G3.aml, with corresponding renames in the plist. That file seems like one of those "do it all", which is horrible. But just leave it as is for now, and try to remove the mentioned kexts. Otherwise, we'll have to pull out all that EC patching and let ECEnabler do it's work properly.
I cleaned up my kexts folder a little and did those you asked, after that i made the changes to my plist by doinf oc snapshot and oc clean snapshot so those automaticly removes missing paths right?

Still no success with battery percentage or the brightness slider. Sooo... Whats the next step i should do?

Here is new pic from my kexts folder:
 

Attachments

  • Näyttökuva 2021-12-4 kello 14.17.40.png
    Näyttökuva 2021-12-4 kello 14.17.40.png
    288.4 KB · Views: 3

Feartech

Moderator
Joined
Aug 3, 2013
Messages
24,374
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
I cleaned up my kexts folder a little and did those you asked, after that i made the changes to my plist by doinf oc snapshot and oc clean snapshot so those automaticly removes missing paths right?

Still no success with battery percentage or the brightness slider. Sooo... Whats the next step i should do?

Here is new pic from my kexts folder:
zip and upload your OC folder would be better than posting a picture of your kexts
 
Top