Merge pull request #208 from dortania/accel-testing

Import dosdude1 patches
This commit is contained in:
Mykola Grymalyuk
2021-05-09 08:08:38 -06:00
committed by GitHub
4 changed files with 36 additions and 26 deletions

View File

@@ -7,7 +7,7 @@
- Fix MacBookPro5,4 audio support
- Increment binaries
- AppleALC 58b57ee (1.6.1 rolling - 05-07-2021)
- Apple Binaries 9392993 (0.0.5 release - 05-08-2021)
- Apple Binaries 74bd80f (0.0.6 release - 05-09-2021)
- Support custom CPU names in About This Mac
- Fix NightShift accidentally disabling on Minimal SMBIOS configs
- Fix iMac9,1 audio support

View File

@@ -38,7 +38,7 @@ class Constants:
self.nvmefix_version = "1.0.7"
self.sidecarfixup_version = "1.0.0"
self.innie_version = "1.3.0"
self.payload_version = "0.0.5"
self.payload_version = "0.0.6"
# Get resource path
self.current_path = Path(__file__).parent.parent.resolve()
@@ -304,6 +304,8 @@ class Constants:
def legacy_intel_gen2_path(self): return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
@property
def legacy_intel_gen3_path(self): return self.legacy_graphics / Path("Intel-Gen7-IvyBridge")
@property
def legacy_general_path(self): return self.legacy_graphics / Path("General-Patches")
@property
def legacy_brightness(self): return self.payload_apple_kexts_path / Path("Brightness-Control")

View File

@@ -929,16 +929,16 @@ AddNvidiaAccel11 = [
]
AddNvidiaKeplerAccel11 = [
"GeForce.kext",
"GeForceAIRPlugin.bundle",
"GeForceGLDriver.bundle",
"GeForceMTLDriver.bundle",
"GeForceVADriver.bundle",
"NVDAGF100Hal.kext",
"NVDAGK100Hal.kext",
"NVDAResman.kext",
"NVDAStartup.kext",
"NVSMU.kext",
"GeForce.kext",
"GeForceAIRPlugin.bundle",
"GeForceGLDriver.bundle",
"GeForceMTLDriver.bundle",
"GeForceVADriver.bundle",
"NVDAGF100Hal.kext",
"NVDAGK100Hal.kext",
"NVDAResman.kext",
"NVDAStartup.kext",
"NVSMU.kext",
]
AddAMDAccel11 = [
@@ -962,8 +962,6 @@ AddAMDAccel11 = [
"ATIRadeonX2000GA.plugin",
"ATIRadeonX2000GLDriver.bundle",
"ATIRadeonX2000VADriver.bundle",
"IOAcceleratorFamily2.kext",
"IOSurface.kext",
]
AddIntelGen1Accel = [
@@ -972,7 +970,6 @@ AddIntelGen1Accel = [
"AppleIntelHDGraphicsGA.plugin",
"AppleIntelHDGraphicsGLDriver.bundle",
"AppleIntelHDGraphicsVADriver.bundle",
"IOSurface.kext",
]
AddIntelGen2Accel = [
@@ -982,15 +979,25 @@ AddIntelGen2Accel = [
"AppleIntelHD3000GraphicsVADriver.bundle",
"AppleIntelSNBGraphicsFB.kext",
"AppleIntelSNBVA.bundle",
"IOSurface.kext",
]
AddIntelGen3Accel = [
"AppleIntelFramebufferCapri.kext",
"AppleIntelHD4000Graphics.kext",
"AppleIntelHD4000GraphicsGLDriver.bundle",
"AppleIntelHD4000GraphicsMTLDriver.bundle",
"AppleIntelHD4000GraphicsVADriver.bundle",
"AppleIntelFramebufferCapri.kext",
"AppleIntelHD4000Graphics.kext",
"AppleIntelHD4000GraphicsGLDriver.bundle",
"AppleIntelHD4000GraphicsMTLDriver.bundle",
"AppleIntelHD4000GraphicsVADriver.bundle",
]
AddGeneralAccel = [
# Below 5 from dosdude1, unknown whether they benifit
#"AppleGraphicsControl.kext",
#"AppleGraphicsPowerManagement.kext",
#"AppleMCCSControl.kext",
#"IOGraphicsFamily.kext",
#"IONDRVSupport.kext",
"IOAcceleratorFamily2.kext",
"IOSurface.kext"
]
DeleteBrightness = [
@@ -1004,4 +1011,4 @@ AddBrightness = [
AddVolumeControl = [
"IOAudioFamily.kext",
]
]

View File

@@ -130,6 +130,7 @@ class PatchSysVolume:
if dgpu_device in PCIIDArray.nvidia_ids().tesla_ids or dgpu_device in PCIIDArray.nvidia_ids().fermi_ids:
print("- Merging legacy Nvidia Tesla and Fermi Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
# TODO: Enable below code if macOS 12 drops support
#elif dgpu_device in PCIIDArray.nvidia_ids().kepler_ids and self.constants.detected_os > self.constants.big_sur:
@@ -139,6 +140,7 @@ class PatchSysVolume:
if dgpu_device in PCIIDArray.amd_ids().terascale_1_ids or dgpu_device in PCIIDArray.amd_ids().terascale_2_ids:
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)
if igpu_vendor:
print(f"- Found IGPU: {igpu_vendor}:{igpu_device}")
@@ -146,15 +148,13 @@ class PatchSysVolume:
if igpu_device in PCIIDArray.intel_ids().iron_ids:
print("- Merging legacy Intel 1st Gen Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
self.add_new_binaries(ModelArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
elif igpu_device in PCIIDArray.intel_ids().sandy_ids:
print("- Merging legacy Intel 2nd Gen Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
self.add_new_binaries(ModelArray.AddIntelGen2Accel, 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()
# TODO: Enable below code if macOS 12 drops support
#elif igpu_device in PCIIDArray.intel_ids().ivy_ids:
@@ -165,6 +165,7 @@ class PatchSysVolume:
# Avoid patching twice, as Nvidia iGPUs will only have Nvidia dGPUs
print("- Merging legacy Nvidia Kexts and Bundles")
self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11)
self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path)
self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
# Frameworks