mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-22 02:50:15 +10:00
build: Add mediaanalysisd configuration
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
- Drops ColorSync downgrade configuration option
|
- Drops ColorSync downgrade configuration option
|
||||||
- Resolve app not updating in `/Applications` after an update
|
- Resolve app not updating in `/Applications` after an update
|
||||||
- Work-around users manually copying app to `/Applications` instead of allowing Root Volume Patcher to create a proper alias
|
- Work-around users manually copying app to `/Applications` instead of allowing Root Volume Patcher to create a proper alias
|
||||||
|
- Add configuration for mediaanalysisd usage
|
||||||
|
- For systems that are the primary iCloud Photo Library host, mediaanalysisd may be unstable on large amounts of unprocessed faces
|
||||||
|
- Applicable to 3802-based GPUs (ie. Intel Ivy Bridge and Haswell iGPUs, Nvidia Kepler dGPUs)
|
||||||
- Backend Changes:
|
- Backend Changes:
|
||||||
- device_probe.py:
|
- device_probe.py:
|
||||||
- Add USB device parsing via `IOUSBDevice` class
|
- Add USB device parsing via `IOUSBDevice` class
|
||||||
@@ -23,7 +26,7 @@
|
|||||||
- Resolve partition buttons overlapping in Install OpenCore UI
|
- Resolve partition buttons overlapping in Install OpenCore UI
|
||||||
- ex. "EFI" and additional FAT32 partitions on a single drive
|
- ex. "EFI" and additional FAT32 partitions on a single drive
|
||||||
- Re-enable mediaanalysisd on Ventura
|
- Re-enable mediaanalysisd on Ventura
|
||||||
- Allows for Live Text support on systems with3802 GPUs
|
- Allows for Live Text support on systems with 3802 GPUs
|
||||||
- ie. Intel Ivy Bridge and Haswell, Nvidia Kepler
|
- ie. Intel Ivy Bridge and Haswell, Nvidia Kepler
|
||||||
- Previously disabled due to high instability in Photos with Face Scanning, now resolved
|
- Previously disabled due to high instability in Photos with Face Scanning, now resolved
|
||||||
- Work-around crashing after patching with MenuBar2 implementation enabled
|
- Work-around crashing after patching with MenuBar2 implementation enabled
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ class BuildMiscellaneous:
|
|||||||
logging.info("- Disabling memory error reporting")
|
logging.info("- Disabling memory error reporting")
|
||||||
re_block_args.append("pcie")
|
re_block_args.append("pcie")
|
||||||
|
|
||||||
|
# Resolve mediaanalysisd crashing on 3802 GPUs
|
||||||
|
# Applicable for systems that are the primary iCloud Photos library host, with large amounts of unprocessed faces
|
||||||
|
if self.constants.disable_mediaanalysisd is True:
|
||||||
|
logging.info("- Disabling mediaanalysisd")
|
||||||
|
re_block_args.append("media")
|
||||||
|
|
||||||
return re_block_args
|
return re_block_args
|
||||||
|
|
||||||
|
|
||||||
@@ -182,14 +188,14 @@ class BuildMiscellaneous:
|
|||||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCButtons.kext")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCButtons.kext")["Enabled"] = True
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
|
||||||
|
|
||||||
if self.computer.internal_keyboard_type == "Legacy":
|
if self.computer.internal_keyboard_type == "Legacy":
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyKeyboardInjector.kext", self.constants.legacy_keyboard, self.constants.legacy_keyboard_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyKeyboardInjector.kext", self.constants.legacy_keyboard, self.constants.legacy_keyboard_path)
|
||||||
if self.computer.trackpad_type == "Legacy":
|
if self.computer.trackpad_type == "Legacy":
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path)
|
||||||
elif self.computer.trackpad_type == "Modern":
|
elif self.computer.trackpad_type == "Modern":
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
|
||||||
|
|
||||||
#Predefined fallback
|
#Predefined fallback
|
||||||
else:
|
else:
|
||||||
# Multi Touch Top Case support for macOS Ventura+
|
# Multi Touch Top Case support for macOS Ventura+
|
||||||
@@ -202,7 +208,7 @@ class BuildMiscellaneous:
|
|||||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
|
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
|
||||||
|
|
||||||
# Two-finger Top Case support for macOS High Sierra+
|
# Two-finger Top Case support for macOS High Sierra+
|
||||||
if self.model in ["MacBook4,1", "MacBook5,2"]:
|
if self.model in ["MacBook4,1", "MacBook5,2"]:
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path) # Also requires AppleUSBTopCase.kext
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path) # Also requires AppleUSBTopCase.kext
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ class Constants:
|
|||||||
self.disable_connectdrivers: bool = False # Disable ConnectDrivers (hibernation)
|
self.disable_connectdrivers: bool = False # Disable ConnectDrivers (hibernation)
|
||||||
self.set_content_caching: bool = False # Set Content Caching
|
self.set_content_caching: bool = False # Set Content Caching
|
||||||
self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID
|
self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID
|
||||||
|
self.disable_mediaanalysisd: bool = False # Set mediaanalysisd to spawn
|
||||||
self.set_alc_usage: bool = True # Set AppleALC usage
|
self.set_alc_usage: bool = True # Set AppleALC usage
|
||||||
self.allow_3rd_party_drives: bool = True # Allow ThridPartyDrives quirk
|
self.allow_3rd_party_drives: bool = True # Allow ThridPartyDrives quirk
|
||||||
self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches
|
self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches
|
||||||
|
|||||||
@@ -394,6 +394,17 @@ class SettingsFrame(wx.Frame):
|
|||||||
"for unsupported models.",
|
"for unsupported models.",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
"Disable mediaanalysisd service": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": self.constants.disable_mediaanalysisd,
|
||||||
|
"variable": "disable_mediaanalysisd",
|
||||||
|
"description": [
|
||||||
|
"For systems that are the primary iCloud",
|
||||||
|
"Photo Library host with a 3802-based GPU,",
|
||||||
|
"this may aid in prolonged idle stability.",
|
||||||
|
],
|
||||||
|
"condition": gui_support.CheckProperties(self.constants).host_has_3802_gpu()
|
||||||
|
},
|
||||||
"wrap_around 1": {
|
"wrap_around 1": {
|
||||||
"type": "wrap_around",
|
"type": "wrap_around",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import packaging.version
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from resources.wx_gui import gui_about
|
from resources.wx_gui import gui_about
|
||||||
from resources import constants
|
from resources import constants, device_probe
|
||||||
from data import model_array, os_data, smbios_data
|
from data import model_array, os_data, smbios_data
|
||||||
|
|
||||||
|
|
||||||
@@ -179,6 +179,26 @@ class CheckProperties:
|
|||||||
|
|
||||||
return packaging.version.parse(oclp_plist["PatcherSupportPkg"])
|
return packaging.version.parse(oclp_plist["PatcherSupportPkg"])
|
||||||
|
|
||||||
|
def host_has_3802_gpu(self) -> bool:
|
||||||
|
"""
|
||||||
|
Check if either host, or override model, has a 3802 GPU
|
||||||
|
"""
|
||||||
|
gpu_dict = [] if self.constants.custom_model else self.constants.computer.gpus
|
||||||
|
model = self.constants.custom_model if self.constants.custom_model else self.constants.computer.real_model
|
||||||
|
if gpu_dict == []:
|
||||||
|
gpu_dict = smbios_data.smbios_dictionary[model]["Stock GPUs"] if model in smbios_data.smbios_dictionary else []
|
||||||
|
|
||||||
|
for gpu in gpu_dict:
|
||||||
|
if not self.constants.custom_model:
|
||||||
|
gpu = gpu.arch
|
||||||
|
if gpu in [
|
||||||
|
device_probe.Intel.Archs.Ivy_Bridge,
|
||||||
|
device_probe.Intel.Archs.Haswell,
|
||||||
|
device_probe.NVIDIA.Archs.Kepler,
|
||||||
|
]:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
class PayloadMount:
|
class PayloadMount:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user