mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 22:50:51 +10:00
Add non-Metal Monterey accel
This commit is contained in:
@@ -19,11 +19,18 @@
|
|||||||
- AppleALC 1.6.3 release
|
- AppleALC 1.6.3 release
|
||||||
- WhateverGreen 1.5.2 release
|
- WhateverGreen 1.5.2 release
|
||||||
- FeatureUnlock 1.0.3 release
|
- FeatureUnlock 1.0.3 release
|
||||||
|
- PatcherSupportPkg 0.0.19 release
|
||||||
- Allow iGPU/dGPU switching in Windows
|
- Allow iGPU/dGPU switching in Windows
|
||||||
- Applicable to MacBook Pros with Intel iGPU and Nvidia/AMD dGPU
|
- Applicable to MacBook Pros with Intel iGPU and Nvidia/AMD dGPU
|
||||||
- Clean up Patcher Settings
|
- Clean up Patcher Settings
|
||||||
- Allow disabling of TeraScale 2 Acceleration during root volume patch
|
- Allow disabling of TeraScale 2 Acceleration during root volume patch
|
||||||
- Use for MacBookPro8,x with heavily degraded dGPUs
|
- Use for MacBookPro8,x with heavily degraded dGPUs
|
||||||
|
- Add non-Metal Monterey Acceleration
|
||||||
|
- Currently supports:
|
||||||
|
- Intel Ironlake and Sandy Bridge
|
||||||
|
- Nvidia Tesla
|
||||||
|
- AMD TeraScale 1
|
||||||
|
- TeraScale 2 acceleration to be added in the future
|
||||||
|
|
||||||
## 0.2.4
|
## 0.2.4
|
||||||
|
|
||||||
|
|||||||
@@ -281,9 +281,9 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
Utilities.header(["Patching System Volume"])
|
Utilities.header(["Patching System Volume"])
|
||||||
big_sur = """Patches Root volume to fix misc issues such as:
|
big_sur = """Patches Root volume to fix misc issues such as:
|
||||||
|
|
||||||
- Graphics Acceleration for non-Metal GPUs
|
- Non-Metal Graphics Acceleration
|
||||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
|
||||||
- Intel: Ironlake - Sandy Bridge
|
- Intel: Ironlake - Sandy Bridge
|
||||||
|
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||||
- Audio support for iMac7,1 and iMac8,1
|
- Audio support for iMac7,1 and iMac8,1
|
||||||
|
|
||||||
@@ -300,12 +300,14 @@ B. Exit
|
|||||||
"""
|
"""
|
||||||
monterey = """Patches Root volume to fix misc issues such as:
|
monterey = """Patches Root volume to fix misc issues such as:
|
||||||
|
|
||||||
- Graphics Acceleration
|
- Metal Graphics Acceleration
|
||||||
- Intel: Ivy Bridge (4000 series iGPUs)
|
- Intel: Ivy Bridge (4000 series iGPUs)
|
||||||
- Basic Framebuffer and brightness Control (No acceleration)
|
- Non-Metal Graphics Accelertation
|
||||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
|
||||||
- Intel: Ironlake - Sandy Bridge
|
- Intel: Ironlake - Sandy Bridge
|
||||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||||
|
- AMD: TeraScale 1 (2000-4000 series)
|
||||||
|
- Basic Framebuffer and brightness Control (No acceleration)
|
||||||
|
- AMD: TeraScale 2 (5000-6000 series)
|
||||||
- Audio support for iMac7,1 and iMac8,1
|
- Audio support for iMac7,1 and iMac8,1
|
||||||
|
|
||||||
WARNING: Root Volume Patching is still in active development, please
|
WARNING: Root Volume Patching is still in active development, please
|
||||||
@@ -321,9 +323,9 @@ B. Exit
|
|||||||
"""
|
"""
|
||||||
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
||||||
|
|
||||||
- Graphics Acceleration
|
- Non-Metal Graphics Acceleration
|
||||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
|
||||||
- Intel: Ironlake - Sandy Bridge
|
- Intel: Ironlake - Sandy Bridge
|
||||||
|
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||||
- Audio support for iMac7,1 and iMac8,1
|
- Audio support for iMac7,1 and iMac8,1
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Constants:
|
|||||||
self.latebloom_version = "0.19"
|
self.latebloom_version = "0.19"
|
||||||
self.disk = ""
|
self.disk = ""
|
||||||
self.patch_disk = ""
|
self.patch_disk = ""
|
||||||
self.patcher_support_pkg_version = "0.0.18" # PatcherSupportPkg
|
self.patcher_support_pkg_version = "0.0.19" # PatcherSupportPkg
|
||||||
|
|
||||||
# Get resource path
|
# Get resource path
|
||||||
self.current_path = Path(__file__).parent.parent.resolve()
|
self.current_path = Path(__file__).parent.parent.resolve()
|
||||||
@@ -149,6 +149,7 @@ class Constants:
|
|||||||
self.mojave,
|
self.mojave,
|
||||||
self.catalina,
|
self.catalina,
|
||||||
self.big_sur,
|
self.big_sur,
|
||||||
|
self.monterey,
|
||||||
]
|
]
|
||||||
|
|
||||||
# Payload Location
|
# Payload Location
|
||||||
|
|||||||
+20
-14
@@ -40,7 +40,7 @@ class PatchSysVolume:
|
|||||||
self.no_patch = True
|
self.no_patch = True
|
||||||
self.validate = False
|
self.validate = False
|
||||||
|
|
||||||
#if (Path.home() / "Desktop/OCLP-Test/").exists:
|
# if (Path.home() / "Desktop/OCLP-Test/").exists:
|
||||||
# self.mount_location = Path.home() / "Desktop/OCLP-Test"
|
# self.mount_location = Path.home() / "Desktop/OCLP-Test"
|
||||||
# self.validate = True
|
# self.validate = True
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
@@ -69,7 +69,7 @@ class PatchSysVolume:
|
|||||||
if Path(self.mount_extensions).exists():
|
if Path(self.mount_extensions).exists():
|
||||||
print("- Root Volume is already mounted")
|
print("- Root Volume is already mounted")
|
||||||
if patch is True:
|
if patch is True:
|
||||||
if self.constants.detected_os < self.constants.big_sur or Utilities.check_seal() is True:
|
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||||
self.backup_volume()
|
self.backup_volume()
|
||||||
self.patch_root_vol()
|
self.patch_root_vol()
|
||||||
return True
|
return True
|
||||||
@@ -83,7 +83,7 @@ class PatchSysVolume:
|
|||||||
if Path(self.mount_extensions).exists():
|
if Path(self.mount_extensions).exists():
|
||||||
print("- Successfully mounted the Root Volume")
|
print("- Successfully mounted the Root Volume")
|
||||||
if patch is True:
|
if patch is True:
|
||||||
if self.constants.detected_os < self.constants.big_sur or Utilities.check_seal() is True:
|
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||||
self.backup_volume()
|
self.backup_volume()
|
||||||
self.patch_root_vol()
|
self.patch_root_vol()
|
||||||
return True
|
return True
|
||||||
@@ -247,7 +247,7 @@ class PatchSysVolume:
|
|||||||
Utilities.process_status(self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
Utilities.process_status(self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||||
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.amd_ts2 is True:
|
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||||
print(
|
print(
|
||||||
"""\nPlease note that with ATI TeraScale 2 GPUs, you may experience colour strobing
|
"""\nPlease note that with ATI TeraScale 2 GPUs, you may experience colour strobing
|
||||||
on reboot. Please use SwitchResX or ResXtreme to force 1 million colours on your
|
on reboot. Please use SwitchResX or ResXtreme to force 1 million colours on your
|
||||||
@@ -309,8 +309,8 @@ set million colour before rebooting"""
|
|||||||
print("- Installing Nvidia Acceleration Kext patches for Mojave/Catalina")
|
print("- Installing Nvidia Acceleration Kext patches for Mojave/Catalina")
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path)
|
self.add_new_binaries(SysPatchArray.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path)
|
||||||
elif self.constants.detected_os == self.constants.big_sur:
|
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||||
print("- Installing Nvidia Acceleration Kext patches for Big Sur")
|
print("- Installing Nvidia Acceleration Kext patches for Big Sur/Monterey")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||||
@@ -324,8 +324,8 @@ set million colour before rebooting"""
|
|||||||
print("- Installing TeraScale 1 Acceleration Kext patches for Mojave/Catalina")
|
print("- Installing TeraScale 1 Acceleration Kext patches for Mojave/Catalina")
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||||
elif self.constants.detected_os == self.constants.big_sur:
|
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||||
print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur")
|
print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur/Monterey")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||||
@@ -339,6 +339,7 @@ set million colour before rebooting"""
|
|||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||||
elif self.constants.detected_os == self.constants.big_sur and self.constants.allow_ts2_accel is True:
|
elif self.constants.detected_os == self.constants.big_sur and self.constants.allow_ts2_accel is True:
|
||||||
|
# TODO: Enable for Monterey when acceleration patches proress
|
||||||
print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur")
|
print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2)
|
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2)
|
||||||
@@ -354,8 +355,8 @@ set million colour before rebooting"""
|
|||||||
print("- Installing Ironlake Acceleration Kext patches for Mojave/Catalina")
|
print("- Installing Ironlake Acceleration Kext patches for Mojave/Catalina")
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||||
elif self.constants.detected_os == self.constants.big_sur:
|
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||||
print("- Installing Ironlake Acceleration Kext patches for Big Sur")
|
print("- Installing Ironlake Acceleration Kext patches for Big Sur/Monterey")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||||
@@ -368,8 +369,8 @@ set million colour before rebooting"""
|
|||||||
print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina")
|
print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina")
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||||
elif self.constants.detected_os == self.constants.big_sur:
|
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||||
print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur")
|
print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur/Monterey")
|
||||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||||
self.gpu_accel_legacy()
|
self.gpu_accel_legacy()
|
||||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||||
@@ -472,13 +473,18 @@ set million colour before rebooting"""
|
|||||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||||
self.gpu_framebuffer_ivybridge_master()
|
self.gpu_framebuffer_ivybridge_master()
|
||||||
|
|
||||||
if self.amd_ts2 is True and self.constants.detected_os in self.constants.legacy_accel_support and self.constants.allow_ts2_accel is True:
|
if (
|
||||||
|
self.amd_ts2 is True
|
||||||
|
and self.constants.detected_os in self.constants.legacy_accel_support
|
||||||
|
and self.constants.allow_ts2_accel is True
|
||||||
|
and self.constants.detected_os != self.constants.monterey
|
||||||
|
):
|
||||||
# TeraScale 2 patches must be installed after Intel HD3000
|
# TeraScale 2 patches must be installed after Intel HD3000
|
||||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2)
|
self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2)
|
||||||
|
|
||||||
if self.added_legacy_kexts is True and self.constants.detected_os in self.constants.legacy_accel_support:
|
if self.added_legacy_kexts is True and self.constants.detected_os in self.constants.legacy_accel_support:
|
||||||
self.gpu_accel_legacy_extended()
|
self.gpu_accel_legacy_extended()
|
||||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True and self.constants.detected_os != self.constants.monterey:
|
||||||
self.gpu_accel_legacy_extended_ts2()
|
self.gpu_accel_legacy_extended_ts2()
|
||||||
|
|
||||||
# Misc patches
|
# Misc patches
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ DeleteVolumeControl = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
AddNvidiaAccelLegacy = [
|
AddNvidiaAccelLegacy = [
|
||||||
#"GeForceGA.bundle",
|
# "GeForceGA.bundle",
|
||||||
"GeForceTesla.kext",
|
"GeForceTesla.kext",
|
||||||
"GeForceTeslaGLDriver.bundle",
|
"GeForceTeslaGLDriver.bundle",
|
||||||
"GeForceTeslaVADriver.bundle",
|
"GeForceTeslaVADriver.bundle",
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ def patching_status(os_sip, os):
|
|||||||
|
|
||||||
if os > Constants.Constants().catalina:
|
if os > Constants.Constants().catalina:
|
||||||
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||||
if fv_status.startswith("FileVault is Off"):
|
if "FileVault is Off" in fv_status:
|
||||||
fv_enabled = False
|
fv_enabled = False
|
||||||
else:
|
else:
|
||||||
fv_enabled = False
|
fv_enabled = False
|
||||||
|
|||||||
Reference in New Issue
Block a user