DocumentsSure
AMD GCN Chromium Electron Workaround
AMD GCN Chromium Electron Workaround
Type
Topic
Status
Published
Created
Apr 24, 2026
Updated
Apr 24, 2026
Created by
Dosu Bot
Updated by
Dosu Bot

AMD GCN Chromium Electron Workaround#

Status: Forward-looking patchset infrastructure. The amd_gcn_chromium.py shared patch module and its companion DynamicPatchset enum entry are planned OCLP-side plumbing added ahead of the PatcherSupportPkg Universal-Binaries payload they depend on. As of April 2026, neither has landed on main.

The Problem#

Chrome 125+ and Electron-based apps (e.g. Discord) exhibit heavy UI glitching and complete freezing on AMD GCN 1.0 (Legacy_GCN_7000) GPUs running macOS Ventura or newer. The root cause is a Metal.framework regression in how Chromium's renderer talks to GCN 1.0 hardware after Apple dropped native support in Ventura. GCN 2 / GCN 3 (Legacy_GCN_8000 / Legacy_GCN_9000) are not affected.

Current manual workarounds (documented in issue #1145):

  • open /Applications/Google\ Chrome.app --args --use-angle=gl — forces OpenGL rendering.
  • open /Applications/Discord.app --args --use-angle=gl — same for Electron apps.
  • Disable hardware acceleration per-app.

The planned OCLP fix automates this by merging a patched Metal.framework into the system volume, making the workaround transparent to all Chromium/Electron apps at once.


Patchset Architecture#

Shared Patch Module: amd_gcn_chromium.py#

Planned location: opencore_legacy_patcher/sys_patch/patchsets/shared_patches/amd_gcn_chromium.py

This module follows the same pattern as other shared patches (MontereyOpenCL, AMDOpenCL, etc.) and will emit a patchset keyed "AMD GCN Chromium Electron Workaround" with a single MERGE_SYSTEM_VOLUME entry targeting Metal.framework:

"AMD GCN Chromium Electron Workaround": {
    PatchType.MERGE_SYSTEM_VOLUME: {
        "/System/Library/Frameworks": {
            "Metal.framework": DynamicPatchset.AMDGCNChromiumElectronWorkaround
        }
    }
}

The value is a DynamicPatchset enum member — not a plain version string — so the CI/import path never tries to resolve the payload on disk until an actual patching run begins.

Runtime Selection Gate in AMDLegacyGCN#

The AMDLegacyGCN.patches() method is the sole caller of AMDGCNChromium.patches(). It gates inclusion on two conditions:

  1. Legacy_GCN_7000 only — checked via _is_gpu_architecture_present([device_probe.AMD.Archs.Legacy_GCN_7000]). GCN 8000/9000 do not receive this patch.
  2. Ventura or newernative_os() already returns True for Monterey and below , so patches() returns early on pre-Ventura systems. No additional OS gate is needed.

DynamicPatchset Enum and CI Compatibility#

DynamicPatchset is a StrEnum in patchsets/base.py currently holding only MetallibSupportPkg. The AMD GCN Chromium entry will add:

AMDGCNChromiumElectronWorkaround = "AMD GCN Chromium Electron Workaround"

Using an enum member as the patchset value — instead of a filesystem path — lets HardwarePatchsetDetection run in validation=True mode (used by CI) without the Universal-Binaries payload existing yet. In validation mode, present() and native_os() checks are skipped, so every hardware class is iterated; the DynamicPatchset guard prevents _preflight_checks() from stat-ing a non-existent file.

Runtime Resolution (_resolve_dynamic_patchset)#

At patch execution time, _preflight_checks() walks the patchset dictionary and replaces any DynamicPatchset value with a concrete path by calling _resolve_dynamic_patchset(variant). For AMDGCNChromiumElectronWorkaround, the resolver will locate the payload root inside PatcherSupportPkg, analogous to how MetallibSupportPkg is resolved today.

PatcherSupportPkg Universal-Binaries Payload Path#

The resolver expects this directory layout within the Universal-Binaries tree:

Universal-Binaries/
  AMD GCN Chromium Electron Workaround/
    System/
      Library/
        Frameworks/
          Metal.framework

The patchset name ("AMD GCN Chromium Electron Workaround") is used as the top-level subdirectory, and the path under it mirrors the MERGE_SYSTEM_VOLUME target /System/Library/Frameworks/Metal.framework.


Key References#

ResourceNotes
hardware/graphics/amd_legacy_gcn.pyRuntime gate: Legacy_GCN_7000 + Ventura check in patches()
patchsets/base.pyDynamicPatchset StrEnum; add new member here
patchsets/detect.pyHardwarePatchsetDetection; validation mode logic
sys_patch/sys_patch.py_preflight_checks() + _resolve_dynamic_patchset()
shared_patches/Existing shared patch modules — follow their pattern for amd_gcn_chromium.py
Issue #1145Bug report: Chrome 125+ / Electron freezing on GCN 1.0 + Ventura+