mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 13:50:00 +10:00
sys_patch_detect.py: Add support for Web Drivers on Tesla/Kepler
This commit is contained in:
@@ -303,12 +303,15 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
"NVDANV50HalTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
"NVDANV50HalTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||||
"NVDAResmanTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
"NVDAResmanTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||||
},
|
},
|
||||||
|
"/Library/PreferencePanes": {
|
||||||
# Nvidia's control panel crashes on 10.14+
|
"NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140",
|
||||||
# For us, no real point in using it so ignore
|
},
|
||||||
# "/Library/PreferencePanes": {
|
"/Library/LaunchAgents": {
|
||||||
# "NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140",
|
"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": {
|
"AMD TeraScale Common": {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Constants:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Patcher Versioning
|
# Patcher Versioning
|
||||||
self.patcher_version = "0.4.6" # OpenCore-Legacy-Patcher
|
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.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.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
|
||||||
self.discord_link = "https://discord.gg/rqdPgH8xSN"
|
self.discord_link = "https://discord.gg/rqdPgH8xSN"
|
||||||
@@ -167,6 +167,7 @@ class Constants:
|
|||||||
self.imac_model = "" # Set MXM GPU model
|
self.imac_model = "" # Set MXM GPU model
|
||||||
self.drm_support = False # Set iMac14,x DRM support
|
self.drm_support = False # Set iMac14,x DRM support
|
||||||
self.allow_ts2_accel = True # Set TeraScale 2 Acceleration 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
|
## Miscellaneous
|
||||||
self.disallow_cpufriend = False # Disable CPUFriend
|
self.disallow_cpufriend = False # Disable CPUFriend
|
||||||
|
|||||||
@@ -172,3 +172,11 @@ class generate_defaults:
|
|||||||
settings.force_vmm = False
|
settings.force_vmm = False
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
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
|
||||||
@@ -166,7 +166,7 @@ class PatchSysVolume:
|
|||||||
print("- Patching complete")
|
print("- Patching complete")
|
||||||
print("\nPlease reboot the machine for patches to take effect")
|
print("\nPlease reboot the machine for patches to take effect")
|
||||||
if self.needs_kmutil_exemptions is True:
|
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
|
self.constants.root_patcher_succeded = True
|
||||||
if self.constants.gui_mode is False:
|
if self.constants.gui_mode is False:
|
||||||
input("\nPress [ENTER] to continue")
|
input("\nPress [ENTER] to continue")
|
||||||
|
|||||||
@@ -52,12 +52,12 @@ class detect_root_patch:
|
|||||||
for i, gpu in enumerate(gpus):
|
for i, gpu in enumerate(gpus):
|
||||||
if gpu.class_code and gpu.class_code != 0xFFFFFFFF:
|
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)}")
|
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:
|
if self.constants.detected_os > non_metal_os:
|
||||||
self.nvidia_tesla = True
|
self.nvidia_tesla = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
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:
|
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||||
# Kepler drivers were dropped with Beta 7
|
# Kepler drivers were dropped with Beta 7
|
||||||
# 12.0 Beta 5: 21.0.0 - 21A5304g
|
# 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:
|
if "21A5506j" not in self.constants.detected_os_build:
|
||||||
self.kepler_gpu = True
|
self.kepler_gpu = True
|
||||||
self.supports_metal = 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:
|
if self.constants.detected_os > os_data.os_data.mojave:
|
||||||
self.nvidia_web = True
|
self.nvidia_web = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
|
|||||||
Reference in New Issue
Block a user