Skip to content

[Enhancement] Incorporate eGPU patches into WhateverGreen/FeatureUnlock #2154

@mayankk2308

Description

@mayankk2308

Given that no Thunderbolt 2 or older devices will have native macOS support going forward, it only makes sense to integrate eGPU patching for users who desire it, directly into OC(LP)/Lilu extensions family. Previously integration was not doable due to license dortania/OpenCore-Legacy-Patcher#396, so I'm here to grant the necessary rights and make any patches I created available for general use. Not possible to use my kext directly as it has other patches from other people from whom I had explicit permission for usage. Unfortunately don't have much time so not contributing patches directly.

Enabling Native eGPU Support

Apple just uses a conditional to validate thunderbolt version before allowing eGPU initialization. There are 2 patches, segregated based on macOS version. Old patch: 10.13.4-10.15, new patch: 10.15.1+.

Relevant source code:

Post-patch, any eGPU Apple natively supports works appropriately regardless of TBT version.

Enabling Additional Drivers for eGPU Support

For a GPU driver to load when a GPU is connected over thunderbolt, IOPCITunnelCompatible flag is needed. This patch just removes this requirement, so any GPU driver that is considered for loading won't be blocked for that reason. This allows older AMD architectures to run in eGPU configuration as well. Might need to verify this patch on newer macOS releases though.

Relevant source code:

Edge case with Macs containing NVIDIA GPUs

If you connect an AMD eGPU to a Mac containing NVIDIA GPU internally, it works fine until you try to plug in an external monitor to the eGPU. You'll only get black screen on the external display. Never really got a chance to do a full on deep dive as to what's going on there, but as a dirty hack disabling GeForce acceleration (nv_disable=1 boot-args + switching mux to iGPU) used to fix that. Hardly a proper workaround and doesn't help iMacs, but just sharing that detail.

Feel free to incorporate the above patches wherever you desire and if you deem it worth at you discretion. If you choose to incorporate them, in general, these patches are pretty harmless and should be ok to enable by default. Apologies in advance if not the appropriate bug tracker for this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions