Restore KDKLess support and drop IOSurface downgrade

**WARNING: this change will break existing installs, you'll need to revert root patches before patching.
This commit is contained in:
Eduardo Covas
2023-08-18 14:28:08 -03:00
committed by GitHub
parent 829f1f6bc1
commit 36f69c4f21
3 changed files with 11 additions and 51 deletions

View File

@@ -766,7 +766,7 @@ class SystemPatchDictionary():
"AMD9000Controller.kext": "12.5",
"AMD9500Controller.kext": "12.5",
"AMD10000Controller.kext": "12.5",
"AMDRadeonX4000.kext": "12.5",
"AMDRadeonX4000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AMDRadeonX4000HWServices.kext": "12.5",
"AMDFramebuffer.kext": "12.5",
"AMDSupport.kext": "12.5",
@@ -795,7 +795,7 @@ class SystemPatchDictionary():
},
"Install": {
"/System/Library/Extensions": {
"AMDRadeonX4000.kext": "12.5",
"AMDRadeonX4000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AMDRadeonX4000HWServices.kext": "12.5",
"AMDRadeonVADriver2.bundle": "12.5",
@@ -819,7 +819,7 @@ class SystemPatchDictionary():
},
"Install": {
"/System/Library/Extensions": {
"AMDRadeonX5000.kext": "12.5",
"AMDRadeonX5000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AMDRadeonVADriver2.bundle": "12.5",
"AMDRadeonX5000GLDriver.bundle": "12.5",
@@ -913,8 +913,8 @@ class SystemPatchDictionary():
"AppleIntelHD4000GraphicsGLDriver.bundle": "11.0 Beta 6",
"AppleIntelHD4000GraphicsMTLDriver.bundle": "11.0 Beta 6",
"AppleIntelHD4000GraphicsVADriver.bundle": "11.3 Beta 1",
"AppleIntelFramebufferCapri.kext": "11.4",
"AppleIntelHD4000Graphics.kext": "11.4",
"AppleIntelFramebufferCapri.kext": "11.4" if self.os_major < os_data.os_data.sonoma else "11.4-23",
"AppleIntelHD4000Graphics.kext": "11.4" if self.os_major < os_data.os_data.sonoma else "11.4-23",
"AppleIntelIVBVA.bundle": "11.4",
"AppleIntelGraphicsShared.bundle": "11.4", # libIGIL-Metal.dylib pulled from 11.0 Beta 6
},
@@ -934,8 +934,8 @@ class SystemPatchDictionary():
},
"Install": {
"/System/Library/Extensions": {
"AppleIntelFramebufferAzul.kext": "12.5",
"AppleIntelHD5000Graphics.kext": "12.5",
"AppleIntelFramebufferAzul.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelHD5000Graphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelHD5000GraphicsGLDriver.bundle": "12.5",
"AppleIntelHD5000GraphicsMTLDriver.bundle": "12.5",
"AppleIntelHD5000GraphicsVADriver.bundle": "12.5",
@@ -958,8 +958,8 @@ class SystemPatchDictionary():
},
"Install": {
"/System/Library/Extensions": {
"AppleIntelBDWGraphics.kext": "12.5",
"AppleIntelBDWGraphicsFramebuffer.kext": "12.5",
"AppleIntelBDWGraphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelBDWGraphicsFramebuffer.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelBDWGraphicsGLDriver.bundle": "12.5",
"AppleIntelBDWGraphicsMTLDriver.bundle": "12.5",
"AppleIntelBDWGraphicsVADriver.bundle": "12.5",
@@ -982,8 +982,8 @@ class SystemPatchDictionary():
},
"Install": {
"/System/Library/Extensions": {
"AppleIntelSKLGraphics.kext": "12.5",
"AppleIntelSKLGraphicsFramebuffer.kext": "12.5",
"AppleIntelSKLGraphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelSKLGraphicsFramebuffer.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23",
"AppleIntelSKLGraphicsGLDriver.bundle": "12.5",
"AppleIntelSKLGraphicsMTLDriver.bundle": "12.5",
"AppleIntelSKLGraphicsVADriver.bundle": "12.5",
@@ -992,30 +992,6 @@ class SystemPatchDictionary():
},
},
},
# On macOS Sonoma, the IOSurface ABI changed and broke support for Monterey framebuffer drivers:
# - Intel and Nvidia: Page Fault panics on boot
# - IOAccelResource::pageonIfNeeded() in IOAcceleratorFamily2.kext
# - AMD: Corrupted UI elements
# - Menubar, wallpaper, etc.
"Sonoma Legacy Metal Extended": {
"Display Name": "",
"OS Support": {
"Minimum OS Support": {
"OS Major": os_data.os_data.sonoma,
"OS Minor": 0
},
"Maximum OS Support": {
"OS Major": os_data.os_data.max_os,
"OS Minor": 99
},
},
"Install": {
"/System/Library/Extensions": {
"IOGPUFamily.kext": "13.5",
"IOSurface.kext": "13.5",
},
},
},
},
"Audio": {
"Legacy Realtek": {

View File

@@ -221,16 +221,6 @@ class DetectRootPatch:
self.supports_metal = True
if self.constants.detected_os >= os_data.os_data.sonoma:
if any([
self.kepler_gpu,
self.ivy_gpu,
self.haswell_gpu,
self.broadwell_gpu,
self.skylake_gpu,
]):
# All KDKless GPUs require a KDK in Sonoma due to IOSurface downgrade
self.requires_root_kc = True
if self.supports_metal is True:
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU

View File

@@ -64,7 +64,6 @@ class GenerateRootPatchSets:
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
if self.hardware_details["Graphics: Intel Haswell"] is True:
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
@@ -72,19 +71,16 @@ class GenerateRootPatchSets:
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
if self.hardware_details["Graphics: Intel Broadwell"] is True:
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Intel Broadwell": all_hardware_patchset["Graphics"]["Intel Broadwell"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
if self.hardware_details["Graphics: Intel Skylake"] is True:
required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]})
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
required_patches.update({"Intel Skylake": all_hardware_patchset["Graphics"]["Intel Skylake"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
if self.hardware_details["Graphics: Nvidia Tesla"] is True:
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
@@ -107,7 +103,6 @@ class GenerateRootPatchSets:
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
for gpu in self.constants.computer.gpus:
# Handle mixed GPU situations (ie. MacBookPro11,3: Haswell iGPU + Kepler dGPU)
if gpu.arch == device_probe.Intel.Archs.Haswell:
@@ -144,7 +139,6 @@ class GenerateRootPatchSets:
required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]})
if "AVX2" not in self.constants.computer.cpu.leafs:
required_patches.update({"AMD OpenCL": all_hardware_patchset["Graphics"]["AMD OpenCL"]})
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
if self.hardware_details["Graphics: AMD Legacy Vega"] is True:
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})