mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
Merge pull request #227 from dortania/terascale-2-test
Add basic MacBookPro8,2/3 Brightness Control
This commit is contained in:
+2
-1
@@ -9,7 +9,8 @@
|
|||||||
- Support space in path when downloading Root Patches
|
- Support space in path when downloading Root Patches
|
||||||
- Enable PanicNoKextDump by default
|
- Enable PanicNoKextDump by default
|
||||||
- Expand AppleGraphicsPowerManagement and AppleGraphicsDeviceControl Override support
|
- 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
|
## 0.1.4
|
||||||
- Fix Device Path formatting on 2012+ iMacs
|
- Fix Device Path formatting on 2012+ iMacs
|
||||||
|
|||||||
@@ -541,8 +541,6 @@ class BuildOpenCore:
|
|||||||
print("- Adding CPU Name Patch")
|
print("- Adding CPU Name Patch")
|
||||||
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
|
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)
|
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):
|
def set_smbios(self):
|
||||||
spoofed_model = self.model
|
spoofed_model = self.model
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ AddAMDAccel11 = [
|
|||||||
"AMDLegacySupport.kext",
|
"AMDLegacySupport.kext",
|
||||||
"AMDRadeonVADriver.bundle",
|
"AMDRadeonVADriver.bundle",
|
||||||
"AMDRadeonVADriver2.bundle",
|
"AMDRadeonVADriver2.bundle",
|
||||||
"AMDRadeonX3000.kext",
|
#"AMDRadeonX3000.kext",
|
||||||
"AMDRadeonX3000GLDriver.bundle",
|
"AMDRadeonX3000GLDriver.bundle",
|
||||||
"AMDShared.bundle",
|
"AMDShared.bundle",
|
||||||
"AMDSupport.kext",
|
"AMDSupport.kext",
|
||||||
|
|||||||
@@ -132,6 +132,21 @@ class PatchSysVolume:
|
|||||||
self.delete_old_binaries(ModelArray.DeleteAMDAccel11)
|
self.delete_old_binaries(ModelArray.DeleteAMDAccel11)
|
||||||
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
|
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||||
self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_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:
|
if igpu_vendor:
|
||||||
print(f"- Found IGPU: {igpu_vendor}:{igpu_device}")
|
print(f"- Found IGPU: {igpu_vendor}:{igpu_device}")
|
||||||
if igpu_vendor == self.constants.pci_intel:
|
if igpu_vendor == self.constants.pci_intel:
|
||||||
|
|||||||
Reference in New Issue
Block a user