Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor UX481FA ACPI #19

Merged
merged 40 commits into from
Jan 6, 2023
Merged

Refactor UX481FA ACPI #19

merged 40 commits into from
Jan 6, 2023

Conversation

Qonfused
Copy link
Owner

@Qonfused Qonfused commented Dec 27, 2022

Current tasks:

Housekeeping:

  • ACPI
    • Preserve atomic ACPI file structure
      • Map SSDT-UX481FA.aml to essential SSDTs:
        • SSDT-AWAK.aml
        • SSDT-EC-USBX.aml
          • SSDT-EC
          • SSDT-USBX (handled by SSDT-USB)
        • SSDT-PLUG.aml (required for macOS <12.3)
        • SSDT-PNLF.aml
        • SSDT-GPIO.aml or SSDT-XOSI.aml
          • GPIO Device
          • Trackpad GPIO fix
      • Investigate ACPI imports (e.g. importing macOS overrides for WAK function)
    • Investigate any sound card IRQ conflicts (HPET).
    • Fix SSDT-DISABLE-GPU null check and dependency
  • Kexts
  • OpenCore
    • Add Wi-Fi + Bluetooth kexts for different macOS targets (Catalina, Big Sur)

- Add source DSL w/ comments
- Add source ACPI renames as plist
- Add source DSL w/ comments
- Add source ACPI renames as plist
@Qonfused Qonfused added type:documentation Improvements or additions to documentation type:feature New feature request labels Dec 27, 2022
@Qonfused Qonfused self-assigned this Dec 27, 2022
@Qonfused Qonfused linked an issue Dec 28, 2022 that may be closed by this pull request
Original fix addresses Reboot instead of Shutdown issue, but this issue is not present.

Changes:
- Removed _PTS to ZPTS ACPI rename
- Removed SSDT-PTS
Companion SSDT for CodecCommander (not needed)
- Removed HDAS to HDEF rename as it is already handled by AppleALC.
Patch is from Rehabman but is not functional; only cosmetic.
- Source DSL moved to Resources folder
- TODO: Add source DSL w/ comments
- TODO: Add source ACPI renames as plist
@Qonfused Qonfused changed the title Rebase UX481FA fork Incorporate changes from UX481FA fork Dec 29, 2022
@Qonfused Qonfused changed the title Incorporate changes from UX481FA fork Merge changes from UX481FA fork Dec 29, 2022
- Added source DSL w/ comments
- TODO: add source ACPI renames as plist
@Qonfused
Copy link
Owner Author

Qonfused commented Dec 29, 2022

Will defer users to use the USBToolbox method instead of relying on an ACPI patch for mapping USB personalities should this be similarly prone to change. Otherwise a note should be given somewhere to remove the respective SSDT sans any internal USB personalities w/ the appropriate instructions.

This may also require the following ACPI rename to avoid errors:

<dict>
  <key>Comment</key>
  <string>XHC: _UPC to XUPC</string>
  <key>Count</key>
  <integer>0</integer>
  <key>Enabled</key>
  <true/>
  <key>Find</key>
  <data>X1VQQw==</data>
  <key>Limit</key>
  <integer>0</integer>
  <key>Mask</key>
  <data></data>
  <key>OemTableId</key>
  <data>UHJvalNzZHQ=</data>
  <key>Replace</key>
  <data>WFVQQw==</data>
  <key>ReplaceMask</key>
  <data></data>
  <key>Skip</key>
  <integer>0</integer>
  <key>TableLength</key>
  <integer>6103</integer>
  <key>TableSignature</key>
  <data>U1NEVA==</data>
</dict>

USBX can be merged with the EC device as SSDT-EC/USBX for consistency with the Dortania OpenCore guide.

- Added ETPD (_CRS -> XCRS) ACPI rename
- Adds support for Sidecar, NightShift, Airplay to Mac, and Universal Control.
- Created for future supplemental documentation.
@Qonfused
Copy link
Owner Author

Qonfused commented Dec 29, 2022

Removed all non-critical SSDTs (will need to test for UX581/UX582 in #7).
Regressions will need to be cleared before implementing further fixes.

- Removed AsusSMC ALS0 sensor
- Removed EC renames for display brightness
- Removed EC + notify methods for brightness keys

TODO: Keyboard backlight
- Removed keyboard backlight enable
- Added EC methods for FN+F4, FN+F5, FN+F7 keys
- Added keyboard backlight control method
- Added default keyboard backlight value
- Moved keyboard backlight methods to SSDT-KBLF
- Simplified SSDT-EC-USBX logic (renamed)
- Simplified SSDT-PLUG logic
- Added trackpad GPIO pinning to SSDT-GPI0
- Added SSDT-SMBUS-MCHC

TODO:
- Add missing ATKD functions (e.g. FN Lock)
- Add missing internal USB personalities (DCAM/DCAN, etc)
- Add custom keyboard scan map
@Maleficent-Magik
Copy link

Thank, I'll see when I work at night :) but it will save a few MICRO seconds in the MacOS boot since it doesn't have to check this... In that's great

(Micro seconds : in its pure state, it is really 0,00001 and still...)

- Added Injector kext for Big Sur and Catalina
- Added AirportItlwm kext for Big Sur and Catalina
@Qonfused
Copy link
Owner Author

Qonfused commented Jan 4, 2023

Unclear what these ADB codes are (from SSDT-KBD):

"Custom PS2 Map", 
Package (0x06)
{
    Package (0x00){},
    "46=80",   // 0x006b, Scroll Lock
    "e045=80", // 0x0071, Pause
    "e037=64", // 0x0000, Print Screen
    "e052=67", // 0x0000, Insert
    "e05d=57"  // 0x0a00, App (context menu key)
},

@Qonfused Qonfused removed a link to an issue Jan 4, 2023
@Qonfused Qonfused marked this pull request as ready for review January 4, 2023 03:15
@Qonfused
Copy link
Owner Author

Qonfused commented Jan 4, 2023

Will revisit pending commits from @wern-apfel/Zenbook-UX481FA in a separate PR.

Remaining issues will have to be solved in separate PRs:

@Qonfused
Copy link
Owner Author

Qonfused commented Jan 4, 2023

Still need to test on different macOS versions (Catalina, Big Sur, Monterey <12.3) before merge.

- Default setting for screenpad on boot is 0x64
- Start _Q31 method at 0xFF then move down to 0x64, 0x32, 0x14, Zero.
- Display not detected in settings using 05 (wrong busID value)
@Qonfused Qonfused added status:done All issue tasks are completed. and removed status:done All issue tasks are completed. labels Jan 5, 2023
@Qonfused Qonfused added the status:done All issue tasks are completed. label Jan 6, 2023
@Qonfused Qonfused merged commit e43f6ba into main Jan 6, 2023
@Qonfused Qonfused deleted the UX481FA-parity branch January 9, 2023 22:57
@Qonfused Qonfused added the project:UX481 For variants UX481FA (14", 2019) and UX481FL (14", 2019) label Jan 13, 2023
@Qonfused Qonfused changed the title Sync changes from UX481FA fork with ACPI audit Refactor UX481FA ACPI Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:UX481 For variants UX481FA (14", 2019) and UX481FL (14", 2019) status:done All issue tasks are completed. type:documentation Improvements or additions to documentation type:feature New feature request
Projects
Status: Done
2 participants