From b55ca65554dbb19a8106a89fce481ab1d7485fcf Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Sat, 12 Oct 2024 16:48:34 +0700 Subject: [PATCH] Apply custom CPU name for unsupported CPUs --- Scripts/config_prodigy.py | 4 ++-- Scripts/kext_maestro.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/config_prodigy.py b/Scripts/config_prodigy.py index 202e2f3..8138043 100644 --- a/Scripts/config_prodigy.py +++ b/Scripts/config_prodigy.py @@ -379,7 +379,7 @@ class ConfigProdigy: if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): boot_args.append("revpatch=sbvmm{}".format(",cpuname" if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=3)) else "")) + self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)) else "")) if any(kext.checked for kext in kexts if kext.name == "CpuTopologyRebuild"): boot_args.append("-ctrsmt") @@ -543,7 +543,7 @@ class ConfigProdigy: config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].extend(["bluetoothExternalDongleFailed", "bluetoothInternalControllerInfo"]) if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=3)): + self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)): config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpu"] = 1 config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpuname"] = hardware_report.get("CPU").get("Processor Name") config["NVRAM"]["Delete"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"].extend(["revcpu", "revcpuname"]) diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 75a1cb3..434ec9d 100644 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -112,7 +112,7 @@ class KextMaestro: selected_kexts.append("SMCLightSensor") if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), end=3)) or \ + self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)) or \ self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0") or "MacPro7,1" in smbios_model: selected_kexts.append("RestrictEvents")