From 025d03e7e85c0b14c388b3cb5ae49e9ee4204838 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Fri, 7 May 2021 14:56:32 -0600 Subject: [PATCH] Fix crashing --- OCLP-CLI.command | 2 +- OpenCore-Patcher.command | 2 +- Resources/SysPatch.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OCLP-CLI.command b/OCLP-CLI.command index 721187a4e..52faff41e 100755 --- a/OCLP-CLI.command +++ b/OCLP-CLI.command @@ -30,7 +30,7 @@ class OpenCoreLegacyPatcher(): if self.current_model in ModelArray.NoAPFSsupport: self.constants.serial_settings = "Moderate" if self.current_model in ModelArray.LegacyGPU: - dgpu_vendor,dgpu_device = DeviceProbe.pci_probe().gpu_probe("GFX0") + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") if (dgpu_vendor == self.constants.pci_amd_ati and dgpu_device in ModelArray.AMDMXMGPUs) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in ModelArray.NVIDIAMXMGPUs): self.constants.sip_status = True diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 3d8e123fc..595449cd8 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -27,7 +27,7 @@ class OpenCoreLegacyPatcher(): if self.current_model in ModelArray.NoAPFSsupport: self.constants.serial_settings = "Moderate" if self.current_model in ModelArray.LegacyGPU: - dgpu_vendor,dgpu_device = DeviceProbe.pci_probe().gpu_probe("GFX0") + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") if (dgpu_vendor == self.constants.pci_amd_ati and dgpu_device in ModelArray.AMDMXMGPUs) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in ModelArray.NVIDIAMXMGPUs): self.constants.sip_status = True diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index 7a76f55aa..4e281c239 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -122,8 +122,8 @@ class PatchSysVolume: subprocess.run(f"sudo chown -R root:wheel {self.mount_private_frameworks}/DisplayServices.framework".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() def gpu_accel_patches_11(self): - igpu_vendor,igpu_device = DeviceProbe.pci_probe().gpu_probe("IGPU") - dgpu_vendor,dgpu_device = DeviceProbe.pci_probe().gpu_probe("GFX0") + igpu_vendor,igpu_device,igpu_acpi = DeviceProbe.pci_probe().gpu_probe("IGPU") + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") if dgpu_vendor: print(f"- Found GFX0: {dgpu_vendor}:{dgpu_device}") if dgpu_vendor == self.constants.pci_nvidia: @@ -201,7 +201,7 @@ class PatchSysVolume: subprocess.run(f"sudo find {self.constants.payload_apple_root_path} -name '.DS_Store' -delete".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() if self.model in ModelArray.LegacyGPU or self.constants.assume_legacy is True: - dgpu_vendor,dgpu_device = DeviceProbe.pci_probe().gpu_probe("GFX0") + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") if dgpu_vendor and dgpu_vendor == self.constants.pci_amd_ati and dgpu_device in ModelArray.AMDMXMGPUs: print("- Detected Metal-based AMD GPU, skipping legacy patches") elif dgpu_vendor and dgpu_vendor == self.constants.pci_nvidia and dgpu_device in ModelArray.NVIDIAMXMGPUs: