diff --git a/CHANGELOG.md b/CHANGELOG.md index a18babf5d..db29139dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ - Support space in path when downloading Root Patches - Enable PanicNoKextDump by default - Expand AppleGraphicsPowerManagement and AppleGraphicsDeviceControl Override support -- Fix MacBookPro8,2/3 Hibernation wake +- Fix MacBookPro8,2/3 Brightness Control + - dGPU must be disabled via NVRAM or deMUXed ## 0.1.4 - Fix Device Path formatting on 2012+ iMacs diff --git a/Resources/Build.py b/Resources/Build.py index c3555d58d..de6843a11 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -541,8 +541,6 @@ class BuildOpenCore: print("- Adding CPU Name Patch") if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False: self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path) - if self.model in ModelArray.AMCSupport: - self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"wegnoegpu": binascii.unhexlify("01000000")} def set_smbios(self): spoofed_model = self.model diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py index 041a0b6ef..37c5a6064 100644 --- a/Resources/ModelArray.py +++ b/Resources/ModelArray.py @@ -984,7 +984,7 @@ AddAMDAccel11 = [ "AMDLegacySupport.kext", "AMDRadeonVADriver.bundle", "AMDRadeonVADriver2.bundle", - "AMDRadeonX3000.kext", + #"AMDRadeonX3000.kext", "AMDRadeonX3000GLDriver.bundle", "AMDShared.bundle", "AMDSupport.kext", diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index a863036aa..ed68d0e56 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -132,6 +132,21 @@ class PatchSysVolume: self.delete_old_binaries(ModelArray.DeleteAMDAccel11) self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path) + if self.model in ["MacBookPro8,2", "MacBookPro8,3"]: + # This is used for MacBookPro8,2/3 where dGPU is disabled via NVRAM and still requires AMD framebuffer + # For reference: + #- deMUX: Don't need the AMD patches + #- dGPUs enabled: Don't install the AMD patches (Infinite login loop otherwise) + #- dGPUs disabled: Do need the AMD patches (Restores Brightness control) + dgpu_status: str = subprocess.run("nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() + if dgpu_status.startswith("FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs %01"): + print("- Detected dGPU is disabled via NVRAM") + print("- Merging legacy AMD Kexts and Bundles") + self.delete_old_binaries(ModelArray.DeleteAMDAccel11) + self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path) + else: + print("- Cannot install Brightness Control, pleas ensure the dGPU is disabled via NVRAM") if igpu_vendor: print(f"- Found IGPU: {igpu_vendor}:{igpu_device}") if igpu_vendor == self.constants.pci_intel: