From 23bd20777443140c44bab1df93e5881faf1517ad Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 12 Oct 2022 20:11:53 -0600 Subject: [PATCH] sys_patch: Drop Metal downgrade on Kepler --- CHANGELOG.md | 3 ++- data/sys_patch_dict.py | 35 ++++++++++++++++++++++++++++++++--- resources/constants.py | 2 +- resources/sys_patch_detect.py | 5 ++--- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7985f1e82..21693a3ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,11 +36,12 @@ - Relies on N-1 system for when matching KDK is not present - Delete unused KDKs in `/Library/Developer/KDKs` during root patching - Resolve Power Management support for Ivy Bridge and older +- Add work-around to Catalyst Buttons not responding on non-Metal in macOS Monterey - Increment Binaries: - OpenCorePkg 0.8.5 release - Lilu 1.6.2 - release - FeatureUnlock 1.0.9 release - - PatcherSupportPkg 0.6.8 - release + - PatcherSupportPkg 0.6.9 - release - BrcmPatchRAM 2.6.4 - release - AutoPkgInstaller 1.0.1 - release - CryptexFixup 1.0.0 - release diff --git a/data/sys_patch_dict.py b/data/sys_patch_dict.py index a93f9e39c..a9e0cc198 100644 --- a/data/sys_patch_dict.py +++ b/data/sys_patch_dict.py @@ -79,8 +79,10 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support): }, "Install Non-Root": { "/Library/Application Support/SkyLightPlugins": { - **({ "DropboxHack.dylib": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), - **({ "DropboxHack.txt": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), + **({ "DropboxHack.dylib": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), + **({ "DropboxHack.txt": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), + **({ "CatalystButton.dylib": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), + **({ "CatalystButton.txt": "SkyLightPlugins" } if os_major >= os_data.os_data.monterey else {}), }, }, "Processes": { @@ -191,6 +193,33 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support): }, }, + # Temporary work-around for Kepler GPUs on Ventura + # We removed the reliance on Metal.framework downgrade, however the new Kepler + # patchset breaks with the old Metal. Thus we need to ensure stock variant is used + # Remove this when OCLP is merged onto mainline + "Revert Metal Downgrade": { + "Display Name": "", + "OS Support": { + "Minimum OS Support": { + "OS Major": os_data.os_data.ventura, + "OS Minor": 0 + }, + "Maximum OS Support": { + "OS Major": os_data.os_data.ventura, + "OS Minor": 99 + }, + }, + "Remove": { + "/System/Library/Frameworks/Metal.framework/Versions/A/": [ + "Metal", + "MetalOld.dylib", + ], + "/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A": [ + "MPSCore", + ], + }, + }, + # Monterey has a WebKit sandboxing issue where many UI elements fail to render # This patch simple replaces the sandbox profile with one supporting our GPUs # Note: Neither Big Sur nor Ventura have this issue @@ -416,7 +445,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support): "NVDAStartup.kext": "12.0 Beta 6", "GeForceAIRPlugin.bundle": "11.0 Beta 3", "GeForceGLDriver.bundle": "11.0 Beta 3", - "GeForceMTLDriver.bundle": "11.0 Beta 3", + "GeForceMTLDriver.bundle": "11.0 Beta 3" if os_major <= os_data.os_data.monterey else f"11.0 Beta 3-{os_major}", "GeForceVADriver.bundle": "12.0 Beta 6", }, "/System/Library/Frameworks": { diff --git a/resources/constants.py b/resources/constants.py index ca6825c26..0971f2828 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -13,7 +13,7 @@ class Constants: def __init__(self): # Patcher Versioning self.patcher_version = "0.5.0" # OpenCore-Legacy-Patcher - self.patcher_support_pkg_version = "0.6.8" # PatcherSupportPkg + self.patcher_support_pkg_version = "0.6.9" # PatcherSupportPkg self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/" self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/" self.discord_link = "https://discord.gg/rqdPgH8xSN" diff --git a/resources/sys_patch_detect.py b/resources/sys_patch_detect.py index f9bd6a4df..c13408d08 100644 --- a/resources/sys_patch_detect.py +++ b/resources/sys_patch_detect.py @@ -83,9 +83,8 @@ class detect_root_patch: ): self.kepler_gpu = True self.supports_metal = True - if self.constants.detected_os > os_data.os_data.ventura: + if self.constants.detected_os >= os_data.os_data.ventura: self.amfi_must_disable = True - self.amfi_shim_bins = True elif gpu.arch in [ device_probe.NVIDIA.Archs.Fermi, device_probe.NVIDIA.Archs.Kepler, @@ -482,7 +481,7 @@ class detect_root_patch: required_patches.update({"Nvidia Web Drivers": all_hardware_patchset["Graphics"]["Nvidia Web Drivers"]}) required_patches.update({"Non-Metal Enforcement": all_hardware_patchset["Graphics"]["Non-Metal Enforcement"]}) if hardware_details["Graphics: Nvidia Kepler"] is True: - required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]}) + required_patches.update({"Revert Metal Downgrade": all_hardware_patchset["Graphics"]["Revert Metal Downgrade"]}) required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]}) required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]}) required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})