mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
Work-around Ivy/Haswell idle KP
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
- AMD Polaris and legacy GCN cannot be mixed in the same system
|
- AMD Polaris and legacy GCN cannot be mixed in the same system
|
||||||
- Legacy GCN support will be prioritized when both are present
|
- Legacy GCN support will be prioritized when both are present
|
||||||
- AMD Polaris GPU can still be used headless for rendering with legacy GCN (ex. [macOS: Prefer External GPU option](https://support.apple.com/en-ca/HT208544))
|
- AMD Polaris GPU can still be used headless for rendering with legacy GCN (ex. [macOS: Prefer External GPU option](https://support.apple.com/en-ca/HT208544))
|
||||||
|
- Disables unsupported `mediaanalysisd` on Ivy Bridge and Haswell
|
||||||
|
- Alleviates kernel panic on Ivy Bridge and Haswell when on prolonged idle
|
||||||
- Work-around MacPro6,1 and Lilu race condition
|
- Work-around MacPro6,1 and Lilu race condition
|
||||||
- Ensure Model and Board ID are set correctly before Lilu loads
|
- Ensure Model and Board ID are set correctly before Lilu loads
|
||||||
- Increment Binaries:
|
- Increment Binaries:
|
||||||
|
|||||||
@@ -511,8 +511,12 @@ class PatchSysVolume:
|
|||||||
else:
|
else:
|
||||||
print(f"- Running Process:\n{process}")
|
print(f"- Running Process:\n{process}")
|
||||||
utilities.process_status(subprocess.run(process, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True))
|
utilities.process_status(subprocess.run(process, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True))
|
||||||
if "AMD Legacy GCN" in required_patches or "AMD Legacy Polaris" in required_patches:
|
|
||||||
|
if any(x in required_patches for x in ["AMD Legacy GCN", "AMD Legacy Polaris"]):
|
||||||
sys_patch_helpers.sys_patch_helpers(self.constants).disable_window_server_caching()
|
sys_patch_helpers.sys_patch_helpers(self.constants).disable_window_server_caching()
|
||||||
|
if any(x in required_patches for x in ["Nvidia Kepler", "Intel Ivy Bridge", "Intel Haswell"]):
|
||||||
|
sys_patch_helpers.sys_patch_helpers(self.constants).disable_mediaanalysisd()
|
||||||
|
|
||||||
self.write_patchset(required_patches)
|
self.write_patchset(required_patches)
|
||||||
|
|
||||||
def preflight_checks(self, required_patches, source_files_path):
|
def preflight_checks(self, required_patches, source_files_path):
|
||||||
|
|||||||
@@ -138,8 +138,27 @@ class sys_patch_helpers:
|
|||||||
# corrupted Opaque shaders.
|
# corrupted Opaque shaders.
|
||||||
# To work-around this, we disable WindowServer caching
|
# To work-around this, we disable WindowServer caching
|
||||||
# And force macOS into properly generating the Opaque shaders
|
# And force macOS into properly generating the Opaque shaders
|
||||||
|
if self.constants.detected_os < os_data.os_data.ventura:
|
||||||
|
return
|
||||||
print("- Disabling WindowServer Caching")
|
print("- Disabling WindowServer Caching")
|
||||||
# Invoke via 'bash -c' to resolve pathing
|
# Invoke via 'bash -c' to resolve pathing
|
||||||
utilities.elevated(["bash", "-c", "rm -rf /private/var/folders/*/*/*/WindowServer/com.apple.WindowServer"])
|
utilities.elevated(["bash", "-c", "rm -rf /private/var/folders/*/*/*/WindowServer/com.apple.WindowServer"])
|
||||||
# Disable writing to WindowServer folder
|
# Disable writing to WindowServer folder
|
||||||
utilities.elevated(["bash", "-c", "chflags uchg /private/var/folders/*/*/*/WindowServer"])
|
utilities.elevated(["bash", "-c", "chflags uchg /private/var/folders/*/*/*/WindowServer"])
|
||||||
|
|
||||||
|
def disable_mediaanalysisd(self):
|
||||||
|
# On macOS Ventura, mediaanalysisd now hard locks the system when
|
||||||
|
# it runs in the background processing photos. The purpose is to
|
||||||
|
# build a database of keywords per image, however uses Metal 2
|
||||||
|
# features that are unsupported on Metal 1
|
||||||
|
# Thus, we write lock mediaanalysisd's defaults file to avoid it
|
||||||
|
# from finding the Photo Library
|
||||||
|
if self.constants.detected_os < os_data.os_data.ventura:
|
||||||
|
return
|
||||||
|
print("- Disabling mediaanalysisd")
|
||||||
|
media_pathing = Path("~/Library/Preferences/com.apple.mediaanalysisd.plist").expanduser()
|
||||||
|
if media_pathing.exists():
|
||||||
|
utilities.elevated(["rm", "-f", media_pathing])
|
||||||
|
utilities.elevated(["touch", media_pathing])
|
||||||
|
# Write lock the file
|
||||||
|
utilities.elevated(["chflags", "uchg", media_pathing])
|
||||||
Reference in New Issue
Block a user