mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-19 13:46:05 +10:00
Fix crash on iMacs with Metal GPUs
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# OpenCore Legacy Patcher changelog
|
# OpenCore Legacy Patcher changelog
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
- Fix crash on iMacs with Metal GPUs
|
||||||
|
|
||||||
## 0.0.23
|
## 0.0.23
|
||||||
- Fix MacBookPro4,1 15" and 17" audio support
|
- Fix MacBookPro4,1 15" and 17" audio support
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
## 0.0.21
|
## 0.0.21
|
||||||
- Fix botched images in OpenCanopy
|
- Fix botched images in OpenCanopy
|
||||||
- Add support for 3rd party OpenCore usage detection during building
|
- Add support for 3rd party OpenCore usage detection during building
|
||||||
- Mainly for users transtioning from Ausdauersportler's OpenCore configuration
|
- Mainly for users transitioning from Ausdauersportler's OpenCore configuration
|
||||||
|
|
||||||
## 0.0.20
|
## 0.0.20
|
||||||
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class OpenCoreLegacyPatcher():
|
|||||||
self.constants.serial_settings = "Moderate"
|
self.constants.serial_settings = "Moderate"
|
||||||
if self.current_model in ModelArray.LegacyGPU:
|
if self.current_model in ModelArray.LegacyGPU:
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).check_pciid(False)
|
Build.BuildOpenCore(self.constants.custom_model or self.current_model, self.constants).check_pciid(False)
|
||||||
if not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs):
|
if not (self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs) or not (self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs):
|
||||||
self.constants.sip_status = False
|
self.constants.sip_status = False
|
||||||
self.constants.secure_status = False
|
self.constants.secure_status = False
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class BuildOpenCore:
|
|||||||
def check_pciid(self, print_status):
|
def check_pciid(self, print_status):
|
||||||
try:
|
try:
|
||||||
self.constants.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
self.constants.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||||
self.constants.igpu_devices = [i for i in self.constants.igpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
|
#self.constants.igpu_devices = [i for i in self.constants.igpu_devices if i["class-code"] == binascii.unhexlify("00000300") or i["class-code"] == binascii.unhexlify("00800300")]
|
||||||
self.constants.igpu_vendor = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["vendor-id"]).decode()[:4])
|
self.constants.igpu_vendor = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["vendor-id"]).decode()[:4])
|
||||||
self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4])
|
self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4])
|
||||||
if print_status is True:
|
if print_status is True:
|
||||||
@@ -58,7 +58,7 @@ class BuildOpenCore:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.constants.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
self.constants.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||||
self.constants.dgpu_devices = [i for i in self.constants.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300")]
|
#self.constants.dgpu_devices = [i for i in self.constants.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300") or i["class-code"] == binascii.unhexlify("00800300")]
|
||||||
self.constants.dgpu_vendor = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["vendor-id"]).decode()[:4])
|
self.constants.dgpu_vendor = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["vendor-id"]).decode()[:4])
|
||||||
self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4])
|
self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4])
|
||||||
if print_status is True:
|
if print_status is True:
|
||||||
@@ -313,13 +313,13 @@ class BuildOpenCore:
|
|||||||
nvidia_patch(self)
|
nvidia_patch(self)
|
||||||
else:
|
else:
|
||||||
print("- Failed to find vendor")
|
print("- Failed to find vendor")
|
||||||
elif self.constants.custom_model == "None":
|
elif not self.constants.custom_model:
|
||||||
self.check_pciid(True)
|
self.check_pciid(True)
|
||||||
if self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs:
|
if self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs:
|
||||||
amd_patch(self)
|
amd_patch(self)
|
||||||
elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs:
|
elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs:
|
||||||
nvidia_patch(self)
|
nvidia_patch(self)
|
||||||
elif self.model in ModelArray.MacPro71:
|
if self.model in ModelArray.MacPro71:
|
||||||
print("- Adding Mac Pro, Xserve DRM patches")
|
print("- Adding Mac Pro, Xserve DRM patches")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||||
|
|
||||||
@@ -409,11 +409,11 @@ class BuildOpenCore:
|
|||||||
print("- Spoofing to iMacPro1,1")
|
print("- Spoofing to iMacPro1,1")
|
||||||
spoofed_model = "iMacPro1,1"
|
spoofed_model = "iMacPro1,1"
|
||||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||||
elif (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs) & (self.constants.custom_model == "None"):
|
elif self.constants.dgpu_vendor == self.constants.pci_amd_ati and self.constants.dgpu_device in ModelArray.AMDMXMGPUs and not self.constants.custom_model:
|
||||||
print("- Spoofing to iMacPro1,1")
|
print("- Spoofing to iMacPro1,1")
|
||||||
spoofed_model = "iMacPro1,1"
|
spoofed_model = "iMacPro1,1"
|
||||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||||
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs) & (self.constants.custom_model == "None"):
|
elif self.constants.dgpu_devices and self.constants.dgpu_vendor == self.constants.pci_nvidia and self.constants.dgpu_device in ModelArray.NVIDIAMXMGPUs:
|
||||||
print("- Spoofing to iMacPro1,1")
|
print("- Spoofing to iMacPro1,1")
|
||||||
spoofed_model = "iMacPro1,1"
|
spoofed_model = "iMacPro1,1"
|
||||||
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
spoofed_board = "Mac-7BA5B2D9E42DDD94"
|
||||||
|
|||||||
Reference in New Issue
Block a user