Compare commits

...

14 Commits
fv2 ... main

Author SHA1 Message Date
Dhinak G
b9df76ebdf detect.py: Fix missing import 2026-03-19 12:31:54 -04:00
Dhinak G
703acc9c19 Sync CHANGELOG 2026-03-19 12:23:34 -04:00
Dhinak G
46404c07ef Sync kexts 2026-03-19 12:23:07 -04:00
Dhinak G
aec949a17c Move JavaScriptCore AVX patch to RestrictEvents 2026-03-19 12:22:40 -04:00
Dhinak G
6d97152078 Sync OpenCorePkg 2026-03-19 12:13:50 -04:00
neon ball
b372a3f73e Fix link 2025-12-30 18:48:52 +02:00
neon ball
896c0fef58 Clarify a little 2025-12-29 14:55:03 +02:00
Dhinak G
7c626eb185 Sync PatcherSupportPkg 2025-12-23 22:38:40 -05:00
Eva Isabella Luna
a9795b7b5f Implement new modern wireless patchset (#1178) 2025-12-23 22:36:03 -05:00
neon ball
7b371e07f1 Fix links 2025-12-23 20:42:51 +02:00
neon ball
e60a53052e Add "This page has moved" for old troubleshooting 2025-12-23 20:42:01 +02:00
Dhinak G
f71c8ddeaa Update changelog & increment build 2025-12-19 16:23:24 -05:00
Eva Isabella Luna
806d47f413 Disable repatching a dirty root volume (#1179)
Co-authored-by: Dhinak G <17605561+dhinakg@users.noreply.github.com>
2025-12-19 16:06:11 -05:00
neon ball
b5da41c030 Restructure steps and add IR option 2025-12-14 23:22:59 +02:00
25 changed files with 155 additions and 110 deletions

View File

@@ -1,5 +1,18 @@
# OpenCore Legacy Patcher changelog # OpenCore Legacy Patcher changelog
## 2.5.0
- Disable repatching a dirty root volume
- Prevents issues if existing patches are partially overwritten
- Thanks @crystall1nedev!
- Add slimmed down patchset for Modern Wireless for macOS Sequoia
- Move JavaScriptCore patch for pre-AVX Macs to RestrictEvents
- Additionally fixes machines without WiFi cards on Sonoma+ as the patch was not applied before
- Increment binaries:
- OpenCorePkg 1.0.4 - release
- Lilu 1.7.1 - release
- RestrictEvents 1.1.7 - (rolling - b70aaa4)
- PatcherSupportPkg 1.9.6 - release
## 2.4.1 ## 2.4.1
- Switch installer source to AppleDB - Switch installer source to AppleDB
- Resolves missing or incorrect installers showing up when downloading an installer - Resolves missing or incorrect installers showing up when downloading an installer

10
docs/ACCEL.md Normal file
View File

@@ -0,0 +1,10 @@
This page has moved.
* [Application troubleshooting](./TROUBLESHOOT-APP.md)
* [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
* [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
* [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)

View File

@@ -93,7 +93,7 @@ When installing macOS Sonoma or newer on a T1 system (2016-2017), full disk wipe
<img src="./images/wipe-volume.png" alt="WipeVolume" width="800" /> <img src="./images/wipe-volume.png" alt="WipeVolume" width="800" />
</div> </div>
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#no-t1-functionality-after-installing-sonoma-or-newer) [More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOT-HARDWARE.html#no-t1-functionality-after-installing-sonoma-or-newer)
::: :::

View File

@@ -14,7 +14,7 @@ The below page is for users experiencing issues with their overall usage of macO
## Broken Firefox and Thunderbird (HD 3000) ## Broken Firefox and Thunderbird (HD 3000)
[Due to removal of HD 3000 support workarounds](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) in Firefox/Thunderbird v145, Firefox and Thunderbird on HD 3000 are now broken. This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable. Firefox and Thunderbird are now broken on HD 3000 [due to removal of HD 3000 support by Mozilla in v145.](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable.
::: details Affected Mac models (click to expand) ::: details Affected Mac models (click to expand)

6
docs/TROUBLESHOOTING.md Normal file
View File

@@ -0,0 +1,6 @@
This page has moved.
- [Application troubleshooting](./TROUBLESHOOT-APP.md)
- [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
- [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
- [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)

View File

@@ -4,12 +4,16 @@ This guide tells you different ways to uninstall OCLP and/or patches.
## Delete everything and revert back to native macOS ## Delete everything and revert back to native macOS
1. Create a USB drive with the latest officially supported macOS installer. 1. Create a USB drive with the latest officially supported macOS installer or alternatively [on most Macs](https://apple.stackexchange.com/questions/383985/which-macs-support-macos-internet-recovery) use Internet Recovery.
2. Restart the computer and [Reset NVRAM.](https://support.apple.com/HT204063) * Hold `cmd` + `Option (Alt)` + `R` for Internet Recovery.
3. Boot the computer using the installer USB drive. * If doing Internet Recovery, skip step 2.
* Caution: Internet Recovery may not always install the latest officially supported OS version.
3. Restart and boot the computer using the installer USB drive by holding `Option (Alt)`.
4. Go to Disk Utility and choose View -> Show All Devices. 4. Go to Disk Utility and choose View -> Show All Devices.
5. Wipe the full disk by choosing the top disk option on the left sidebar and selecting "Erase". 5. Wipe the full disk by choosing the top disk option on the left sidebar and selecting "Erase".
6. Start macOS installation. 6. Start macOS installation.
7. Once finished, restart once more and [Reset NVRAM](https://support.apple.com/HT204063) to ensure a fully clean and stock system.
## Manual methods ## Manual methods

View File

@@ -13,8 +13,8 @@ from .detections import device_probe
class Constants: class Constants:
def __init__(self) -> None: def __init__(self) -> None:
# Patcher Versioning # Patcher Versioning
self.patcher_version: str = "2.4.1" # OpenCore-Legacy-Patcher self.patcher_version: str = "2.5.0" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "1.9.5" # PatcherSupportPkg self.patcher_support_pkg_version: str = "1.9.6" # PatcherSupportPkg
self.copyright_date: str = "Copyright © 2020-2025 Dortania" self.copyright_date: str = "Copyright © 2020-2025 Dortania"
self.patcher_name: str = "OpenCore Legacy Patcher" self.patcher_name: str = "OpenCore Legacy Patcher"
@@ -33,13 +33,13 @@ class Constants:
# Kext Versioning # Kext Versioning
## Acidanthera ## Acidanthera
## https://github.com/acidanthera ## https://github.com/acidanthera
self.lilu_version: str = "1.7.0" # Lilu self.lilu_version: str = "1.7.1" # Lilu
self.whatevergreen_version: str = "1.6.9" # WhateverGreen self.whatevergreen_version: str = "1.6.9" # WhateverGreen
self.whatevergreen_navi_version: str = "1.6.9-Navi" # WhateverGreen (Navi Patch) self.whatevergreen_navi_version: str = "1.6.9-Navi" # WhateverGreen (Navi Patch)
self.airportbcrmfixup_version: str = "2.1.9" # AirPortBrcmFixup self.airportbcrmfixup_version: str = "2.1.9" # AirPortBrcmFixup
self.nvmefix_version: str = "1.1.2" # NVMeFix self.nvmefix_version: str = "1.1.2" # NVMeFix
self.applealc_version: str = "1.6.3" # AppleALC self.applealc_version: str = "1.6.3" # AppleALC
self.restrictevents_version: str = "1.1.5" # RestrictEvents self.restrictevents_version: str = "1.1.7" # RestrictEvents
self.featureunlock_version: str = "1.1.7" # FeatureUnlock self.featureunlock_version: str = "1.1.7" # FeatureUnlock
self.debugenhancer_version: str = "1.1.0" # DebugEnhancer self.debugenhancer_version: str = "1.1.0" # DebugEnhancer
self.cpufriend_version: str = "1.2.9" # CPUFriend self.cpufriend_version: str = "1.2.9" # CPUFriend

View File

@@ -155,6 +155,11 @@ xw
logging.info("- Fixing CoreGraphics support on Ivy Bridge") logging.info("- Fixing CoreGraphics support on Ivy Bridge")
re_patch_args.append("f16c") re_patch_args.append("f16c")
# Patch AVX hardcoding in JavaScriptCore
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
logging.info("- Fixing AVX hardcoding in JavaScriptCore")
re_patch_args.append("jsc")
return re_patch_args return re_patch_args

View File

@@ -44,7 +44,6 @@ from .hardware.misc import (
pcie_webcam, pcie_webcam,
t1_security, t1_security,
usb11, usb11,
cpu_missing_avx,
) )
from ... import constants from ... import constants
@@ -89,6 +88,7 @@ class HardwarePatchsetValidation(StrEnum):
NVDA_DRV_MISSING = "Validation: nvda_drv(_vrl) variable missing" NVDA_DRV_MISSING = "Validation: nvda_drv(_vrl) variable missing"
PATCHING_NOT_POSSIBLE = "Validation: Patching not possible" PATCHING_NOT_POSSIBLE = "Validation: Patching not possible"
UNPATCHING_NOT_POSSIBLE = "Validation: Unpatching not possible" UNPATCHING_NOT_POSSIBLE = "Validation: Unpatching not possible"
REPATCHING_NOT_SUPPORTED = "Validation: Root volume dirty, unpatch to continue"
class HardwarePatchsetDetection: class HardwarePatchsetDetection:
@@ -134,7 +134,6 @@ class HardwarePatchsetDetection:
pcie_webcam.PCIeFaceTimeCamera, pcie_webcam.PCIeFaceTimeCamera,
t1_security.T1SecurityChip, t1_security.T1SecurityChip,
usb11.USB11Controller, usb11.USB11Controller,
cpu_missing_avx.CPUMissingAVX,
] ]
self.device_properties = None self.device_properties = None
@@ -185,6 +184,42 @@ class HardwarePatchsetDetection:
return "FileVault is Off" not in subprocess.run(["/usr/bin/fdesetup", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() return "FileVault is Off" not in subprocess.run(["/usr/bin/fdesetup", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
def _validation_check_repatching_is_possible(self) -> bool:
"""
Determine if repatching is not allowed
"""
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
if not Path(oclp_patch_path).exists():
return self._is_root_volume_dirty()
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
if self._constants.computer.oclp_sys_url != self._constants.commit_info[2]:
logging.error("Installed patches are from different commit, unpatching is required")
return True
wireless_keys = {"Legacy Wireless", "Modern Wireless Common"}
# Keep in sync with generate_patchset_plist
metadata_keys = {
"OpenCore Legacy Patcher",
"PatcherSupportPkg",
"Time Patched",
"Commit URL",
"Kernel Debug Kit Used",
"Metal Library Used",
"OS Version",
"Custom Signature",
}
existing_patches = set(oclp_plist) - wireless_keys - metadata_keys
if existing_patches:
logging.error(f"Patch(es) already installed: {', '.join(existing_patches)}, unpatching is required")
return True
return False
def _validation_check_system_integrity_protection_enabled(self, configs: list[str]) -> bool: def _validation_check_system_integrity_protection_enabled(self, configs: list[str]) -> bool:
""" """
Determine if System Integrity Protection is enabled Determine if System Integrity Protection is enabled
@@ -308,6 +343,28 @@ class HardwarePatchsetDetection:
return metallib_handler.MetalLibraryObject(self._constants, self._os_build, self._os_version).metallib_already_installed return metallib_handler.MetalLibraryObject(self._constants, self._os_build, self._os_version).metallib_already_installed
def _is_root_volume_dirty(self) -> bool:
"""
Determine if system volume is not sealed
"""
# macOS 11.0 introduced sealed system volumes
if self._xnu_major < os_data.big_sur.value:
return False
try:
content = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", "/"], capture_output=True).stdout)
except plistlib.InvalidFileException:
raise RuntimeError("Failed to parse diskutil output.")
seal = content["Sealed"]
if "Broken" in seal:
logging.error(f"System volume is tainted, unpatching is required")
return True
return False
def _can_patch(self, requirements: dict, ignore_keys: list[str] = []) -> bool: def _can_patch(self, requirements: dict, ignore_keys: list[str] = []) -> bool:
""" """
Check if patching is possible Check if patching is possible
@@ -500,6 +557,7 @@ class HardwarePatchsetDetection:
HardwarePatchsetValidation.SIP_ENABLED: self._validation_check_system_integrity_protection_enabled(required_sip_configs), HardwarePatchsetValidation.SIP_ENABLED: self._validation_check_system_integrity_protection_enabled(required_sip_configs),
HardwarePatchsetValidation.SECURE_BOOT_MODEL_ENABLED: self._validation_check_secure_boot_model_enabled(), HardwarePatchsetValidation.SECURE_BOOT_MODEL_ENABLED: self._validation_check_secure_boot_model_enabled(),
HardwarePatchsetValidation.AMFI_ENABLED: self._validation_check_amfi_enabled(highest_amfi_level), HardwarePatchsetValidation.AMFI_ENABLED: self._validation_check_amfi_enabled(highest_amfi_level),
HardwarePatchsetValidation.REPATCHING_NOT_SUPPORTED: self._validation_check_repatching_is_possible(),
HardwarePatchsetValidation.WHATEVERGREEN_MISSING: self._validation_check_whatevergreen_missing() if has_nvidia_web_drivers is True else False, HardwarePatchsetValidation.WHATEVERGREEN_MISSING: self._validation_check_whatevergreen_missing() if has_nvidia_web_drivers is True else False,
HardwarePatchsetValidation.FORCE_OPENGL_MISSING: self._validation_check_force_opengl_missing() if has_nvidia_web_drivers is True else False, HardwarePatchsetValidation.FORCE_OPENGL_MISSING: self._validation_check_force_opengl_missing() if has_nvidia_web_drivers is True else False,
HardwarePatchsetValidation.FORCE_COMPAT_MISSING: self._validation_check_force_compat_missing() if has_nvidia_web_drivers is True else False, HardwarePatchsetValidation.FORCE_COMPAT_MISSING: self._validation_check_force_compat_missing() if has_nvidia_web_drivers is True else False,

View File

@@ -1,86 +0,0 @@
"""
cpu_missing_avx.py: Legacy CPUs (Lacking AVX) Detection
Note that this system is implemented only for macOS Ventura and
machines not using the legacy/modern wireless patches (AVX patch integrated into WiFi patches).
This commit implemented unconditional AVX usage, thus Safari 18.2 and later will crash:
https://github.com/WebKit/WebKit/commit/c15e741266db8ff9df309ce9971eda1cfd9021cc
"""
from ..base import BaseHardware, HardwareVariant
from ..networking.legacy_wireless import LegacyWireless
from ..networking.modern_wireless import ModernWireless
from ...base import PatchType
from .....constants import Constants
from .....datasets.os_data import os_data
class CPUMissingAVX(BaseHardware):
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
def name(self) -> str:
"""
Display name for end users
"""
return f"{self.hardware_variant()}: Legacy CPUs (Lacking AVX)"
def present(self) -> bool:
"""
Targeting CPUs without AVX support
"""
if self._constants.computer.rosetta_active is True:
return False
if "AVX1.0" in self._constants.computer.cpu.flags:
return False
return True
def native_os(self) -> bool:
"""
Only install this patch on macOS Ventura.
This is because we integrated the patch into the WiFi patches which all Macs use in Sonoma+.
"""
if self._xnu_major != os_data.ventura.value:
return True
if LegacyWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
return True
if ModernWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
return True
return False
def hardware_variant(self) -> HardwareVariant:
"""
Type of hardware variant
"""
return HardwareVariant.MISCELLANEOUS
def patches(self) -> dict:
"""
Patches for Legacy CPUs (Lacking AVX)
"""
if self.native_os() is True:
return {}
return {
"CPU Missing AVX": {
PatchType.MERGE_SYSTEM_VOLUME: {
"/System/Library/PrivateFrameworks": {
"IO80211.framework": "13.7.2-22",
},
}
},
}

View File

@@ -52,23 +52,18 @@ class ModernWireless(BaseHardware):
""" """
return HardwareVariant.NETWORKING return HardwareVariant.NETWORKING
def _patches_modern_wireless_common_extended(self) -> dict:
def patches(self) -> dict:
""" """
Patches for Modern Wireless Extended modern wireless patches
""" """
if self.native_os() is True: if self._xnu_major > os_data.sonoma:
return {} return {}
return { return {
"Modern Wireless": { "Modern Wireless Extended": {
PatchType.OVERWRITE_SYSTEM_VOLUME: { PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/usr/libexec": { "/usr/libexec": {
"airportd": f"13.7.2-{self._xnu_major}", "airportd": f"13.7.2-{self._xnu_major}",
"wifip2pd": f"13.7.2-{self._xnu_major}",
},
"/System/Library/CoreServices": {
**({ "WiFiAgent.app": "14.7.2" } if self._xnu_major >= os_data.sequoia else {}),
}, },
}, },
PatchType.MERGE_SYSTEM_VOLUME: { PatchType.MERGE_SYSTEM_VOLUME: {
@@ -77,9 +72,42 @@ class ModernWireless(BaseHardware):
}, },
"/System/Library/PrivateFrameworks": { "/System/Library/PrivateFrameworks": {
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}", "CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
},
},
},
}
def _patches_modern_wireless_common(self) -> dict:
"""
Common modern wireless patches
"""
return {
"Modern Wireless Common": {
PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/usr/libexec": {
"wifip2pd": f"13.7.2-{self._xnu_major}",
},
},
PatchType.MERGE_SYSTEM_VOLUME: {
"/System/Library/PrivateFrameworks": {
"IO80211.framework": f"13.7.2-{self._xnu_major}", "IO80211.framework": f"13.7.2-{self._xnu_major}",
"WiFiPeerToPeer.framework": f"13.7.2-{self._xnu_major}", "WiFiPeerToPeer.framework": f"13.7.2-{self._xnu_major}",
}, },
} },
}, },
} }
def patches(self) -> dict:
"""
Dictionary of patches
"""
if self.native_os() is True:
return {}
return {
**self._patches_modern_wireless_common(),
**self._patches_modern_wireless_common_extended(),
}
return _base

View File

@@ -229,7 +229,7 @@ class SysPatchDisplayFrame(wx.Frame):
start_button.Disable() start_button.Disable()
else: else:
self.available_patches = True self.available_patches = True
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True: if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True or no_new_patches is True:
start_button.Disable() start_button.Disable()
elif no_new_patches is False: elif no_new_patches is False:
start_button.SetDefault() start_button.SetDefault()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -60,6 +60,13 @@ UNUSED_DRIVERS = [
"RamDiskDxe.efi", "RamDiskDxe.efi",
"Mtftp6Dxe.efi", "Mtftp6Dxe.efi",
"OpenNetworkBoot.efi", "OpenNetworkBoot.efi",
"VirtioSerialDxe.efi",
"VirtioBlkDxe.efi",
"VirtioPciDeviceDxe.efi",
"VirtioNetDxe.efi",
"VirtioGpuDxe.efi",
"VirtioScsiDxe.efi",
"Virtio10.efi",
] ]
UNUSED_TOOLS = [ UNUSED_TOOLS = [

Binary file not shown.

Binary file not shown.