RehabMan / OS-X-ACPI-Battery-Driver

Implements an Advanced Configuration and Power Interface (ACPI) based battery manager kernel extension (kext/driver) for non-Apple laptops running OS X.
Other
178 stars 58 forks source link

More than two battery devices #35

Open soffyo opened 4 years ago

soffyo commented 4 years ago

What about machines that have more than just two battery devices? For example my asus zenbook ux331un has BAT0, BAT1 and BAT2. BAT0 located within both EC0 and H_EC while BAT1 and BAT2 are located under H_EC only. How should I apply this fix in my situation? I want to try this because I am having kernel panic when waking from sleep only if the computer is on battery power, while sleep works fine when on ac power.

athlonreg commented 4 years ago

Hello, can you provide your origin ACPI? And I want to know how many batteries will to show in windows.

soffyo commented 4 years ago

on windows only BAT0 is showing. Capture

Looking into ACPI, BAT1 and BAT2 are present only under H_EC while BAT0 is found within both EC0 and H_EC. You will find my origin folder with original aml's and already decompiled dsl's. origin.zip

athlonreg commented 4 years ago

on windows only BAT0 is showing. Capture

Looking into ACPI, BAT1 and BAT2 are present only under H_EC while BAT0 is found within both EC0 and H_EC. You will find my origin folder with original aml's and already decompiled dsl's. origin.zip

I checked your DSDT, the BAT0 BAT1 and BAT2 in H_EC is disabled so they are useless. EC0 is the part that really works. So you only need to patch BAT0 in EC0 to make battery work.

image

soffyo commented 4 years ago

Okay, so I don't need to make ssdt-batc. My battery works already, I'm just trying to fix a kernel panic that occurs when waking from sleep only when on battery.

athlonreg commented 4 years ago

Okay, so I don't need to make ssdt-batc. My battery works already, I'm just trying to fix a kernel panic that occurs when waking from sleep only when on battery.

Can you try this SSDT for battery? I patched two method _BIX and BIFA. the ACPI Patch you need to use is in this SSDT. SSDT-OCBAT0-ASUS-ZenBook-UX331UN.dsl.zip

soffyo commented 4 years ago

I already use this patch. here is my SSDT-BAT.aml SSDT-BATT.zip