Add AMD brightness control patches

This commit is contained in:
Mykola Grymalyuk
2021-04-10 23:42:03 -06:00
parent 6a18334663
commit 0b225fbbbd
5 changed files with 46 additions and 16 deletions

View File

@@ -8,7 +8,7 @@
- AppleALC 1a3e5cb (1.6.0 rolling - 04-10-2021) - AppleALC 1a3e5cb (1.6.0 rolling - 04-10-2021)
- Enhance Wifi model detection - Enhance Wifi model detection
- Hide OpenShell.efi by default - Hide OpenShell.efi by default
- Add Brightness Control patches for legacy Nvidia and Intel GPUs - Add Brightness Control patches for legacy Nvidia, AMD and Intel GPUs
- Add user configurable Bootstrap setting - Add user configurable Bootstrap setting
## 0.0.22 ## 0.0.22

View File

@@ -103,6 +103,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
- Acidanthera:\tOpenCore, kexts and other tools - Acidanthera:\tOpenCore, kexts and other tools
- Khronokernel:\tWriting and maintaining this patcher - Khronokernel:\tWriting and maintaining this patcher
- DhinakG:\t\tWriting and maintaining this patcher - DhinakG:\t\tWriting and maintaining this patcher
- ASentientBot:\tLegacy Acceleration Patches
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
- Syncretic:\t\tAAAMouSSE and telemetrap - Syncretic:\t\tAAAMouSSE and telemetrap
- cdf:\t\tNightShiftEnabler"""]).start() - cdf:\t\tNightShiftEnabler"""]).start()
@@ -111,7 +113,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
utilities.header(["Patching System Volume"]) utilities.header(["Patching System Volume"])
print("""Patches Root volume to fix misc issues such as: print("""Patches Root volume to fix misc issues such as:
- Brightness control for non-Metal Nvidia and Intel GPUs - Brightness control for non-Metal GPUs
WARNING: Root Volume Patching is still in active development, please WARNING: Root Volume Patching is still in active development, please
have all important user data backed up. Note when the system volume have all important user data backed up. Note when the system volume

View File

@@ -332,7 +332,7 @@ LegacyGPU = [
"Macmini5,2", # AMD 6000 "Macmini5,2", # AMD 6000
"Macmini5,3", # Intel 3000 "Macmini5,3", # Intel 3000
"iMac7,1", # AMD 2000 "iMac7,1", # AMD 2000
#"iMac8,1", # AMD 2000 and AMD 2400 #"iMac8,1", # Nvidia and AMD 2400
"iMac9,1", # Nvidia 9000 "iMac9,1", # Nvidia 9000
#"iMac10,1", # Nvidia 9000 and AMD 4000 #"iMac10,1", # Nvidia 9000 and AMD 4000
"iMac11,1", # AMD 4000 "iMac11,1", # AMD 4000
@@ -371,7 +371,7 @@ LegacyGPUAMD = [
"MacBookPro8,3", # Intel 3000 + AMD 6000 "MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini5,2", # AMD 6000 "Macmini5,2", # AMD 6000
"iMac7,1", # AMD 2000 "iMac7,1", # AMD 2000
"iMac8,1", # AMD 2000 #"iMac8,1", # Nvidia and AMD 2000
#"iMac10,1", # Nvidia 9000 and AMD 4000 #"iMac10,1", # Nvidia 9000 and AMD 4000
"iMac11,1", # AMD 4000 "iMac11,1", # AMD 4000
"iMac11,2", # AMD 4000 and 5000 "iMac11,2", # AMD 4000 and 5000
@@ -380,6 +380,14 @@ LegacyGPUAMD = [
"iMac12,2", # AMD 6000 "iMac12,2", # AMD 6000
] ]
LegacyGPUAMDIntelGen2 = [
"MacBookPro8,2", # Intel 3000 + AMD 6000
"MacBookPro8,3", # Intel 3000 + AMD 6000
"Macmini5,2", # AMD 6000
"iMac12,1", # AMD 6000
"iMac12,2", # AMD 6000
]
LegacyGPUIntelGen1 = [ LegacyGPUIntelGen1 = [
"MacBookPro6,1", # Intel 100 + Nvidia 300 "MacBookPro6,1", # Intel 100 + Nvidia 300
"MacBookPro6,2", # Intel 100 + Nvidia 300 "MacBookPro6,2", # Intel 100 + Nvidia 300
@@ -961,6 +969,24 @@ AddAMDAccel11 = [
"IOSurface.kext", "IOSurface.kext",
] ]
AddAMDBrightness11 = [
"AMD2400Controller.kext",
"AMD2600Controller.kext",
"AMD3800Controller.kext",
"AMD4600Controller.kext",
"AMD4800Controller.kext",
"AMD5000Controller.kext",
"AMD6000Controller.kext",
"AMDLegacyFramebuffer.kext",
"AMDLegacySupport.kext",
"AMDRadeonX3000.kext",
"AMDRadeonX3000GLDriver.bundle",
"ATIRadeonX2000.kext",
"ATIRadeonX2000GA.plugin",
"ATIRadeonX2000GLDriver.bundle",
"ATIRadeonX2000VADriver.bundle",
]
AddIntelGen1Accel = [ AddIntelGen1Accel = [
"AppleIntelFramebufferAzul.kext", "AppleIntelFramebufferAzul.kext",
"AppleIntelFramebufferCapri.kext", "AppleIntelFramebufferCapri.kext",

View File

@@ -125,7 +125,7 @@ class PatchSysVolume:
# iMac8,1 and iMac10,1 came in both AMD and Nvidia GPU models, so we must do hardware detection # iMac8,1 and iMac10,1 came in both AMD and Nvidia GPU models, so we must do hardware detection
if self.model in ("iMac8,1", "iMac10,1"): if self.model in ("iMac8,1", "iMac10,1"):
if self.constants.current_gpuv == "AMD (0x1002)": if self.constants.current_gpuv == "AMD (0x1002)":
print("- Merging legacy AMD Kexts and Bundles") print("- Merging legacy AMD/ATI Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteAMDAccel11) self.delete_old_binaries(ModelArray.DeleteAMDAccel11)
self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path) self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path)
else: else:
@@ -191,19 +191,26 @@ class PatchSysVolume:
if self.model in ModelArray.LegacyGPUNvidia: if self.model in ModelArray.LegacyGPUNvidia:
print("- Adding Nvidia Brightness Control patches") print("- Adding Nvidia Brightness Control patches")
self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path) self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path)
#elif self.model in ModelArray.LegacyGPUAMD: elif self.model in ModelArray.LegacyGPUAMD:
# self.add_new_binaries(ModelArray.AddAMDBrightness11, self.constants.legacy_amd_path) print("- Adding AMD/ATI Brightness Control patches")
self.add_new_binaries(ModelArray.AddAMDBrightness11, self.constants.legacy_amd_path)
if self.model in ModelArray.LegacyGPUIntelGen1: if self.model in ModelArray.LegacyGPUIntelGen1:
print("- Adding Intel Ironlake Brightness Control patches") print("- Adding Intel Ironlake Brightness Control patches")
self.add_new_binaries(ModelArray.AddIntelGen1Brightness, self.constants.legacy_intel_gen1_path) self.add_new_binaries(ModelArray.AddIntelGen1Brightness, self.constants.legacy_intel_gen1_path)
elif self.model in ModelArray.LegacyGPUIntelGen2: elif self.model in ModelArray.LegacyGPUIntelGen2:
print("- Adding Intel Sandy Bridge Brightness Control patches") print("- Adding Intel Sandy Bridge Brightness Control patches")
self.add_new_binaries(ModelArray.AddIntelGen2Brightness, self.constants.legacy_intel_gen2_path) self.add_new_binaries(ModelArray.AddIntelGen2Brightness, self.constants.legacy_intel_gen2_path)
if self.model in ModelArray.LegacyGPUAMDIntelGen2:
# Swap custom AppleIntelSNBGraphicsFB-AMD.kext, required to fix linking
subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleIntelSNBGraphicsFB.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
subprocess.run(f"sudo cp -R {self.constants.legacy_amd_path}/AMD-Link/AppleIntelSNBGraphicsFB.kext {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
if self.model in ("iMac8,1", "iMac10,1"): if self.model in ("iMac8,1", "iMac10,1"):
if self.constants.current_gpuv == "NVIDIA (0x10de)": if self.constants.current_gpuv == "NVIDIA (0x10de)":
print("- Adding Nvidia Brightness Control patches") print("- Adding Nvidia Brightness Control patches")
self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path) self.add_new_binaries(ModelArray.AddNvidiaBrightness11, self.constants.legacy_nvidia_path)
else:
print("- Adding AMD/ATI Brightness Control patches")
self.add_new_binaries(ModelArray.AddAMDBrightness11, self.constants.legacy_amd_path)
if self.model in ModelArray.LegacyBrightness: if self.model in ModelArray.LegacyBrightness:
print("- Merging legacy Brightness Control Patches") print("- Merging legacy Brightness Control Patches")
self.delete_old_binaries(ModelArray.DeleteBrightness) self.delete_old_binaries(ModelArray.DeleteBrightness)

View File

@@ -16,11 +16,6 @@ The below table will list all supported and unsupported functions of the patcher
* [Mac Pro](#mac-pro) * [Mac Pro](#mac-pro)
* [Xserve](#xserve) * [Xserve](#xserve)
Note: Brightness Control is currently unsupported on AMD GPUs as well as on iMac7,1, iMac8,1, iMac9,1 and MacBook5,2
Note 2: For setups that require AppleHDA patching, we highly advise users instead opt of a USB Audio adapter to avoid root patching. This ensures that [DELTA](./TERMS.md) updates, FileVault, SIP and other security features can stay in-tact.
Regarding OS support, see below: Regarding OS support, see below:
| Support Entry | Supported OSes | Description | Comment | | Support Entry | Supported OSes | Description | Comment |
@@ -37,7 +32,7 @@ Regarding OS support, see below:
| MacBook3,1 | Late 2007 | ^^ | ^^ | | MacBook3,1 | Late 2007 | ^^ | ^^ |
| MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB<br/>- No Ethernet) | | MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB<br/>- No Ethernet) |
| MacBook5,1 | Late 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse | | MacBook5,1 | Late 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse |
| MacBook5,2 | Early 2009 | ^^ | ^^ | | MacBook5,2 | Early 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported |
| MacBook6,1 | Late 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> | | MacBook6,1 | Late 2009 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
| MacBook7,1 | Mid-2010 | ^^ | ^^ | | MacBook7,1 | Mid-2010 | ^^ | ^^ |
@@ -103,8 +98,8 @@ Regarding OS support, see below:
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation | | iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
| iMac5,2 | ^^ | ^^ | ^^ | | iMac5,2 | ^^ | ^^ | ^^ |
| iMac6,1 | ^^ | ^^ | ^^ | | iMac6,1 | ^^ | ^^ | ^^ |
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> | | iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an SSE4.1 CPU Upgrade<br/>- No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
| iMac8,1 | Early 2008 | ^^ | No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))) | | iMac8,1 | Early 2008 | ^^ | - No GPU Acceleration in Big Sur([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
| iMac9,1 | Early 2009 | ^^ | ^^ | | iMac9,1 | Early 2009 | ^^ | ^^ |
| iMac10,1 | Late 2009 | ^^ | GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) | | iMac10,1 | Late 2009 | ^^ | GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) |
| iMac11,1 | ^^ | ^^ | ^^ | | iMac11,1 | ^^ | ^^ | ^^ |