jsassu20 / OpenCore-HotPatching-Guide

https://github.com/daliansky/OC-little | Daliansky's guide Translated into English
67 stars 18 forks source link

Can you help me create battery supplementation SSDT #6

Open Human79 opened 3 years ago

Human79 commented 3 years ago

I don't know where to put my acpi battery path in the battery supplementation. Regards.

jsassu20 commented 3 years ago

HEY WHATS GOING ON BOSS ITS ALMOST ALWAYS GOING TO BE...

_SB_.PCI0.LPCB.EC_.BATx (BATA BATB BATC, something close to this) LPCB can also sometimes be LPC EC__ may also be HEC or EC0 or ECDV

The underscore is important to pay attention to. ACPI devices use 4 character references across usually in the form of letters combined with numbers on most systems. But when ever you see a device with only 2 or 3 characters visible in writing then the will be used as the 4th and sometimes 3rd and 4th characters and it matters which order its written. When something is written EC for example the actual reference may be EC _ (no spaces between so EC but there are two underscores eventhough it may look like one ) it could also be E_ _C (EC) or EC (EC is almost always gonna be EC (EC__) I was just using the letters as a way to explain the naming scheme)

This is significant because SB.PCI0.EC is a totally different ACPI location in the computers translation than SB.PCI0.EC__ even though it uses EC in both examples and can be very easy to miss out on entirely which can drive you insane

SOMETIMES ITS 2 BATTERIES AND SOMETIMES ITS ONE IF YOU HAVE A LENOVO T440 450 460 470 480 OR T25 FOR EXAMPLE THEY HAVE THE ABILITY TO HOTSWAPP BATTERIES WHICH REQUIRES A BUILT IN BATTERY AND A DETACHABLE WHICH IS GOOD BUT IN MAC THE BATTERY HAS TO BE SEEN AS A SINGLE BAT REFERENCE INAACPI IN ORDER FOR IT TO FUNCTION PROPERLY. WHAT TYPE OF MACHINE DO YOU HAVE

Human79 commented 3 years ago

I have found my ACPI battery path but where to replace it? I just says match your battery path. Attaching an image for better understanding. 170ou6izy1371

jsassu20 commented 3 years ago

tell me the pc make and model it'll be easier for me to help you

Human79 commented 3 years ago

HP Probook 430 G3. It is a laptop. Battery ACPI path is PCI0.LPCB.EC0.BSTA. Regards.

jsassu20 commented 3 years ago

Archive.zip

there ya go boss it should give you a working battery

you need to add the patches to open core and include the aml in your config file then reboot everything you need is in the archive patches need to be put under ACPI/Patch in OC configurator

your system has either two batteries or uses a dual battery ACPI config The actual Battery is located at SB.PCI0.BAT0 and is also using SB.PCI0.BAT1 which most likely means you have 2 separate batteries which some companies do to enable hot swapping batteries without having to be plugged into an outlet when your battery is dead and you have a second you want to switch it with without powering off the system. The location you sent me of where your battery is is not correct and should be ignored as its not controlling anythingnot at the location. SSDT-BATC joins each of those batteries into one ACPI device which macOS will only work properly with and the required references have all been patched so they return bytes of 8 or less which is also required to have a proper battery config with Mac.

DSDT files can sometimes include references to BATT devices in multiple areas however the one which is the actual location of your systems is whoever location defines sub info referring to call methods that are named _STA _BIF _BIX and BST any battery device which does not contain those references can be ignored. More than one device with the references is a pretty solid use of more than one charge that's a much simpler way to avoid making any complex edits before you're able to get the gist of how batteries are seen and reported across multiple avenues rather than through than one system battery in the device otherwise your system wouldn't need to split the devices in order for two different battery status indicators which report the combined charge of each as if it were a single battery

STA handles reporting the current charge level of your system, bif handles the battery info for where it was made and by whom, and bix is extended reporting for how its operating as one battery when its actually many different batteries whose combined individual charge act like one battery wile still giving you the freedom to use more than one battery without requiring that your charger be with you should you need to use the system for long periods of time where no charger is an option or an annoyance

Untitled

jsassu20 commented 3 years ago

Untitled 3

Human79 commented 3 years ago

Thank you for your help, boss! However, while using your ssdt battery is not detected. Also, my device has a single battery. Attaching native (vanilla) DSDT for your reference. Regards. DSDT.aml.zip

jsassu20 commented 3 years ago

https://github.com/mdraan1/HP-Probook-430-G3-macos

or use this lilu plugin it looks like this guy made it so there's no battery patching needed

ECEnabler.kext.zip

https://github.com/1Revenger1/ECEnabler

that's the link

might not work cuz you have 2 batteries but worth a shot if not use the first link and try his EFI folder

Human79 commented 3 years ago

Hey there Nevermind I created my own patch and it works well. Thank you for your time.

TomiKVM commented 2 years ago

Hey i have HP Elitebook 850 g3, i dont have dsdt in my build but i have many ssdts. Everything else works but no battery indicator.