diff --git a/data/sys_patch_dict.py b/data/sys_patch_dict.py index d86ca3c4a..6371d0b82 100644 --- a/data/sys_patch_dict.py +++ b/data/sys_patch_dict.py @@ -303,12 +303,15 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support): "NVDANV50HalTeslaWeb.kext": "WebDriver-387.10.10.10.40.140", "NVDAResmanTeslaWeb.kext": "WebDriver-387.10.10.10.40.140", }, - - # Nvidia's control panel crashes on 10.14+ - # For us, no real point in using it so ignore - # "/Library/PreferencePanes": { - # "NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140", - # }, + "/Library/PreferencePanes": { + "NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140", + }, + "/Library/LaunchAgents": { + "com.nvidia.nvagent.plist": "WebDriver-387.10.10.10.40.140", + }, + "/Library/LaunchDaemons": { + "com.nvidia.nvroothelper.plist": "WebDriver-387.10.10.10.40.140", + }, }, }, "AMD TeraScale Common": { diff --git a/resources/constants.py b/resources/constants.py index 0646c0f2b..97d67db3d 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -15,7 +15,7 @@ class Constants: def __init__(self): # Patcher Versioning self.patcher_version = "0.4.6" # OpenCore-Legacy-Patcher - self.patcher_support_pkg_version = "0.5.0" # PatcherSupportPkg + self.patcher_support_pkg_version = "0.5.1" # 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" @@ -167,6 +167,7 @@ class Constants: self.imac_model = "" # Set MXM GPU model self.drm_support = False # Set iMac14,x DRM support self.allow_ts2_accel = True # Set TeraScale 2 Acceleration support + self.force_nv_web = False # Force Nvidia Web Drivers on Tesla and Kepler ## Miscellaneous self.disallow_cpufriend = False # Disable CPUFriend diff --git a/resources/defaults.py b/resources/defaults.py index 6d83ce4cd..070babc33 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -172,3 +172,11 @@ class generate_defaults: settings.force_vmm = False except KeyError: pass + + + nv_web_status = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() + if nv_web_status in ["1", "true"]: + settings.force_nv_web = True + else: + subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"]) + settings.force_nv_web = False \ No newline at end of file diff --git a/resources/sys_patch.py b/resources/sys_patch.py index c7ec35cbc..64df04da7 100644 --- a/resources/sys_patch.py +++ b/resources/sys_patch.py @@ -166,7 +166,7 @@ class PatchSysVolume: print("- Patching complete") print("\nPlease reboot the machine for patches to take effect") if self.needs_kmutil_exemptions is True: - print("Note: Apple will require you to open System Preferences -> Security to\nallow the new kernel extensions to be loaded") + print("Note: Apple will require you to open System Preferences -> Security to allow the new kernel extensions to be loaded") self.constants.root_patcher_succeded = True if self.constants.gui_mode is False: input("\nPress [ENTER] to continue") diff --git a/resources/sys_patch_detect.py b/resources/sys_patch_detect.py index f55ca55ea..2c81987b2 100644 --- a/resources/sys_patch_detect.py +++ b/resources/sys_patch_detect.py @@ -52,12 +52,12 @@ class detect_root_patch: for i, gpu in enumerate(gpus): if gpu.class_code and gpu.class_code != 0xFFFFFFFF: print(f"- Found GPU ({i}): {utilities.friendly_hex(gpu.vendor_id)}:{utilities.friendly_hex(gpu.device_id)}") - if gpu.arch in [device_probe.NVIDIA.Archs.Tesla]: + if gpu.arch in [device_probe.NVIDIA.Archs.Tesla] and self.constants.force_nv_web is False: if self.constants.detected_os > non_metal_os: self.nvidia_tesla = True self.amfi_must_disable = True self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight() - elif gpu.arch == device_probe.NVIDIA.Archs.Kepler: + elif gpu.arch == device_probe.NVIDIA.Archs.Kepler and self.constants.force_nv_web is False: if self.constants.detected_os > os_data.os_data.big_sur: # Kepler drivers were dropped with Beta 7 # 12.0 Beta 5: 21.0.0 - 21A5304g @@ -67,7 +67,13 @@ class detect_root_patch: if "21A5506j" not in self.constants.detected_os_build: self.kepler_gpu = True self.supports_metal = True - elif gpu.arch in [device_probe.NVIDIA.Archs.Fermi, device_probe.NVIDIA.Archs.Maxwell, device_probe.NVIDIA.Archs.Pascal]: + elif gpu.arch in [ + device_probe.NVIDIA.Archs.Tesla, + device_probe.NVIDIA.Archs.Fermi, + device_probe.NVIDIA.Archs.Kepler, + device_probe.NVIDIA.Archs.Maxwell, + device_probe.NVIDIA.Archs.Pascal, + ] and self.constants.force_nv_web is True: if self.constants.detected_os > os_data.os_data.mojave: self.nvidia_web = True self.amfi_must_disable = True