Qonfused / ASUS-ZenBook-Duo-14-UX481-Hackintosh

OpenCore configuration for the ASUS ZenBook Duo 14" (UX481FA/FL)
https://github.com/Qonfused/ASUS-ZenBook-Duo-14-UX481-Hackintosh
BSD 3-Clause "New" or "Revised" License
29 stars 1 forks source link

Document UX582 ACPI patches #7

Closed Qonfused closed 1 year ago

Qonfused commented 1 year ago

A basic breakdown of each file is given below:

File Required Description
SSDT-ALC294.aml No Incorporated into AppleALC; not needed w/o CodecCommander kext.
SSDT-ASUSFN.aml No Refactored; implements custom media key mapping.
SSDT-AsusSMC.aml No Refactored; Handles implementing some keyboard backlight patches and primary-display backlight interrupts.
SSDT-AWAC Yes Also called RTC0; re-enables legacy RTC clock for macOS compatibility.
SSDT-DDGPU.aml Yes Disables dGPU through a SSDT
SSDT-DTGP.aml Yes? Handles early device property injection for thunderbolt 3, which may otherwise fail to reliably inject. Unclear if needed.
SSDT-EC-USBX-LAPTOP.aml Yes Creates a fake EC controller (satisfying an Apple ec-naming requirement) and creates a USBX device for USB power properties.
SSDT-ELAN-POLLING.aml No
SSDT-GPRW.aml No Instant wake patch (e.g. USB or power state changes wakes device from sleep).
SSDT-OC-XOSI.aml No Spoofs windows compatibility for _OSI checks; this method has very sharp edges, and is better to avoid if another solution exists.
SSDT-Plug.aml Yes Enables XCPM (XNU CPU power management) to manage the CPU's power management. Note that this is no longer needed for Monterey 11.3+, but required for earlier macOS versions.
SSDT-PNLFCFL.aml No Handles backlight control of main display. Later WhateverGreen versions have incorporated CFL-specific backlight quirks, so use of the more generic SSDT-PNLF is advised.
SSDT-RHUB.aml No Disables USB RHUB to avoid issues booting macOS. Not needed with proper USB-mapping and/or thunderbolt patches.
SSDT-TB3.aml Yes Related to enabling Thunderbolt 3 controllers?
SSDT-PTS.aml No? Overrides USB controller shutdown to prevent shutdown/reboot conflict.
SSDT-DMAC.aml/SSDT-MEM2.aml No Allows for more 'mac-like' memory behavior (see this post)
SSDT-IMEI.aml No Creates new IMEI device to allow applying device-ids (required if no IMEI device with any name is present in ACPI tables).
SSDT-PMCR.aml/SSDT-PPMC.aml No Adds an undocumented & missing PMCR device to enable native NVRAM for non-native NVRAM.
SSDT-SBUS-MCHC.aml Yes Fixes AppleSMBus support (e.g. CPU temp, fans, low bandwidth PCI, memory reporting, etc).
SSDT-XSPI.aml No Adds a PCH or platform controller hub device to IORegistry; this patch is cosmetic and serves no functional use.
SSDT-ETPD.aml No Refactored; Enables GPI0 interrupts (for ELAN trackpad polling)
Qonfused commented 1 year ago

It seems that an ambient light sensor is needed for backlight to function (since macOS 15 Catalina). The SMCLightSensor kext handles reporting actual SMC values or dummy values; if there is no ambient light sensor I'd have to remove the ALS0 kext (since there is no physical device to define).

Edit: I can't find an ambient light sensor in the schematic, so I'm ommiting reporting SMC values and instead using dummy values.

Qonfused commented 1 year ago

Another note: SSDT-PLUG is no longer needed on Monterey 12.3+

Qonfused commented 1 year ago

IMEI SSDT is not necessary: Screen Shot 2022-11-23 at 12 06 22 AM

More info in https://dortania.github.io/Getting-Started-With-ACPI/Universal/imei.html.

Qonfused commented 1 year ago

ACPI spec for PTS is "prepare to sleep"; it's possible that the PTS SSDT may be needed for some S0-S5 signal?

Edit: More info in https://dortania.github.io/OpenCore-Post-Install/usb/misc/shutdown.html confirms a plausible S5 patch.

Qonfused commented 1 year ago

Posting this resource for later documentation: https://5t33z0.gitbook.io/oc-litte-translated/oc-little/acpi/acpi-basics

Qonfused commented 1 year ago

Will only have to document this repo's ACPI.

Qonfused commented 1 year ago

Fix issue status

shiecldk commented 1 year ago

SSDT-DTGP.aml is required to be used with SSDT-TB3.aml since the Device (UPSB) in SSDT-TB3.aml is calling the _DSM method. (for UX582 model)

shiecldk commented 1 year ago

It seems that without SSDT-PTS.aml, on UX582, the shutdown or restart on macOS would fail sometimes. But this problem only existed a long time ago when I initially pushed the OC EFI to GitHub; not sure if it has been fixed by other patches.

shiecldk commented 1 year ago

Do you have a working NVRAM on your model? (saves the boot disk in OpenCore)

Qonfused commented 1 year ago

SSDT-DTGP.aml is required to be used with SSDT-TB3.aml since the Device (UPSB) in SSDT-TB3.aml is calling the _DSM method. (for UX582 model)

My initial comments on DTGP were misled; the DTGP method may be necessary in order to inject device properties during earlier parts of macOS's initialization. I'd see if you can use device property injection instead, but it may not reliably inject w/o using DTGP.

I'm not familiar with the thunderbolt SSDTs/patches, though I have a z490i system with thunderbolt 3 I can test with. It may be more involved on a laptop with multiple thunderbolt controllers.

It seems that without SSDT-PTS.aml, on UX582, the shutdown or restart on macOS would fail sometimes. But this problem only existed a long time ago when I initially pushed the OC EFI to GitHub; not sure if it has been fixed by other patches.

I'd still verify whether you still need this SSDT. Reviewing this SSDT, all it seems to do is power down a USB controller, which can conflict with shutdown/restart (possibly sleep as well).

Do you have a working NVRAM on your model? (saves the boot disk in OpenCore)

NVRAM does work natively on my model. I was unsure when I was first investigating it, but macOS does correctly read the csr-active-config NVRAM variable, and custom boot entry creation was tested as working.