Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c573a8a335 | ||
|
|
1393db72dd | ||
|
|
ba82b41cbd | ||
|
|
97a9853526 | ||
|
|
f1d67923c8 | ||
|
|
0e526556e5 | ||
|
|
9125b170ce | ||
|
|
cc5ed2396c | ||
|
|
165526fbe2 | ||
|
|
c366680ad0 | ||
|
|
1237dc55e0 | ||
|
|
ca61262228 | ||
|
|
2b4fdbb388 | ||
|
|
23927a4e6a | ||
|
|
d5330555fc | ||
|
|
8b1a46d8c4 | ||
|
|
84bf2a9e18 | ||
|
|
4d244a5eee | ||
|
|
31ff4bbd0d | ||
|
|
cf4b2b2ad0 | ||
|
|
aa5e39f48a | ||
|
|
d1bd915ede | ||
|
|
4d8aa1a541 | ||
|
|
e2aa6b4b48 | ||
|
|
3a9479a1d6 | ||
|
|
39758fec20 | ||
|
|
2473daee2b | ||
|
|
a604325c5d | ||
|
|
c74706127d | ||
|
|
bea1e92a3b | ||
|
|
e0af3206cf | ||
|
|
7fc5de8e27 | ||
|
|
504fb3a617 | ||
|
|
b3ac3a6843 | ||
|
|
e25b23f7a3 | ||
|
|
cdcbf30f63 | ||
|
|
c66f3cd0ca | ||
|
|
df958a2b1c | ||
|
|
f7f890d37e | ||
|
|
1027e37a03 | ||
|
|
42892e503f | ||
|
|
ca9a0eba34 | ||
|
|
12007041ab | ||
|
|
05fd9489ae | ||
|
|
5b6da1f4e7 | ||
|
|
0a8e599877 | ||
|
|
67c88acedf | ||
|
|
3b4bb78fa2 | ||
|
|
c03b8d2231 | ||
|
|
32985b7fdd | ||
|
|
d1323a4268 | ||
|
|
16f7e24231 | ||
|
|
c822e1f2c5 | ||
|
|
e064d9a37a | ||
|
|
ddac821dfb | ||
|
|
b7a1fa302e | ||
|
|
19027fbac7 | ||
|
|
b930544128 | ||
|
|
a15261073b | ||
|
|
cd1729f74d | ||
|
|
af3abe6aa1 | ||
|
|
2ca02f5802 | ||
|
|
3e742ffaf8 | ||
|
|
79390c897d | ||
|
|
3ffe8c5142 | ||
|
|
18f9e05792 | ||
|
|
9f96fa43ec | ||
|
|
f0f9f0b56d | ||
|
|
33eef9b87f | ||
|
|
f042ddfe75 | ||
|
|
53cb55e375 | ||
|
|
d3aea7510f | ||
|
|
9408cd3ea5 | ||
|
|
8f5ac32bb5 | ||
|
|
2d98a827ec | ||
|
|
1dc76600e7 |
13
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -122,6 +122,17 @@ body:
|
||||
- 'false'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: used-forums
|
||||
attributes:
|
||||
label: Have you already verified this is a patcher bug and not a macOS bug/user error on our discord servers?
|
||||
description: If no, please do not use issues for this. We'd appreciate it if users check discuss with others before filing. Issues are for valid patcher issues only, not for personal troubleshooting scessions.
|
||||
multiple: true
|
||||
options:
|
||||
- 'true'
|
||||
- 'false'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: 3rd-party-application
|
||||
attributes:
|
||||
@@ -172,4 +183,4 @@ body:
|
||||
- type: textarea
|
||||
id: extra-info
|
||||
attributes:
|
||||
label: Any Additional Information
|
||||
label: What steps have you taken to troubleshoot this? Please include messages from Discord, logs, and screenshots.
|
||||
|
||||
2
.gitignore
vendored
@@ -22,3 +22,5 @@ __pycache__/
|
||||
/docs/node_modules/
|
||||
/payloads/List.txt
|
||||
/payloads/Installer.sh
|
||||
/payloads/Info.plist
|
||||
/payloads/seed.plist
|
||||
|
||||
53
CHANGELOG.md
@@ -1,9 +1,58 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.4.3
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 0.3.4 - release
|
||||
- OpenCorePkg 0.7.8 - release
|
||||
- Lilu 1.6.0 - release
|
||||
- WhateverGreen 1.5.7 - release
|
||||
- FeatureUnlock 1.0.7 - rolling (6a87f65)
|
||||
- Resolve many non-Metal issues:
|
||||
- Control Centre Sliders
|
||||
- Shift/missing icons
|
||||
- Hardware Cursor
|
||||
- Note cursor images will be static (ie. beachball)
|
||||
- Quicklook dismiss/expand
|
||||
- Keyboard Backlight
|
||||
- Drops reliance on LabTick
|
||||
- Add Ethernet Controller detection to build
|
||||
- Resolve i210/i225 NIC support on pre-Ivy Macs
|
||||
- Resolve AirPlay to Mac support on Skylake+ Macs in 12.3 Beta 2+
|
||||
- Resolve SDXC support in Monterey for Pre-Ivy Bridge Macs
|
||||
- Rename Battery Throttling option to Firmware Throttling
|
||||
- Expands support to desktops (ie. iMacs without Displays)
|
||||
- Add XCPM disabling
|
||||
- Forces `ACPI_SMC_PlatformPlugin` to outmatch `X86PlatformPlugin`
|
||||
|
||||
## 0.4.2
|
||||
- Resolve app crashing on some 3rd party SAS/SATA controllers
|
||||
- Add Beta identifier to macOS Installer menu
|
||||
- Resolve showing unsupported installers in Creation menu
|
||||
- Resolve Macmini4,1 HDEF pathing
|
||||
- Increment Binaries:
|
||||
- FeatureUnlock 1.0.6 - rolling (d296645)
|
||||
- PatcherSupportPkg 0.3.1
|
||||
- Resolve SIP and SecureBootModel not disabling by default on some non-Metal Mac Pros
|
||||
- Add Content Caching support configurability
|
||||
- Limit SurPlus patchset to 20.4.0 - 21.1.0
|
||||
- No longer required for macOS 12.1 and newer
|
||||
- Add Universal Control support for Monterey native Macs
|
||||
- Applicable for Haswell/Broadwell
|
||||
- Requires macOS 12.3 or newer
|
||||
- Fix Power Management Support in macOS 12.3 Beta 1
|
||||
- Applicable for Sandy Bridge and older
|
||||
- Enforces ACPI_SMC_PlatformPlugin matching
|
||||
- Add NVMe Enhanced Power Management configuration
|
||||
- Disables NVMe adjustments on Skylake and newer Macs by default
|
||||
- Resolve Catalyst Scrolling on non-Metal GPUs
|
||||
- Add new TUI icon to differentiate between GUI
|
||||
- Resolve Color Strobing on AMD TeraScale 2 GPUs
|
||||
- Drops reliance on ResXtreme and SwitchResX
|
||||
|
||||
## 0.4.1
|
||||
- Add XHCI Boot Support to pre-UEFI 2.0 Macs
|
||||
- Applicable to pre-Ivy Macs with upgraded USB 3.0 controllers, allows USB 3.0 boot
|
||||
- Credit to Jazzzny for research and testing
|
||||
- Credit to Jazzzny for testing, [DearthnVader for original research](https://forums.macrumors.com/threads/bootable-xhci-pci-e-for-the-3-1-experimental.2217479/)
|
||||
- Drivers stripped from MacPro6,1 firmware
|
||||
- Resolve OCLP-Helper dyld crash
|
||||
|
||||
@@ -12,7 +61,7 @@
|
||||
- Resolves `installer` failing to extract InstallAssistant in older OSes
|
||||
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
||||
- Add FeatureUnlock configurability
|
||||
- Add NVRAM WriteFlash configurability for degarded/fragile systems
|
||||
- Add NVRAM WriteFlash configurability for degraded/fragile systems
|
||||
- Add `ThirdPartyDrives` quirk configurability
|
||||
- Resolve Skylight dylib injection issue
|
||||
- Increment Binaries:
|
||||
|
||||
@@ -46,10 +46,11 @@ app = BUNDLE(exe,
|
||||
bundle_identifier="com.dortania.opencore-legacy-patcher-wxpython",
|
||||
info_plist={
|
||||
"CFBundleShortVersionString": constants.Constants().patcher_version,
|
||||
"NSHumanReadableCopyright": "Copyright 2020-2022 Dortania",
|
||||
"NSHumanReadableCopyright": constants.Constants().copyright_date,
|
||||
"LSMinimumSystemVersion": "10.10.0",
|
||||
"NSRequiresAquaSystemAppearance": False,
|
||||
"NSHighResolutionCapable": True,
|
||||
"Build Date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
|
||||
"BuildMachineOSBuild": subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode().strip(),
|
||||
"NSPrincipalClass": "NSApplication",
|
||||
})
|
||||
|
||||
@@ -35,10 +35,10 @@ exe = EXE(pyz,
|
||||
console=True )
|
||||
app = BUNDLE(exe,
|
||||
name='OpenCore-Patcher.app',
|
||||
icon="payloads/OC-Patcher.icns",
|
||||
bundle_identifier=None,
|
||||
icon="payloads/OC-Patcher-TUI.icns",
|
||||
bundle_identifier="com.dortania.opencore-legacy-patcher-tui",
|
||||
info_plist={
|
||||
"CFBundleShortVersionString": constants.Constants().patcher_version,
|
||||
"CFBundleExecutable": "MacOS/Launcher",
|
||||
"NSHumanReadableCopyright": "Copyright 2020-2022 Dortania"
|
||||
"NSHumanReadableCopyright": constants.Constants().copyright_date,
|
||||
})
|
||||
@@ -28,9 +28,9 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
|
||||
|
||||
## Support
|
||||
|
||||
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub
|
||||
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help.
|
||||
|
||||
* Please review [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) before opening issues
|
||||
* Please review our docs on [how to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) to gather important information to help others with troubleshooting.
|
||||
|
||||
## Credits
|
||||
|
||||
@@ -45,7 +45,7 @@ To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise
|
||||
* Great amounts of help debugging and code suggestions
|
||||
* [vit9696](https://github.com/vit9696)
|
||||
* Endless amount of help troubleshooting, determining fixes and writing patches
|
||||
* [ASentientBot](https://github.com/ASentientBot)
|
||||
* [ASentientBot](https://github.com/ASentientBot), [EduCovas](https://github.com/educovas) and [ASentientHedgehog](https://github.com/moosethegoose2213)
|
||||
* Legacy Acceleration Patch set and documentation
|
||||
* [cdf](https://github.com/cdf)
|
||||
* Mac Pro on OpenCore Patch set and documentation
|
||||
|
||||
@@ -15,7 +15,7 @@ For developers wishing to validate mainline changes, you may use these nightly l
|
||||
|
||||
## Getting Started
|
||||
|
||||
To start, ensure you have python 3.6 or newer installed. Additionally ensure that they were downloaded from the offical source, [python.org](https://www.python.org/downloads/macos/).
|
||||
To start, ensure you have python 3.6 or newer installed. Additionally ensure that they were downloaded from the Official source, [python.org](https://www.python.org/downloads/macos/).
|
||||
|
||||
* Python installations either preinstalled or provided with Xcode/Xcode Tools are unsupported due to reliablility issues
|
||||
|
||||
|
||||
@@ -21,3 +21,4 @@ class cpu_data(enum.IntEnum):
|
||||
apple_m1 = 114 # A14
|
||||
apple_m1_pro = 115
|
||||
apple_m1_max = 116
|
||||
apple_m1_ultra = 117
|
||||
|
||||
@@ -48,6 +48,59 @@ class MacBookPro:
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacBookPro111_Stock = device_probe.Computer(
|
||||
real_model='MacBookPro11,1',
|
||||
real_board_id='Mac-189A3D4F975D5FFC',
|
||||
reported_model='MacBookPro11,1',
|
||||
reported_board_id='Mac-189A3D4F975D5FFC',
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=2606, class_code=196608, name='IGPU', model='Intel Iris', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)')
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=2606, class_code=196608, name='IGPU', model='Intel Iris', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
dgpu=None,
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=6987, device_id=37251, class_code=67073, name='SSD0', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP06@1c0005/SSD0@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x5)/Pci(0x0,0x0)')
|
||||
],
|
||||
usb_controllers=[
|
||||
device_probe.XHCIController(vendor_id=32902, device_id=39985, class_code=787248, name='XHC1', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/XHC1@140000', pci_path='PciRoot(0x0)/Pci(0x14,0x0)')
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17312, class_code=163840, name='ARPT', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP03@1c0002/ARPT@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x2)/Pci(0x0,0x0)'),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'EST', 'TM2', 'SSSE3', 'FMA', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'MOVBE', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'SEGLIM64', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
),
|
||||
oclp_version='0.4.2',
|
||||
opencore_version='DBG-077-2022-01-10',
|
||||
bluetooth_chipset='BRCM20702 Hub',
|
||||
third_party_sata_ssd=False
|
||||
)
|
||||
|
||||
MacBookPro141_SSD_Upgrade = device_probe.Computer(
|
||||
real_model='MacBookPro14,1',
|
||||
real_board_id='Mac-B4831CEBD52A0C4C',
|
||||
reported_model='MacBookPro14,1',
|
||||
reported_board_id='Mac-B4831CEBD52A0C4C',
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=22822, class_code=196608, name='IGPU', model='Intel Iris Plus Graphics 640', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)')
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=22822, class_code=196608, name='IGPU', model='Intel Iris Plus Graphics 640', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
dgpu=None,
|
||||
storage=[
|
||||
device_probe.NVMeController(vendor_id=6535, device_id=20499, class_code=67586, name='SSD0', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP01@1c0000/SSD0@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)', aspm=2)
|
||||
],
|
||||
usb_controllers=[
|
||||
device_probe.XHCIController(vendor_id=32902, device_id=40239, class_code=787248, name='XHC1', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/XHC1@140000', pci_path='PciRoot(0x0)/Pci(0x14,0x0)'),
|
||||
device_probe.XHCIController(vendor_id=32902, device_id=5588, class_code=787248, name='XHC2', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP05@1c0004/UPSB@0/DSB2@20000/XHC2@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)')
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17315, class_code=163840, name='ARPT', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP09@1d0000/ARPT@0', pci_path='PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)'),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'SMX', 'EST', 'TM2', 'SSSE3', 'FMA', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'MOVBE', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'SEGLIM64', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
), oclp_version='0.4.1',
|
||||
opencore_version=None,
|
||||
bluetooth_chipset=None,
|
||||
third_party_sata_ssd=False)
|
||||
|
||||
MacBookPro171_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="MacBookPro17,1",
|
||||
@@ -179,10 +232,39 @@ class iMac:
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac122_Upgraded_Nvidia = device_probe.Computer(
|
||||
real_model='iMac12,2',
|
||||
real_board_id='Mac-942B59F58194171B',
|
||||
reported_model='iMac12,2',
|
||||
reported_board_id='Mac-942B59F58194171B',
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=258, class_code=229376, name='IGPU', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
device_probe.NVIDIA(vendor_id=4318, device_id=4092, class_code=196608, name='GFX0', model='Quadro K1000M by Nick[D]vB', acpi_path='IOACPIPlane:/_SB/PCI0@0/P0P2@10000/GFX0@0', pci_path='PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)')],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=258, class_code=229376, name='IGPU', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
dgpu=device_probe.NVIDIA(vendor_id=4318, device_id=4092, class_code=196608, name='GFX0', model='Quadro K1000M by Nick[D]vB', acpi_path='IOACPIPlane:/_SB/PCI0@0/P0P2@10000/GFX0@0', pci_path='PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)'),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=7170, class_code=67073, name='SATA', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/SATA@1f0002', pci_path='PciRoot(0x0)/Pci(0x1f,0x2)')
|
||||
],
|
||||
usb_controllers=[
|
||||
device_probe.EHCIController(vendor_id=32902, device_id=7213, class_code=787232, name='EHC2', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/EHC2@1a0007', pci_path='PciRoot(0x0)/Pci(0x1a,0x7)'),
|
||||
device_probe.EHCIController(vendor_id=32902, device_id=7206, class_code=787232, name='EHC1', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/EHC1@1d0007', pci_path='PciRoot(0x0)/Pci(0x1d,0x7)')
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17201, class_code=163840, name='ARPT', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP02@1c0001/ARPT@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)'),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'SMX', 'EST', 'TM2', 'SSSE3', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'TSCTMR', 'AVX1.0']
|
||||
),
|
||||
oclp_version='0.3.3',
|
||||
opencore_version=None,
|
||||
bluetooth_chipset='BRCM2046 Hub',
|
||||
third_party_sata_ssd=True
|
||||
)
|
||||
|
||||
iMac151_Stock = device_probe.Computer(
|
||||
real_model='iMac15,1',
|
||||
real_board_id='Mac-42FD25EABCABB274',
|
||||
reported_model='iMac15,1', reported_board_id='Mac-42FD25EABCABB274',
|
||||
reported_model='iMac15,1',
|
||||
reported_board_id='Mac-42FD25EABCABB274',
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=1042, class_code=196608, name='IGPU', model='Intel Iris Pro', acpi_path=None, pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name='GFX0', model='AMD Radeon R9 M290X', acpi_path=None, pci_path='PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)')
|
||||
@@ -204,6 +286,33 @@ class iMac:
|
||||
third_party_sata_ssd=False
|
||||
)
|
||||
|
||||
iMac201_Stock = device_probe.Computer(
|
||||
real_model='iMac20,1',
|
||||
real_board_id='Mac-CFF7D910A743CAAF',
|
||||
reported_model='iMac20,1',
|
||||
reported_board_id='Mac-CFF7D910A743CAAF',
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=39880, class_code=196608, name='IGPU', model='Intel HD Graphics CFL', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
device_probe.AMD(vendor_id=4098, device_id=29504, class_code=196608, name='GFX0', model='AMD Radeon Pro 5300', acpi_path='IOACPIPlane:/_SB/PCI0@0/PEG0@10000/EGP0@0/EGP1@0/GFX0@0', pci_path='PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)')
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=39880, class_code=196608, name='IGPU', model='Intel HD Graphics CFL', acpi_path='IOACPIPlane:/_SB/PCI0@0/IGPU@20000', pci_path='PciRoot(0x0)/Pci(0x2,0x0)'),
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=29504, class_code=196608, name='GFX0', model='AMD Radeon Pro 5300', acpi_path='IOACPIPlane:/_SB/PCI0@0/PEG0@10000/EGP0@0/EGP1@0/GFX0@0', pci_path='PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)'),
|
||||
storage=[],
|
||||
usb_controllers=[
|
||||
device_probe.XHCIController(vendor_id=32902, device_id=1773, class_code=787248, name='XHC1', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/XHC1@140000', pci_path='PciRoot(0x0)/Pci(0x14,0x0)'),
|
||||
device_probe.XHCIController(vendor_id=32902, device_id=5612, class_code=787248, name='XHC2', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP05@1c0004/UPSB@0/DSB2@20000/XHC2@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)')
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17508, class_code=163840, name='ARPT', model=None, acpi_path='IOACPIPlane:/_SB/PCI0@0/RP01@1c0000/ARPT@0', pci_path='PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)'),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'SMX', 'EST', 'TM2', 'SSSE3', 'FMA', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'MOVBE', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'SEGLIM64', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
bluetooth_chipset=None,
|
||||
third_party_sata_ssd=False
|
||||
)
|
||||
|
||||
class MacPro:
|
||||
|
||||
MacPro31_Stock = device_probe.Computer(
|
||||
|
||||
@@ -1546,6 +1546,7 @@ smbios_dictionary = {
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070,
|
||||
"Ethernet Chipset": "Broadcom",
|
||||
"nForce Chipset": True,
|
||||
"Stock GPUs": [
|
||||
device_probe.NVIDIA.Archs.Tesla
|
||||
],
|
||||
@@ -2720,6 +2721,36 @@ smbios_dictionary = {
|
||||
"SATA 3.5",
|
||||
],
|
||||
},
|
||||
# Mac Studio M1 Max
|
||||
"Mac13,1": {
|
||||
"Board ID": None,
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": "j375c",
|
||||
"CPU Generation": cpu_data.cpu_data.apple_m1_max.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.PCIe,
|
||||
"Ethernet Chipset": "Aquantia",
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [
|
||||
"NVMe",
|
||||
],
|
||||
},
|
||||
# Mac Studio M1 Ultra
|
||||
"Mac13,2": {
|
||||
"Board ID": None,
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": "j375d",
|
||||
"CPU Generation": cpu_data.cpu_data.apple_m1_ultra.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.PCIe,
|
||||
"Ethernet Chipset": "Aquantia",
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [
|
||||
"NVMe",
|
||||
],
|
||||
},
|
||||
"ADP2,1": {
|
||||
"Board ID": None,
|
||||
"FirmwareFeatures": None,
|
||||
@@ -2807,6 +2838,7 @@ smbios_dictionary = {
|
||||
# VMware Virtual Machine
|
||||
"Board ID": "440BX Desktop Reference Platform",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": "x86legacy",
|
||||
"CPU Generation": cpu_data.cpu_data.penryn.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
@@ -2818,6 +2850,7 @@ smbios_dictionary = {
|
||||
# Parallels Virtual Machine
|
||||
"Board ID": "Parallels Virtual Platform",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": "x86legacy",
|
||||
"CPU Generation": cpu_data.cpu_data.penryn.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
@@ -2849,4 +2882,126 @@ smbios_dictionary = {
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
}
|
||||
"APPL_GPU_Test_Board": {
|
||||
# AppleInternal GPU Test Board
|
||||
# System is used for testing Intel iGPUs
|
||||
# Model has been configured with the following:
|
||||
# - Broadwell iGPU (HD Graphics 5300)
|
||||
# - Skylake iGPU (HD Graphics 5xx)
|
||||
# - Kaby Lake iGPU (HD Graphics 6xx)
|
||||
# - Ice Lake iGPU (G4/G7)
|
||||
"Board ID": "Mac-50619A408DB004DA",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_1": {
|
||||
# Laptop model
|
||||
# No mentions in SLE outside X86PlatformPlugin
|
||||
"Board ID": "Mac-112B0A653D3AAB9C",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_2": {
|
||||
# Laptop model
|
||||
# Only mentioned in ApplePlatformEnabler and X86PlatformPlugin
|
||||
"Board ID": "Mac-4BFBC784B845591E",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_3": {
|
||||
# Laptop model, 15"/17" with dGPU and GMUX
|
||||
# Only mentioned in AppleGraphicsPowerManagement, AppleMuxControl2, AGDCBacklightControl, ApplePlatformEnabler and X86PlatformPlugin
|
||||
"Board ID": "Mac-564FBA6031E5946A",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_4": {
|
||||
# Laptop model, iGPU only
|
||||
# Only mentioned in AppleGraphicsPowerManagement, ApplePlatformEnabler and X86PlatformPlugin
|
||||
"Board ID": "Mac-6FEBD60817C77D8A",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_5": {
|
||||
# Laptop model, iGPU only, Iris Plus Graphics G7
|
||||
# Only mentioned in AppleGraphicsPowerManagement, ApplePlatformEnabler and X86PlatformPlugin
|
||||
"Board ID": "Mac-747B1AEFF11738BE",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_6": {
|
||||
# Laptop model, iGPU only
|
||||
# Only mentioned in AppleGraphicsPowerManagement, ApplePlatformEnabler and X86PlatformPlugin
|
||||
"Board ID": "Mac-87DCB00F4AD77EEA",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_7": {
|
||||
# Laptop model
|
||||
# Only mentioned in X86PlatformPlugin, AppleGVA
|
||||
"Board ID": "Mac-90BE64C3CB5A9AEB",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
"APPL_UNKNOWN_MODEL_7": {
|
||||
# Laptop model, iGPU only
|
||||
# Only mentioned in AppleGraphicsPowerManagement and X86PlatformPlugin
|
||||
"Board ID": "Mac-9394BDF4BF862EE7",
|
||||
"FirmwareFeatures": None,
|
||||
"SecureBootModel": None,
|
||||
"CPU Generation": None,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Wireless Model": None,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable,
|
||||
"Stock GPUs": [],
|
||||
"Stock Storage": [],
|
||||
},
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
# Working Around Legacy Acceleration Issues
|
||||
|
||||
* [Broken Background Blurs](#broken-background-blurs)
|
||||
* [Downloading older non-Metal Apps](#downloading-older-non-metal-apps)
|
||||
* [Unable to run Zoom](#unable-to-run-zoom)
|
||||
* [Unable to grant special permissions to apps (ie. Camera Access to Zoom)](#unable-to-grant-special-permissions-to-apps-ie-camera-access-to-zoom)
|
||||
@@ -35,6 +36,13 @@ For those unfamiliar with what is considered a non-Metal GPU, see below chart:
|
||||
|
||||
:::
|
||||
|
||||
## Broken Background Blurs
|
||||
|
||||
By default with the non-Metal acceleration patches, many background blur menus may act distorted when moving a cursor over it. With 0.4.1 and newer, users can enable a new Beta Blur feature to try and resolve the issue:
|
||||
|
||||

|
||||
|
||||
Do note that enabling beta blurs can be more demanding on slower hardware
|
||||
## Downloading older non-Metal Apps
|
||||
|
||||
Many Apple apps now have direct reliance on Metal for proper functioning, however legacy builds of these apps still do work in Big Sur. See below for archive of many apps such as Pages, iMovie, GarageBand.
|
||||
@@ -112,10 +120,18 @@ The best way to achieve this is to boot Recovery (or Single User Mode if the dGP
|
||||
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
|
||||
```
|
||||
|
||||
This will disable the dGPU and allow the iGPU to function in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation in theory. However, currently the proprietary DisplayLink driver refuses to function on legacy-patched systems, either resulting in a windowserver crash loop or no output at all.
|
||||
This will disable the dGPU and allow the iGPU to function in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation, however note that you'll need to use older drivers (5.2.6):
|
||||
|
||||
* [DisplayLink USB Graphics Software for macOS - For Mojave and Catalina - 5.2.6](https://www.synaptics.com/products/displaylink-graphics/downloads/macos-5.2.6)
|
||||
|
||||
Note this driver only provides partial support in macOS, full graphics acceleration is not currently available on the displays driven by DisplayLink
|
||||
|
||||
## Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)
|
||||
|
||||
Resolved with OpenCore Legacy Patcher v0.4.2
|
||||
|
||||
::: details Legacy Fix (prior to 0.4.2)
|
||||
|
||||
Due to an odd bug with ATI's TeraScale 2 GPUs, many users will experience erratic/strobing colours once finished installing and rebooting into the accelerated patches. The issue stems from an incorrect assumption in the GPU drivers where it will enforce the Billion Colour space on your display. To fix, simply force your Display into a lower color depth such as a Million Colours.
|
||||
|
||||
Applications that can set color depth are:
|
||||
@@ -123,6 +139,8 @@ Applications that can set color depth are:
|
||||
* [SwitchResX](https://www.madrau.com)
|
||||
* [ResXtreme](https://macdownload.informer.com/resxtreme/)
|
||||
|
||||
:::
|
||||
|
||||
## Unable to allow Safari Extensions
|
||||
|
||||
Due to an bug on the legacy acceleration patches, users won't be able to enable Safari Extensions
|
||||
@@ -135,7 +153,7 @@ This tool can be used to work-around this issue:
|
||||
|
||||
By default OpenCore Legacy Patcher will assume MacBookPro8,2/3 have a faulty dGPU and disable acceleration. This is the safest option for most users as enabling dGPU acceleration on faulty Macs will result in failed booting.
|
||||
|
||||
However if your machine does not have the dGPU disabled via NVRAM, you'll expereince a login loop. To work around this is quite simple:
|
||||
However if your machine does not have the dGPU disabled via NVRAM, you'll experience a login loop. To work around this is quite simple:
|
||||
|
||||
1. Boot macOS in Single User Mode
|
||||
* Press Cmd+S in OpenCore's menu when you turn the Mac on
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# How to debug with OpenCore
|
||||
|
||||
For those who've hit an odd bug and unsure if it's user error or patcher, the below will tell you how to get more verbose debug information as well as logs to help [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
* For users who are less experienced, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help.
|
||||
For those who've hit an odd bug and unsure if it's user error or patcher, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help.
|
||||
|
||||
## Debugging yourself
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Download and build macOS Installers
|
||||
|
||||
* [Downloading](#downloading)
|
||||
* [Building](#building)
|
||||
* [Creating the installer](#creating-the-installer)
|
||||
|
||||
This doc is centered around downloading and writing the macOS installer to a USB. If you're already familiar with how to do this, you can skip.
|
||||
|
||||
@@ -25,7 +24,6 @@ First we'll want to select the "Create macOS Installer" button. This will presen
|
||||
|
||||
For this example, we'll assume you'll need an installer. Selecting this option will download Apple's Installer Catalogs and build a list for you to choose:
|
||||
|
||||
|
||||
| Downloading | Listed Installers |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
@@ -49,4 +47,5 @@ Now the patcher will start the installer flashing!
|
||||
| Flashing | Success Prompt | Finished Flashing |
|
||||
| :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
# Once finished, head to [Building and installing OpenCore](./BUILD.md)
|
||||
|
||||
@@ -47,13 +47,14 @@ sudo killall -9 BlueTool bluetoothd
|
||||
|
||||
* Broadcom BCM94328, BCM94322 and Atheros Wireless Chipsets lost support
|
||||
|
||||
The following models lost Bluetooth support in macOS Monterey due to their legacy Wireless chipset:
|
||||
The following models lost Wifi support in macOS Monterey due to their legacy Wireless chipset:
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacBookPro6,x is exempt
|
||||
* MacPro5,1 and older
|
||||
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
@@ -14,12 +14,38 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
|
||||
|
||||
::: details Configuration Explanation
|
||||
|
||||
### ACPI -> Add
|
||||
|
||||
* SSDT-CPBG
|
||||
* Reason: Resolves Kernel Panic on Arrendale Macs in early Big Sur builds
|
||||
* Logic: Disable dummy CPBG device in ACPI
|
||||
* Models: MacBookPro6,x and iMac11,x
|
||||
* SSDT-PCI
|
||||
* Reason: Patch Windows Audio support for Sandy and Ivy Bridge
|
||||
* Logic: Removes PCI0's 32-bit Allocation Limitation
|
||||
* Models: All Sandy and Ivy Bridge Macs, excluding MacPro6,1
|
||||
* SSDT-DGPU
|
||||
* Reason: Allows for software based deMUX disabling dGPUs in 2011 MacBook Pros
|
||||
* Logic: Sends power down request to dGPU via ACPI
|
||||
* Models: MacBookPro8,2 and MacBookPro8,3 with dead dGPUs
|
||||
|
||||
### ACPI -> Patch
|
||||
|
||||
* EHCx and XHC1 Patches
|
||||
* `EHCx` and `XHC1` Patches
|
||||
* Reason: Required for proper USB operation
|
||||
* Logic: Avoids USB maps of newer models attaching and breaking USB port functionality
|
||||
* Models: All models require when spoofing with Moderate or Advanced SMBIOS
|
||||
* `BUF0` to `BUF1` Patch
|
||||
* Reason: To be paired with SSDT-PCI
|
||||
* `_INI` to `XINI` Patch
|
||||
* Reason: To be paired with SSDT-DGPU
|
||||
|
||||
### Booter -> Patch
|
||||
|
||||
* Reroute `HW_BID` to `OC_BID`
|
||||
* Reason: Allows macOS installers to be used on unsupported models
|
||||
* Logic: Reroutes Board ID macOS checks to custom variable
|
||||
* Models: All systems using VMM spoofing
|
||||
|
||||
### Booter -> Quirks
|
||||
|
||||
@@ -30,14 +56,6 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
|
||||
|
||||
### DeviceProperties -> Add
|
||||
|
||||
* `PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Wifi works with full, native support
|
||||
* Logic: Tricks AirPortBrcmNIC.kext into thinking our device is a BCM94360 (`14e4,43ba`)
|
||||
* Models: Machines with BCM943224 and BCM94331 chipsets
|
||||
* `PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Brightness Control works on upgraded iMacs
|
||||
@@ -58,6 +76,23 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
|
||||
* Reason: Required for HID peripheral support in macOS on older hardware
|
||||
* Logic: Tricks IOHIDFamily into thinking it's always booting recovery
|
||||
* Models: Penryn CPUs (Core2 series)
|
||||
* Force FileVault on Broken Seal Patch
|
||||
* Reason: Allow FileVault on root patched Macs
|
||||
* Logic: Forces APFS.kext to always return true on FileVault support
|
||||
* Models: Any model needing root patches
|
||||
* Disable Library Validation Enforcement Patch
|
||||
* Reason: non-Metal Root Volume Patches do not pass library validation tests
|
||||
* Logic: Forces Library Validation function to always return not required
|
||||
* Models: Non-Metal GPUs
|
||||
* SurPlus Patch
|
||||
* Reason: macOS 11.3-12.0.1 require systems to have RDRAND support in the CPU for stable boot
|
||||
* Logic: Forces RDRAND code to return predetermined value
|
||||
* Models: All pre-Ivy Bridge Macs
|
||||
* Reroute `kern.hv_vmm_present` Patch
|
||||
* Reason: Allows macOS to be installed and updated on unsupported hardware
|
||||
* Logic: Forces userspace to see system as Virtual Machine
|
||||
* Models: Any model using VMM spoofing
|
||||
|
||||
|
||||
### Kernel -> Quirks
|
||||
|
||||
@@ -73,9 +108,9 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
|
||||
### Misc -> Security
|
||||
|
||||
* SecureBootModel
|
||||
* Reason: Required to ensure seamless OS updates with Big Sur
|
||||
* Logic: Sets iMacPro1,1's Secure Enclave Identifier (j137)
|
||||
* Models: All models require
|
||||
* Reason: Required to allow native OS updates on T2 model spoofs
|
||||
* Logic: Sets T2's Secure Enclave Identifier
|
||||
* Models: All models required that spoof T2 model with minimal or higher
|
||||
|
||||
### NVRAM -> Add
|
||||
|
||||
@@ -123,13 +158,13 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* Models: All models require
|
||||
* WhateverGreen
|
||||
* Reason: Patches GPU Frameworks and kext to ensure proper support
|
||||
* Models: All models require
|
||||
* Models: All models require when spoofing or have non-stock GPU
|
||||
* CPUFriend
|
||||
* Reason: Patches IOx86PlatformPlugin to restore previous CPU profiles
|
||||
* Models: 2012 and newer models
|
||||
* Models: All models using minimal or higher spoofing
|
||||
* AirportBrcmFixup
|
||||
* Reason: Patches IO80211 and co to fix networking support for unsupported cards
|
||||
* Models: BCM943224 and BCM94331
|
||||
* Reason: Patches IO80211 and co to fix networking support for unsupported cards, and fix bugs on native ones as well (ie. random degraded network performance)
|
||||
* Models: BCM943224, BCM94331, BCM94360 and BCM943602
|
||||
* RestrictEvents
|
||||
* Reason: Disables memory errors on MacPro7,1
|
||||
* Models: Mac Pros and Xserves
|
||||
@@ -151,7 +186,7 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
|
||||
* USBMap
|
||||
* Reason: Inject old USB map profiles to fix USB
|
||||
* Models: All models require
|
||||
* Models: All models require when spoofing moderate or higher, as well as pre-2012 models
|
||||
|
||||
### SSE
|
||||
|
||||
@@ -189,14 +224,14 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* Models: 2011 and older, MacBookPro9,x included
|
||||
* SMC-Spoof
|
||||
* Reason: Spoofs SMC version to 9.9999
|
||||
* Models: All models require
|
||||
* Models: All models require when spoofing minimal or higher
|
||||
:::
|
||||
|
||||
## On-Disk Patches
|
||||
|
||||
Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported
|
||||
|
||||
::: details Audio Patches
|
||||
::: details Audio Patches (11.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
@@ -206,7 +241,68 @@ Unfortunately certain on-disk patches are required to achieve full functionality
|
||||
|
||||
:::
|
||||
|
||||
::: details Acceleration Patches
|
||||
::: details Legacy Wireless Patches (12.0+)
|
||||
|
||||
Applicable for BCM94328, BCM94322 and Atheros Wifi cards
|
||||
|
||||
### CoreServices
|
||||
|
||||
* WiFiAgent.app
|
||||
|
||||
### /usr/libexec
|
||||
|
||||
* airportd
|
||||
|
||||
:::
|
||||
|
||||
::: details Nvidia Kepler Graphics Acceleration Patches (12.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* GeForce.kext
|
||||
* GeForceAIRPlugin.bundle
|
||||
* GeForceGLDriver.bundle
|
||||
* GeForceMTLDriver.bundle
|
||||
* GeForceVADriver.bundle
|
||||
* NVDAGF100Hal.kext
|
||||
* NVDAGK100Hal.kext
|
||||
* NVDAResman.kext
|
||||
* NVDAStartup.kext
|
||||
|
||||
### Frameworks
|
||||
|
||||
* OpenCL (libCLVMNVPTXPlugin.dylib, NVPTX.dylib)
|
||||
* Reason: Re-add Kepler hardware acceleration support
|
||||
|
||||
:::
|
||||
|
||||
|
||||
::: details Intel Ivy Bridge Graphics Acceleration Patches (12.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleIntelIVBVA.bundle
|
||||
* AppleIntelFramebufferCapri.kext
|
||||
* AppleIntelGraphicsShared.bundle
|
||||
* AppleIntelHD4000Graphics.kext
|
||||
* AppleIntelHD4000GraphicsGLDriver.bundle
|
||||
* AppleIntelHD4000GraphicsMTLDriver.bundle
|
||||
* AppleIntelHD4000GraphicsVADriver.bundle
|
||||
|
||||
### PrivateFrameworks
|
||||
|
||||
* AppleGVA/AppleGVACore
|
||||
* Reason: Enable DRM support
|
||||
|
||||
### Frameworks
|
||||
|
||||
* OpenCL (libCLVMIGILPlugin.dylib)
|
||||
* Reason: Re-add Ivy Bridge hardware acceleration support
|
||||
* WebKit (com.apple.WebProcess.sb)
|
||||
* Reason: Re-add Ivy Bridge Safari rendering support
|
||||
:::
|
||||
|
||||
::: details non-Metal Graphics Acceleration Patches (11.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
@@ -290,10 +386,4 @@ Unfortunately certain on-disk patches are required to achieve full functionality
|
||||
* SkyLight.framework
|
||||
* Logic: Copied from Mojave, heavy modifications/shims
|
||||
|
||||
### LaunchDaemons
|
||||
|
||||
* HiddHack.plist
|
||||
* Reason: Fixes unresponsive input when patching Skylight
|
||||
* Logic: Forces `hidd` to register events, as Skylight handles them by default in Big Sur
|
||||
|
||||
:::
|
||||
|
||||
@@ -20,7 +20,9 @@ And voila! No more USB drive required
|
||||
|
||||
To do this, run the OpenCore Patcher and head to Patcher Settings:
|
||||
|
||||

|
||||
| GUI Settings | TUI Settings
|
||||
| :--- | :--- |
|
||||
| |  |
|
||||
|
||||
Here you can change different patcher settings, however the main interest is:
|
||||
|
||||
@@ -30,11 +32,19 @@ Once you've toggled them both off, build your OpenCore EFI once again and instal
|
||||
|
||||
## Enabling SIP
|
||||
|
||||
For many users, SIP will be enabled by default on build. For Intel HD 4000 users, you may have noticed that SIP is disabled. This is to ensure full compatibility with macOS Monterey and allow seamless booting between it and older OSes. However for users who do not plan to boot Monterey, you can re-enable under Patcher Settings.
|
||||
For many users, SIP will be enabled by default on build. For Intel HD 4000 users, you may have noticed that SIP is partially disabled. This is to ensure full compatibility with macOS Monterey and allow seamless booting between it and older OSes. However for users who do not plan to boot Monterey, you can re-enable under Patcher Settings.
|
||||
|
||||
Note: Machines with non-Metal GPUs cannot enable SIP in Big Sur either due to patched root volume
|
||||
|
||||
Note 2: NVRAM may need to be reset to ensure SIP is correctly re-enabled
|
||||
| SIP Enabled | SIP Lowered (Root Patching) | SIP Disabled |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
::: warning
|
||||
|
||||
If you're unsure whether you should enable SIP, leave as-is. Systems where you have already ran the Post Install Root Patching cannot enable SIP without potentially breaking the current install.
|
||||
|
||||
:::
|
||||
|
||||
## Applying Post Install Volume Patches
|
||||
|
||||
@@ -42,6 +52,20 @@ For users with unsupported GPUs/wifi cards, you'll need to run the Post Install
|
||||
|
||||
* Hint: Try running the root volume patch option, the Patcher will determine and install patches only when required. So there is no harm in applying them
|
||||
|
||||
|
||||
| Listing Patches | Patching Finished |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
::: warning
|
||||
|
||||
Root Patching requires a network connection by default to grab associated resources. If your system is having difficulties with wifi or ethernet, grab the Offline variants of the patcher on Github next to the regular apps:
|
||||
|
||||
* [OpenCore Legacy Patcher releases](https://github.com/dortania/OpenCore-Legacy-Patcher/releases/latest)
|
||||
|
||||
:::
|
||||
|
||||
::: details Unsupported GPUs in macOS Big Sur
|
||||
|
||||
* Nvidia:
|
||||
@@ -76,13 +100,3 @@ For users with unsupported GPUs/wifi cards, you'll need to run the Post Install
|
||||
* Atheros
|
||||
|
||||
:::
|
||||
|
||||
To apply the Post-Install Volume patches, select option #3 as shown below:
|
||||
|
||||

|
||||
|
||||
And go ahead to option #1 and let the OCLP patcher apply the needed legacy video patches.
|
||||
|
||||

|
||||
|
||||
Reboot your system and check out the now working graphics acceleration on your legacy system. This is still Beta software.
|
||||
|
||||
@@ -19,10 +19,10 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir2,1 | No reports | N/A | N/A |
|
||||
| MacBookAir3,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir3,1 | <span style="color:#30BCD5"> YES </span> | uvesten | - Stock Model<br/>- Patcher version 0.3.3 |
|
||||
| MacBookAir3,2 | <span style="color:#30BCD5"> YES </span> | houser42 | - Stock model <br/>- Patcher version unknown |
|
||||
| MacBookAir4,1 | No reports | N/A | N/A |
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,2 | <span style="color:#30BCD5"> YES </span> | bdwilson1907 | - Stock Model <br/>- Patcher version 0.3.1 <br/>- Intermittent keyboard backlight|
|
||||
| MacBookAir5,1 | <span style="color:#30BCD5"> YES </span> | Ausdauersportler | - Stock Model<br/>- Patcher version 0.0.9 |
|
||||
| ^^ | ^^ | webg3 | Stock Model |
|
||||
| MacBookAir5,2 | ^^ | Bab-droid | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
@@ -42,7 +42,9 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
|
||||
| MacBookPro6,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,2 | <span style="color:#30BCD5"> YES </span> | Jakeluke | - Stock model, dGPU broken <br/>- Patcher version unknown |
|
||||
| MacBookPro7,1 | ^^ | fussel132 | - Stock model <br/>-Patcher version v0.1.2 |
|
||||
| ^^ | ^^ | casey1234 | - SSD Upgrade <br/>- Patcher version 0.3.3 |
|
||||
| MacBookPro8,1 | ^^ | AvaQueen | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,1 | yes | charly-black | - Upgraded BCM94331PCIEBT4CAX <br/>- Patcher version 0.3.1 |
|
||||
| MacBookPro8,2 | ^^ | air.man | - Stock model, dGPU disabled <br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,3 | ^^ | lulujyc | - Stock model, dGPU disabled <br/>- Patcher version 0.1.4 |
|
||||
@@ -56,9 +58,11 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
|
||||
| ^^ | ^^ | woefi | - BCM94331CAX upgrade<br/>- Patcher version 0.0.13 |
|
||||
| ^^ | ^^ | whgmkeller | - Stock model<br/>- Patcher version 0.0.11 |
|
||||
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.7 |
|
||||
| ^^ | ^^ | casey1234 | - RAM and SSD Upgrade <br/>- Patcher version 0.3.3 |
|
||||
| MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 |
|
||||
| ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 |
|
||||
| MacBookPro10,2 | ^^ | akidone | - Upgraded BCM94360CSAX <br/>- Patcher version 0.3.0 |
|
||||
| MacBookPro11,2 | ^^ | casey1234 | - Stock model<br/>- Patcher version 0.3.3 |
|
||||
|
||||
### Mac mini
|
||||
|
||||
@@ -67,7 +71,7 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
|
||||
| Macmini3,1 | No reports | N/A | N/A |
|
||||
| Macmini4,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,2 | yes | charly-black | Dual Core 2.7GHz with AMD HD6630M | Patcher Version 0.3.1
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | <span style="color:#30BCD5"> YES </span> | cicofz | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | Stig124 | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
@@ -100,6 +104,7 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
|
||||
| iMac14,2 | ^^ | OKonnel | - Stock Model<br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | mibaxx | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| iMac14,3 | No reports | N/A | N/A |
|
||||
| iMac15,1 | YES | JakubMazur | - Upgraded RAM<br/>- Upgraded Graphics (AMD Radeon R9 M295X 4 GB)<br/>- Upgraded CPU (4 GHz Quad-Core Intel Core i7)<br/>- Patcher version 0.4.1 |
|
||||
|
||||
### Mac Pro
|
||||
|
||||
|
||||
@@ -11,8 +11,12 @@ Here are some common errors users may experience while using this patcher:
|
||||
* [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update)
|
||||
* [No Brightness Control](#no-brightness-control)
|
||||
* [Cannot connect Wi-Fi on Monterey with legacy cards](#cannot-connect-Wi-Fi-on-Monterey-with-legacy-cards)
|
||||
* [No Graphics Acceleration on Intel Ivy Bridge and Nvidia Kepler GPUs](#no-graphics-acceleration-on-intel-ivy-bridge-and-nvidia-kepler-gpus)
|
||||
* [No Graphics Acceleration](#no-graphics-acceleration)
|
||||
* [Black Screen on MacBookPro11,3 in macOS Monterey](#black-screen-on-macbookpro113-in-macos-monterey)
|
||||
* [No DisplayPort Output on Mac Pros with Nvidia Kepler](#no-displayport-output-on-mac-pros-with-nvidia-kepler)
|
||||
* [Volume Hash Mismatch Error in macOS Monterey](#volume-hash-mismatch-error-in-macos-monterey)
|
||||
* [Cannot Disable SIP in recoveryOS](#cannot-disable-sip-in-recoveryos)
|
||||
|
||||
|
||||
## Stuck on `This version of Mac OS X is not supported on this platform`
|
||||
|
||||
@@ -78,9 +82,12 @@ With OCLP v0.2.5, we've added support for legacy Wi-Fi on Monterey. However some
|
||||
|
||||
To work-around, we recommend users to manually connect using the "other" option on the Wi-Fi menu bar or manually adding the network on the "Network" preference pane.
|
||||
|
||||
## No Graphics Acceleration on Intel Ivy Bridge and Nvidia Kepler GPUs
|
||||
## No Graphics Acceleration
|
||||
|
||||
With macOS Monterey, Apple removed Graphics Drivers for both Intel Ivy Bride and Nvidia Kepler. To re-enable acceleration, simply run the Post Install Root Volume patches.
|
||||
|
||||
In macOS, each release generally means GPU drivers are dropped from the OS. With macOS Big Sur, currently all non-Metal GPUs require additional patches to gain acceleration. In addition, macOS Monterey removed Graphics Drivers for both Intel Ivy Bridge and Nvidia Kepler.
|
||||
|
||||
To re-enable acceleration, simply run the Post Install Root Volume patches.
|
||||
|
||||
Once rebooted, acceleration will be re-enabled as well as brightness control for laptops.
|
||||
|
||||
@@ -88,4 +95,43 @@ Once rebooted, acceleration will be re-enabled as well as brightness control for
|
||||
|
||||
Due to Apple dropping Nvidia Kepler support in macOS Monterey, [MacBookPro11,3's GMUX has difficulties switching back to the iGPU to display macOS correctly.](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/522) To work-around this issue, boot the MacBookPro11,3 in Safe Mode and once macOS is installed, run OCLP's Post Install Root Patches to enable GPU Acceleration for the Nvidia dGPU.
|
||||
|
||||
* Safe Mode can be started by holding Shift+Enter when selecting macOS Monterey in OCLP's Boot Menu.
|
||||
* Safe Mode can be started by holding Shift+Enter when selecting macOS Monterey in OCLP's Boot Menu.
|
||||
|
||||
## No DisplayPort Output on Mac Pros with Nvidia Kepler
|
||||
|
||||
If you're having troubles with DisplayPort output on Mac Pros, try enabling Minimal Spoofing in Settings -> SMBIOS Settings and rebuild/install OpenCore. This will trick macOS drivers into thinking you have a newer MacPro7,1 and play nicer.
|
||||
|
||||

|
||||
|
||||
## Volume Hash Mismatch Error in macOS Monterey
|
||||
|
||||
A semi-common popup some users face is the "Volume Hash Mismatch" error:
|
||||
|
||||

|
||||
|
||||
What this error signifies is that the OS detects the boot volume's hash does not match to what the OS detects, this error is generally cosmetic and can be ignored. However if your system starts to crash spontaneously shortly after, you'll want to reinstall macOS fresh without importing any data at first.
|
||||
|
||||
* Note that this bug affects native Macs as well and is not due to issues with unsupported Macs: [OSX Daily: “Volume Hash Mismatch” Error in MacOS Monterey](https://osxdaily.com/2021/11/10/volume-hash-mismatch-error-in-macos-monterey/)
|
||||
|
||||
Additionally it can help to disable FeatureUnlock in Settings -> Misc Settings as this tool can be strenuous on systems with weaker memory stability.
|
||||
|
||||
## Cannot Disable SIP in recoveryOS
|
||||
|
||||
With OCLP, the patcher will always overwrite the current SIP value on boot to ensure that users don't brick an installation after NVRAM reset. However for users wanting to disable SIP entirely, this can be done easily.
|
||||
|
||||
Head into the GUI, Patcher Settings and toggle the bits you need disabled from SIP:
|
||||
|
||||
| SIP Enabled | SIP Lowered (Root Patching) | SIP Disabled |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
## Intermediate issues with USB 1.1 and Bluetooth on MacPro3,1 - MacPro5,1
|
||||
|
||||
For those experiencing issues with USB 1.1 devices (such as mice, keyboards and bluetooth chipsets), macOS Big Sur and newer have weakened OS-side reliability for the UHCI controller in older Mac Pros.
|
||||
|
||||
* UHCI is a USB 1.1 controller that is hooked together with the USB 2.0 ports in your system. Whenever a USB 1.1 device is detected, the UHCI controller is given ownership of the device at a hardware/firmware level.
|
||||
* EHCI is the USB 2.0 controller in older Mac Pros
|
||||
|
||||
Because of this, we recommend placing a USB 2.0/3.0 hub between your devices and the port on the Mac Pro. UHCI and EHCI cannot both be used at once, so using a USB hub will always force the EHCI controller on.
|
||||
|
||||
* Alternatively, you can try cold starting the hardware and see if macOS recognizes the UHCI controller properly
|
||||
|
||||
165
gui/gui_main.py
@@ -315,7 +315,7 @@ class wx_python_gui:
|
||||
|
||||
|
||||
# Copyright Label
|
||||
self.copyright = wx.StaticText(self.frame, label="Copyright © 2020-2022 Dortania")
|
||||
self.copyright = wx.StaticText(self.frame, label=self.constants.copyright_date)
|
||||
self.copyright.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
||||
self.copyright.SetPosition(
|
||||
wx.Point(
|
||||
@@ -340,8 +340,8 @@ class wx_python_gui:
|
||||
# Define Menu
|
||||
# Header: Get help with OpenCore Legacy Patcher
|
||||
# Subheader: Following resources are available:
|
||||
# Button: Offical Guide
|
||||
# Button: Offical Discord Server
|
||||
# Button: Official Guide
|
||||
# Button: Official Discord Server
|
||||
|
||||
self.frame.DestroyChildren()
|
||||
|
||||
@@ -362,8 +362,8 @@ class wx_python_gui:
|
||||
self.subheader.Centre(wx.HORIZONTAL)
|
||||
|
||||
|
||||
# Offical Guide
|
||||
self.guide = wx.Button(self.frame, label="Offical Guide", size=(200,30))
|
||||
# Official Guide
|
||||
self.guide = wx.Button(self.frame, label="Official Guide", size=(200,30))
|
||||
self.guide.SetPosition(
|
||||
wx.Point(
|
||||
self.subheader.GetPosition().x,
|
||||
@@ -374,8 +374,8 @@ class wx_python_gui:
|
||||
self.guide.Bind(wx.EVT_BUTTON, lambda event: webbrowser.open(self.constants.guide_link))
|
||||
self.guide.Centre(wx.HORIZONTAL)
|
||||
|
||||
# Offical Discord Server
|
||||
self.discord = wx.Button(self.frame, label="Offical Discord Server", size=(200,30))
|
||||
# Official Discord Server
|
||||
self.discord = wx.Button(self.frame, label="Official Discord Server", size=(200,30))
|
||||
self.discord.SetPosition(
|
||||
wx.Point(
|
||||
self.guide.GetPosition().x,
|
||||
@@ -386,7 +386,7 @@ class wx_python_gui:
|
||||
self.discord.Centre(wx.HORIZONTAL)
|
||||
|
||||
# Overclock Button
|
||||
self.overclock = wx.Button(self.frame, label="Offical Support Phone", size=(200,30))
|
||||
self.overclock = wx.Button(self.frame, label="Official Support Phone", size=(200,30))
|
||||
self.overclock.SetPosition(
|
||||
wx.Point(
|
||||
self.discord.GetPosition().x,
|
||||
@@ -677,6 +677,7 @@ class wx_python_gui:
|
||||
self.subheader.Centre(wx.HORIZONTAL)
|
||||
|
||||
patches = sys_patch_detect.detect_root_patch(self.computer.real_model, self.constants).detect_patch_set()
|
||||
self.patches = patches
|
||||
if not any(not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True for patch in patches):
|
||||
print("- No applicable patches available")
|
||||
patches = []
|
||||
@@ -873,7 +874,7 @@ class wx_python_gui:
|
||||
sys.stderr = menu_redirect.RedirectText(self.text_box, True)
|
||||
wx.GetApp().Yield()
|
||||
self.frame.Show()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants, self.patches).start_patch()
|
||||
sys.stdout = self.stock_stdout
|
||||
sys.stderr = self.stock_stderr
|
||||
|
||||
@@ -946,7 +947,7 @@ class wx_python_gui:
|
||||
sys.stdout = menu_redirect.RedirectText(self.text_box, True)
|
||||
sys.stderr = menu_redirect.RedirectText(self.text_box, True)
|
||||
wx.GetApp().Yield()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants, self.patches).start_unpatch()
|
||||
sys.stdout = self.stock_stdout
|
||||
sys.stderr = self.stock_stderr
|
||||
|
||||
@@ -1036,7 +1037,7 @@ class wx_python_gui:
|
||||
self.frame.Show()
|
||||
|
||||
# Download installer catalog
|
||||
avalible_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "PublicSeed")
|
||||
available_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "PublicSeed")
|
||||
|
||||
self.frame.DestroyChildren()
|
||||
sys.stdout = self.stock_stdout
|
||||
@@ -1060,13 +1061,17 @@ class wx_python_gui:
|
||||
|
||||
# Sort Installers by 'Version'
|
||||
# By default Apple adds new builds to the end of the list, so we need to sort them by version
|
||||
avalible_installers = {k: v for k, v in sorted(avalible_installers.items(), key=lambda x: x[1]['Version'])}
|
||||
available_installers = {k: v for k, v in sorted(available_installers.items(), key=lambda x: x[1]['Version'])}
|
||||
|
||||
i = -20
|
||||
if avalible_installers:
|
||||
for app in avalible_installers:
|
||||
print(f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})")
|
||||
self.install_selection = wx.Button(self.frame, label=f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])})", size=(250, 30))
|
||||
if available_installers:
|
||||
for app in available_installers:
|
||||
print(f"macOS {available_installers[app]['Version']} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])} - {available_installers[app]['Source']}) - {available_installers[app]['Variant']}")
|
||||
if available_installers[app]['Variant'] in ["DeveloperSeed" , "PublicSeed"]:
|
||||
extra = " Beta"
|
||||
else:
|
||||
extra = ""
|
||||
self.install_selection = wx.Button(self.frame, label=f"macOS {available_installers[app]['Version']}{extra} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])})", size=(280, 30))
|
||||
i = i + 25
|
||||
self.install_selection.SetPosition(
|
||||
wx.Point(
|
||||
@@ -1074,7 +1079,7 @@ class wx_python_gui:
|
||||
self.subheader.GetPosition().y + self.subheader.GetSize().height + i
|
||||
)
|
||||
)
|
||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.download_macos_click(f"macOS {avalible_installers[temp]['Version']} ({avalible_installers[temp]['Build']})", avalible_installers[temp]['Link']))
|
||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.download_macos_click(f"macOS {available_installers[temp]['Version']} ({available_installers[temp]['Build']})", available_installers[temp]['Link']))
|
||||
self.install_selection.Centre(wx.HORIZONTAL)
|
||||
else:
|
||||
self.install_selection = wx.StaticText(self.frame, label="No installers available")
|
||||
@@ -1178,12 +1183,12 @@ class wx_python_gui:
|
||||
self.subheader.Centre(wx.HORIZONTAL)
|
||||
|
||||
i = -7
|
||||
avalible_installers = installer.list_local_macOS_installers()
|
||||
if avalible_installers:
|
||||
available_installers = installer.list_local_macOS_installers()
|
||||
if available_installers:
|
||||
print("Installer found")
|
||||
for app in avalible_installers:
|
||||
print(f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})")
|
||||
self.install_selection = wx.Button(self.frame, label=f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})", size=(300, 30))
|
||||
for app in available_installers:
|
||||
print(f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})")
|
||||
self.install_selection = wx.Button(self.frame, label=f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", size=(300, 30))
|
||||
i = i + 25
|
||||
self.install_selection.SetPosition(
|
||||
wx.Point(
|
||||
@@ -1191,7 +1196,7 @@ class wx_python_gui:
|
||||
self.header.GetPosition().y + self.header.GetSize().height + i
|
||||
)
|
||||
)
|
||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(avalible_installers[temp]['Path']))
|
||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(available_installers[temp]['Short Name'], available_installers[temp]['Path']))
|
||||
self.install_selection.Centre(wx.HORIZONTAL)
|
||||
else:
|
||||
print("No installers found")
|
||||
@@ -1202,7 +1207,7 @@ class wx_python_gui:
|
||||
# Set Position below header
|
||||
wx.Point(
|
||||
self.header.GetPosition().x,
|
||||
self.header.GetPosition().y + self.header.GetSize().height + 10
|
||||
self.header.GetPosition().y + self.header.GetSize().height + 15
|
||||
)
|
||||
)
|
||||
self.install_selection.Centre(wx.HORIZONTAL)
|
||||
@@ -1219,7 +1224,7 @@ class wx_python_gui:
|
||||
|
||||
self.frame.SetSize(-1, self.return_to_main_menu.GetPosition().y + self.return_to_main_menu.GetSize().height + 40)
|
||||
|
||||
def format_usb_menu(self, installer_path):
|
||||
def format_usb_menu(self, installer_name, installer_path):
|
||||
self.frame.DestroyChildren()
|
||||
print(installer_path)
|
||||
|
||||
@@ -1264,7 +1269,7 @@ class wx_python_gui:
|
||||
self.usb_selection_label.GetPosition().y + self.usb_selection_label.GetSize().height + i
|
||||
)
|
||||
)
|
||||
self.usb_selection.Bind(wx.EVT_BUTTON, lambda event, temp=disk: self.format_usb_progress(availible_disks[temp]['identifier'], installer_path))
|
||||
self.usb_selection.Bind(wx.EVT_BUTTON, lambda event, temp=disk: self.format_usb_progress(availible_disks[temp]['identifier'], installer_name, installer_path))
|
||||
self.usb_selection.Centre(wx.HORIZONTAL)
|
||||
else:
|
||||
print("No disks found")
|
||||
@@ -1292,11 +1297,11 @@ class wx_python_gui:
|
||||
|
||||
self.frame.SetSize(-1, self.return_to_main_menu.GetPosition().y + self.return_to_main_menu.GetSize().height + 40)
|
||||
|
||||
def format_usb_progress(self, disk, installer_path):
|
||||
def format_usb_progress(self, disk, installer_name, installer_path):
|
||||
self.frame.DestroyChildren()
|
||||
self.frame.SetSize(500, -1)
|
||||
# Header
|
||||
self.header = wx.StaticText(self.frame, label="Creating macOS Installer")
|
||||
self.header = wx.StaticText(self.frame, label=f"Creating Installer: {installer_name}")
|
||||
self.header.SetFont(wx.Font(18, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
|
||||
self.header.Centre(wx.HORIZONTAL)
|
||||
|
||||
@@ -1389,7 +1394,6 @@ class wx_python_gui:
|
||||
time.sleep(0.1)
|
||||
output = float(utilities.monitor_disk_output(disk))
|
||||
bytes_written = output - default_output
|
||||
print(bytes_written)
|
||||
if thread.is_alive():
|
||||
self.progress_bar.SetValue(bytes_written)
|
||||
self.progress_label.SetLabel(f"Bytes Written: {round(bytes_written, 2)}MB")
|
||||
@@ -1734,7 +1738,7 @@ class wx_python_gui:
|
||||
self.set_terascale_accel_checkbox.SetPosition(wx.Point(
|
||||
self.disable_thunderbolt_checkbox.GetPosition().x,
|
||||
self.disable_thunderbolt_checkbox.GetPosition().y + self.disable_thunderbolt_checkbox.GetSize().height))
|
||||
self.set_terascale_accel_checkbox.SetToolTip(wx.ToolTip("This option will determine whether TeraScale 2 acceleration is avalible during Root Volume patching.\nOnly applicable if your system has a AMD TeraScale 2 GPU (ie. MacBookPro8,2/3)"))
|
||||
self.set_terascale_accel_checkbox.SetToolTip(wx.ToolTip("This option will determine whether TeraScale 2 acceleration is available during Root Volume patching.\nOnly applicable if your system has a AMD TeraScale 2 GPU (ie. MacBookPro8,2/3)"))
|
||||
if self.computer.real_model not in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
self.set_terascale_accel_checkbox.Disable()
|
||||
|
||||
@@ -1757,21 +1761,30 @@ class wx_python_gui:
|
||||
self.hibernation_checkbox.SetToolTip(wx.ToolTip("This will disable the ConnectDrivers in OpenCore\nRecommended to toggle if your machine is having issues with hibernation.\nMainly applicable for MacBookPro9,1 and MacBookPro10,1"))
|
||||
|
||||
# Disable Battery Throttling
|
||||
self.disable_battery_throttling_checkbox = wx.CheckBox(self.frame, label="Disable Battery Throttling")
|
||||
self.disable_battery_throttling_checkbox = wx.CheckBox(self.frame, label="Disable Firmware Throttling")
|
||||
self.disable_battery_throttling_checkbox.SetValue(self.constants.disable_msr_power_ctl)
|
||||
self.disable_battery_throttling_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_battery_throttling_click)
|
||||
self.disable_battery_throttling_checkbox.SetPosition(wx.Point(
|
||||
self.hibernation_checkbox.GetPosition().x,
|
||||
self.hibernation_checkbox.GetPosition().y + self.hibernation_checkbox.GetSize().height))
|
||||
self.disable_battery_throttling_checkbox.SetToolTip(wx.ToolTip("This will forcefully disable MSR Power Control on Arrendale and newer Laptops\nMainly applicable for systems with severe battery throttling"))
|
||||
self.disable_battery_throttling_checkbox.SetToolTip(wx.ToolTip("This will forcefully disable MSR Power Control on Arrendale and newer Macs\nMainly applicable for systems with severe throttling due to missing battery or display"))
|
||||
|
||||
# Disable XCPM
|
||||
self.disable_xcpm_checkbox = wx.CheckBox(self.frame, label="Disable XCPM")
|
||||
self.disable_xcpm_checkbox.SetValue(self.constants.disable_xcpm)
|
||||
self.disable_xcpm_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_xcpm_click)
|
||||
self.disable_xcpm_checkbox.SetPosition(wx.Point(
|
||||
self.disable_battery_throttling_checkbox.GetPosition().x,
|
||||
self.disable_battery_throttling_checkbox.GetPosition().y + self.disable_battery_throttling_checkbox.GetSize().height))
|
||||
self.disable_xcpm_checkbox.SetToolTip(wx.ToolTip("This will forcefully disable XCPM on Ivy Bridge EP and newer Macs\nMainly applicable for systems with severe throttling due to missing battery or display"))
|
||||
|
||||
# Software Demux
|
||||
self.software_demux_checkbox = wx.CheckBox(self.frame, label="Software Demux")
|
||||
self.software_demux_checkbox.SetValue(self.constants.software_demux)
|
||||
self.software_demux_checkbox.Bind(wx.EVT_CHECKBOX, self.software_demux_click)
|
||||
self.software_demux_checkbox.SetPosition(wx.Point(
|
||||
self.disable_battery_throttling_checkbox.GetPosition().x,
|
||||
self.disable_battery_throttling_checkbox.GetPosition().y + self.disable_battery_throttling_checkbox.GetSize().height))
|
||||
self.disable_xcpm_checkbox.GetPosition().x,
|
||||
self.disable_xcpm_checkbox.GetPosition().y + self.disable_xcpm_checkbox.GetSize().height))
|
||||
self.software_demux_checkbox.SetToolTip(wx.ToolTip("This will force a software based demux on MacBookPro8,2/3 aiding for better battery life\nThis will require the dGPU to be disabled via NVRAM"))
|
||||
if not self.constants.custom_model and self.computer.real_model not in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
self.software_demux_checkbox.Disable()
|
||||
@@ -1867,6 +1880,14 @@ class wx_python_gui:
|
||||
print("NVMe Disabled")
|
||||
self.constants.nvme_boot = False
|
||||
|
||||
def nvme_power_management_click(self, event=None):
|
||||
if self.nvme_power_management_checkbox.GetValue():
|
||||
print("NVMe Power Management Enabled")
|
||||
self.constants.allow_nvme_fixing = True
|
||||
else:
|
||||
print("NVMe Power Management Disabled")
|
||||
self.constants.allow_nvme_fixing = False
|
||||
|
||||
def xhci_click(self, event=None):
|
||||
if self.xhci_boot_checkbox.GetValue():
|
||||
print("XHCI Enabled")
|
||||
@@ -1883,6 +1904,14 @@ class wx_python_gui:
|
||||
print("Wake on WLAN Disabled")
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
|
||||
def content_caching_click(self, event=None):
|
||||
if self.content_caching_checkbox.GetValue():
|
||||
print("Content Caching Enabled")
|
||||
self.constants.set_content_caching = True
|
||||
else:
|
||||
print("Content Caching Disabled")
|
||||
self.constants.set_content_caching = False
|
||||
|
||||
def disable_tb_click(self, event=None):
|
||||
if self.disable_thunderbolt_checkbox.GetValue():
|
||||
print("Disable Thunderbolt Enabled")
|
||||
@@ -1922,6 +1951,14 @@ class wx_python_gui:
|
||||
else:
|
||||
print("Disable Battery Throttling Disabled")
|
||||
self.constants.disable_msr_power_ctl = False
|
||||
|
||||
def disable_xcpm_click(self, event=None):
|
||||
if self.disable_xcpm_checkbox.GetValue():
|
||||
print("Disable XCPM Enabled")
|
||||
self.constants.disable_xcpm = True
|
||||
else:
|
||||
print("Disable XCPM Disabled")
|
||||
self.constants.disable_xcpm = False
|
||||
|
||||
def software_demux_click(self, event=None):
|
||||
if self.software_demux_checkbox.GetValue():
|
||||
@@ -2354,34 +2391,48 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
self.firewire_boot_checkbox.SetToolTip(wx.ToolTip("Enable FireWire Boot support in macOS 10.15 and newer.\nMainly applicable for Macs with FireWire or Thunderbolt to FireWire adapters"))
|
||||
if generate_smbios.check_firewire(self.computer.real_model) is False and not self.constants.custom_model:
|
||||
self.firewire_boot_checkbox.Disable()
|
||||
|
||||
# XHCI Boot
|
||||
self.xhci_boot_checkbox = wx.CheckBox(self.frame, label="XHCI Boot")
|
||||
self.xhci_boot_checkbox.SetValue(self.constants.xhci_boot)
|
||||
self.xhci_boot_checkbox.Bind(wx.EVT_CHECKBOX, self.xhci_click)
|
||||
self.xhci_boot_checkbox.SetPosition(wx.Point(self.firewire_boot_checkbox.GetPosition().x, self.firewire_boot_checkbox.GetPosition().y + self.firewire_boot_checkbox.GetSize().height))
|
||||
self.xhci_boot_checkbox.SetToolTip(wx.ToolTip("Enables XHCI/USB3.o support in UEFI for non-native systems (ie. pre-Ivy Bridge)\nRequires OpenCore to be stored on a natively bootable volume however"))
|
||||
|
||||
# NVMe Boot
|
||||
self.nvme_boot_checkbox = wx.CheckBox(self.frame, label="NVMe Boot")
|
||||
self.nvme_boot_checkbox.SetValue(self.constants.nvme_boot)
|
||||
self.nvme_boot_checkbox.Bind(wx.EVT_CHECKBOX, self.nvme_click)
|
||||
self.nvme_boot_checkbox.SetPosition(wx.Point(self.firewire_boot_checkbox.GetPosition().x, self.firewire_boot_checkbox.GetPosition().y + self.firewire_boot_checkbox.GetSize().height))
|
||||
self.nvme_boot_checkbox.SetPosition(wx.Point(self.xhci_boot_checkbox.GetPosition().x, self.xhci_boot_checkbox.GetPosition().y + self.xhci_boot_checkbox.GetSize().height))
|
||||
self.nvme_boot_checkbox.SetToolTip(wx.ToolTip("Enables NVMe support in UEFI for non-native systems (ie. MacPro3,1)\nRequires OpenCore to be stored on a natively bootable volume however"))
|
||||
|
||||
# XHCI Boot
|
||||
self.xhci_boot_checkbox = wx.CheckBox(self.frame, label="XHCI Boot")
|
||||
self.xhci_boot_checkbox.SetValue(self.constants.xhci_boot)
|
||||
self.xhci_boot_checkbox.Bind(wx.EVT_CHECKBOX, self.xhci_click)
|
||||
self.xhci_boot_checkbox.SetPosition(wx.Point(self.nvme_boot_checkbox.GetPosition().x, self.nvme_boot_checkbox.GetPosition().y + self.nvme_boot_checkbox.GetSize().height))
|
||||
self.xhci_boot_checkbox.SetToolTip(wx.ToolTip("Enables XHCI/USB3.o support in UEFI for non-native systems (ie. pre-Ivy Bridge)\nRequires OpenCore to be stored on a natively bootable volume however"))
|
||||
# NVMe Power Management
|
||||
self.nvme_power_management_checkbox = wx.CheckBox(self.frame, label="NVMe Power Management")
|
||||
self.nvme_power_management_checkbox.SetValue(self.constants.allow_nvme_fixing)
|
||||
self.nvme_power_management_checkbox.Bind(wx.EVT_CHECKBOX, self.nvme_power_management_click)
|
||||
self.nvme_power_management_checkbox.SetPosition(wx.Point(self.nvme_boot_checkbox.GetPosition().x, self.nvme_boot_checkbox.GetPosition().y + self.nvme_boot_checkbox.GetSize().height))
|
||||
self.nvme_power_management_checkbox.SetToolTip(wx.ToolTip("For machines with upgraded NVMe drives, this option allows for better power management support within macOS.\nNote that some NVMe drives don't support macOS's power management settings, and can result in boot issues. Disable this option if you experience IONVMeFamily kernel panics. Mainly applicable for Skylake and newer Macs."))
|
||||
|
||||
# Wake on WLAN
|
||||
self.wake_on_wlan_checkbox = wx.CheckBox(self.frame, label="Wake on WLAN")
|
||||
self.wake_on_wlan_checkbox.SetValue(self.constants.enable_wake_on_wlan)
|
||||
self.wake_on_wlan_checkbox.Bind(wx.EVT_CHECKBOX, self.wake_on_wlan_click)
|
||||
self.wake_on_wlan_checkbox.SetPosition(wx.Point(self.xhci_boot_checkbox.GetPosition().x, self.xhci_boot_checkbox.GetPosition().y + self.xhci_boot_checkbox.GetSize().height))
|
||||
self.wake_on_wlan_checkbox.SetPosition(wx.Point(self.nvme_power_management_checkbox.GetPosition().x, self.nvme_power_management_checkbox.GetPosition().y + self.nvme_power_management_checkbox.GetSize().height))
|
||||
self.wake_on_wlan_checkbox.SetToolTip(wx.ToolTip("Enables Wake on WLAN for Broadcom Wifi.\nBy default, Wake on WLAN is disabled to work around Apple's wake from sleep bug causing heavily degraded networking performance.\nNote: This option is only applicable for BCM943224, BCM94331, BCM94360 and BCM943602 chipsets"))
|
||||
|
||||
# Content Caching
|
||||
self.content_caching_checkbox = wx.CheckBox(self.frame, label="Content Caching")
|
||||
self.content_caching_checkbox.SetValue(self.constants.set_content_caching)
|
||||
self.content_caching_checkbox.Bind(wx.EVT_CHECKBOX, self.content_caching_click)
|
||||
self.content_caching_checkbox.SetPosition(wx.Point(self.wake_on_wlan_checkbox.GetPosition().x, self.wake_on_wlan_checkbox.GetPosition().y + self.wake_on_wlan_checkbox.GetSize().height))
|
||||
self.content_caching_checkbox.SetToolTip(wx.ToolTip("Enables content caching support in macOS"))
|
||||
|
||||
# Button: return to main menu
|
||||
self.return_to_main_menu_button = wx.Button(self.frame, label="Return to Settings")
|
||||
self.return_to_main_menu_button.Bind(wx.EVT_BUTTON, self.settings_menu)
|
||||
self.return_to_main_menu_button.SetPosition(wx.Point(
|
||||
self.wake_on_wlan_checkbox.GetPosition().x,
|
||||
self.wake_on_wlan_checkbox.GetPosition().y + self.wake_on_wlan_checkbox.GetSize().height + 10))
|
||||
self.content_caching_checkbox.GetPosition().x,
|
||||
self.content_caching_checkbox.GetPosition().y + self.content_caching_checkbox.GetSize().height + 10))
|
||||
self.return_to_main_menu_button.Center(wx.HORIZONTAL)
|
||||
|
||||
# set frame size below return to main menu button
|
||||
@@ -2389,6 +2440,9 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
|
||||
def non_metal_config_menu(self, event=None):
|
||||
# Configures ASB's Blur settings
|
||||
# Check Dark Menu Bar:
|
||||
# defaults read ASB_DarkMenuBar
|
||||
# defaults write -g ASB_DarkMenuBar -bool true
|
||||
# Check Beta Blur:
|
||||
# defaults read ASB_BlurBeta
|
||||
# defaults write -g ASB_BlurBeta -bool true
|
||||
@@ -2437,7 +2491,11 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
self.subheader_4.SetPosition(wx.Point(0, self.subheader_3.GetPosition().y + self.subheader_3.GetSize().height+ 5))
|
||||
self.subheader_4.Centre(wx.HORIZONTAL)
|
||||
|
||||
|
||||
is_dark_menu_bar = subprocess.run(["defaults", "read", "-g", "ASB_DarkMenuBar"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip()
|
||||
if is_dark_menu_bar in ["1", "true"]:
|
||||
is_dark_menu_bar = True
|
||||
else:
|
||||
is_dark_menu_bar = False
|
||||
|
||||
is_blur_enabled = subprocess.run(["defaults", "read", "-g", "ASB_BlurBeta"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip()
|
||||
if is_blur_enabled in ["1", "true"]:
|
||||
@@ -2445,12 +2503,18 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
else:
|
||||
is_blur_enabled = False
|
||||
|
||||
# Checkbox: Dark Menu Bar
|
||||
self.dark_menu_bar_checkbox = wx.CheckBox(self.frame, label="Dark Menu Bar")
|
||||
self.dark_menu_bar_checkbox.SetValue(is_dark_menu_bar)
|
||||
self.dark_menu_bar_checkbox.Bind(wx.EVT_CHECKBOX, self.enable_dark_menubar_click)
|
||||
self.dark_menu_bar_checkbox.SetPosition(wx.Point(0, self.subheader_4.GetPosition().y + self.subheader_4.GetSize().height + 10))
|
||||
self.dark_menu_bar_checkbox.Centre(wx.HORIZONTAL)
|
||||
|
||||
# Checkbox: Enable Beta Blur
|
||||
self.enable_beta_blur_checkbox = wx.CheckBox(self.frame, label="Enable Beta Blur")
|
||||
self.enable_beta_blur_checkbox.SetValue(is_blur_enabled)
|
||||
self.enable_beta_blur_checkbox.Bind(wx.EVT_CHECKBOX, self.enable_beta_blur_click)
|
||||
self.enable_beta_blur_checkbox.SetPosition(wx.Point(0, self.subheader_4.GetPosition().y + self.subheader_4.GetSize().height + 10))
|
||||
self.enable_beta_blur_checkbox.Center(wx.HORIZONTAL)
|
||||
self.enable_beta_blur_checkbox.SetPosition(wx.Point(self.dark_menu_bar_checkbox.GetPosition().x, self.dark_menu_bar_checkbox.GetPosition().y + self.dark_menu_bar_checkbox.GetSize().height + 10))
|
||||
|
||||
# Text: Blur Radius
|
||||
self.blur_radius_text = wx.StaticText(self.frame, label="Current Blur Radius: " + "px")
|
||||
@@ -2490,6 +2554,13 @@ OpenCore Legacy Patcher by default knows the most ideal
|
||||
subprocess.run(["defaults", "write", "-g", "ASB_BlurBeta", "-bool", "false"])
|
||||
print("Beta Blur Enabled:", event.IsChecked())
|
||||
|
||||
def enable_dark_menubar_click(self, event=None):
|
||||
if event.IsChecked():
|
||||
subprocess.run(["defaults", "write", "-g", "ASB_DarkMenuBar", "-bool", "true"])
|
||||
else:
|
||||
subprocess.run(["defaults", "write", "-g", "ASB_DarkMenuBar", "-bool", "false"])
|
||||
print("Dark Menu Bar Enabled:", event.IsChecked())
|
||||
|
||||
def blur_radius_scale_change(self, event=None):
|
||||
val = event.GetInt()
|
||||
subprocess.run(["defaults", "write", "-g", "ASB_BlurOverride", "-float", str(val)])
|
||||
|
||||
BIN
images/Hash-Mismatch.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
images/OCLP-GUI-Root-Patch.png
Normal file
|
After Width: | Height: | Size: 275 KiB |
BIN
images/OCLP-GUI-Root-Patching-Finished.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
images/OCLP-GUI-Root-Patching-List.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
images/OCLP-GUI-SMBIOS-Minimal.png
Normal file
|
After Width: | Height: | Size: 252 KiB |
BIN
images/OCLP-GUI-Settings-Beta-Blur.png
Normal file
|
After Width: | Height: | Size: 424 KiB |
BIN
images/OCLP-GUI-Settings-SIP-Disabled.png
Normal file
|
After Width: | Height: | Size: 923 KiB |
BIN
images/OCLP-GUI-Settings-SIP-Enabled.png
Normal file
|
After Width: | Height: | Size: 916 KiB |
BIN
images/OCLP-GUI-Settings-SIP-Root-Patch.png
Normal file
|
After Width: | Height: | Size: 893 KiB |
BIN
images/OCLP-GUI-Settings-ShowPicker.png
Normal file
|
After Width: | Height: | Size: 495 KiB |
|
Before Width: | Height: | Size: 311 KiB After Width: | Height: | Size: 569 KiB |
@@ -501,6 +501,42 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>SDXC Patch for Pre-Ivy</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>21.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>BigSurSDXC.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/BigSurSDXC</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>I210 Ethernet patch</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CatalinaIntelI210Ethernet.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/CatalinaIntelI210Ethernet</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -1149,6 +1185,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>ACPI_SMC_PlatformPlugin Override</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>21.4.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>ASPP-Override.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string></string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Block</key>
|
||||
<array/>
|
||||
@@ -1309,7 +1363,7 @@
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string>21.99.99</string>
|
||||
<string>21.1.0</string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<key>Replace</key>
|
||||
@@ -1339,7 +1393,7 @@
|
||||
<key>Mask</key>
|
||||
<data></data>
|
||||
<key>MaxKernel</key>
|
||||
<string>21.99.99</string>
|
||||
<string>21.1.0</string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<key>Replace</key>
|
||||
|
||||
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.0.7-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.0.7-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.0-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.0-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.5.7-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.5.7-RELEASE.zip
Normal file
BIN
payloads/Kexts/Ethernet/CatalinaIntelI210Ethernet-v1.0.0.zip
Normal file
BIN
payloads/Kexts/Misc/ASPP-Override-v1.0.1.zip
Normal file
BIN
payloads/Kexts/Misc/BigSurSDXC-v1.0.0.zip
Normal file
BIN
payloads/OC-Patcher-TUI.icns
Normal file
BIN
payloads/Tools/ocvalidate-0.7.8
Executable file
@@ -101,7 +101,7 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
print("- Set Mojave/Catalina root patch configuration")
|
||||
settings.moj_cat_accel = True
|
||||
print("- Set System Volume patching")
|
||||
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings).start_patch()
|
||||
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings, None).start_patch()
|
||||
elif self.args.unpatch_sys_vol:
|
||||
print("- Set System Volume unpatching")
|
||||
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings).start_unpatch()
|
||||
sys_patch.PatchSysVolume(settings.custom_model or settings.computer.real_model, settings, None).start_unpatch()
|
||||
|
||||
@@ -126,9 +126,6 @@ class BuildOpenCore:
|
||||
self.constants.cpufriend_path,
|
||||
lambda: self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False and self.constants.serial_settings != "None",
|
||||
),
|
||||
# Ethernet patches
|
||||
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Nvidia"),
|
||||
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Marvell"),
|
||||
# Legacy audio
|
||||
(
|
||||
"AppleALC.kext",
|
||||
@@ -177,16 +174,52 @@ class BuildOpenCore:
|
||||
print(f"- Adding additional FeatureUnlock args: {self.constants.fu_arguments}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
|
||||
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value or self.constants.disable_xcpm is True:
|
||||
# With macOS 12.3 Beta 1, Apple dropped the 'plugin-type' check within X86PlatformPlugin
|
||||
# Because of this, X86PP will match onto the CPU instead of ACPI_SMC_PlatformPlugin
|
||||
# This causes power management to break on pre-Ivy Bridge CPUs as they don't have correct
|
||||
# power management tables provided.
|
||||
# This patch will simply increase ASPP's 'IOProbeScore' to outmatch X86PP
|
||||
print("- Overriding ACPI SMC matching")
|
||||
self.enable_kext("ASPP-Override.kext", self.constants.aspp_override_version, self.constants.aspp_override_path)
|
||||
if self.constants.disable_xcpm is True:
|
||||
# Only inject on older OSes if user requests
|
||||
self.get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", "ASPP-Override.kext")["MinKernel"] = ""
|
||||
|
||||
if self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1", "MacBookPro10,1"]:
|
||||
# Modded RestrictEvents with displaypolicyd blocked to fix dGPU switching
|
||||
self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path)
|
||||
|
||||
# Ethernet Patch Sets
|
||||
if smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Broadcom":
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Required due to Big Sur's BCM5701 requiring VT-x support
|
||||
# Applicable for pre-Ivy Bridge models
|
||||
self.enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
||||
if not self.constants.custom_model and self.constants.computer.ethernet:
|
||||
for controller in self.constants.computer.ethernet:
|
||||
if isinstance(controller, device_probe.BroadcomEthernet) and controller.chipset == device_probe.BroadcomEthernet.Chipsets.AppleBCM5701Ethernet:
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Required due to Big Sur's BCM5701 requiring VT-D support
|
||||
# Applicable for pre-Ivy Bridge models
|
||||
if self.get_kext_by_bundle_path("CatalinaBCM5701Ethernet.kext")["Enabled"] is False:
|
||||
self.enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
||||
elif isinstance(controller, device_probe.IntelEthernet) and controller.chipset == device_probe.IntelEthernet.Chipsets.AppleIntelI210Ethernet:
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Apple's IOSkywalkFamily in DriverKit requires VT-D support
|
||||
# Applicable for pre-Ivy Bridge models
|
||||
if self.get_kext_by_bundle_path("CatalinaIntelI210Ethernet.kext")["Enabled"] is False:
|
||||
self.enable_kext("CatalinaIntelI210Ethernet.kext", self.constants.i210_version, self.constants.i210_path)
|
||||
elif isinstance(controller, device_probe.NVIDIAEthernet):
|
||||
if self.get_kext_by_bundle_path("nForceEthernet.kext")["Enabled"] is False:
|
||||
self.enable_kext("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path)
|
||||
elif isinstance(controller, device_probe.Marvell) or isinstance(controller, device_probe.SysKonnect):
|
||||
if self.get_kext_by_bundle_path("MarvelYukonEthernet.kext")["Enabled"] is False:
|
||||
self.enable_kext("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path)
|
||||
else:
|
||||
if smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Broadcom":
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Required due to Big Sur's BCM5701 requiring VT-D support
|
||||
# Applicable for pre-Ivy Bridge models
|
||||
self.enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path)
|
||||
elif smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Nvidia":
|
||||
self.enable_kext("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path)
|
||||
elif smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Marvell":
|
||||
self.enable_kext("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path)
|
||||
|
||||
# i3 Ivy Bridge iMacs don't support RDRAND
|
||||
# However for prebuilt, assume they do
|
||||
@@ -218,7 +251,7 @@ class BuildOpenCore:
|
||||
if not self.computer.storage:
|
||||
print("- No PCIe Storage Controllers found to fix")
|
||||
|
||||
if not self.constants.custom_model:
|
||||
if not self.constants.custom_model and self.constants.allow_nvme_fixing is True:
|
||||
nvme_devices = [i for i in self.computer.storage if isinstance(i, device_probe.NVMeController)]
|
||||
for i, controller in enumerate(nvme_devices):
|
||||
print(f"- Found 3rd Party NVMe SSD ({i + 1}): {utilities.friendly_hex(controller.vendor_id)}:{utilities.friendly_hex(controller.device_id)}")
|
||||
@@ -236,11 +269,8 @@ class BuildOpenCore:
|
||||
print("- Falling back to -nvmefaspm")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm"
|
||||
|
||||
if (controller.vendor_id != 0x144D and controller.device_id != 0xA804 and self.model not in ["MacBookPro13,3", "MacBookPro14,3"]):
|
||||
if (controller.vendor_id != 0x144D and controller.device_id != 0xA804):
|
||||
# Avoid injecting NVMeFix when a native Apple NVMe drive is present
|
||||
# Note on 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
|
||||
# Technically this should be patched based on NVMeFix.kext logic,
|
||||
# however Apple deemed the SSD unsupported for enhanced performance
|
||||
# https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225
|
||||
if self.get_kext_by_bundle_path("NVMeFix.kext")["Enabled"] is False:
|
||||
self.enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path)
|
||||
@@ -380,6 +410,12 @@ class BuildOpenCore:
|
||||
self.get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "BUF0 to BUF1")["Enabled"] = True
|
||||
shutil.copy(self.constants.windows_ssdt_path, self.constants.acpi_path)
|
||||
|
||||
# With macOS Monterey, Apple's SDXC driver requires the system to support VT-D
|
||||
# However pre-Ivy Bridge don't support this feature
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value:
|
||||
if (self.constants.computer.sdxc_controller and not self.constants.custom_model) or (self.model.startswith("MacBookPro8") or self.model.startswith("Macmini5")):
|
||||
self.enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
|
||||
|
||||
# USB Map
|
||||
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
|
||||
if (
|
||||
@@ -704,6 +740,8 @@ class BuildOpenCore:
|
||||
elif self.computer.bluetooth_chipset == "3rd Party Bluetooth 4.0 Hub":
|
||||
print("- Detected 3rd Party Chipset")
|
||||
self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
print("- Enabling Bluetooth FeatureFlags")
|
||||
self.config["Kernel"]["Quirks"]["ExtendBTFeatureFlags"] = True
|
||||
elif smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM20702_v1.value:
|
||||
print("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
@@ -891,10 +929,10 @@ class BuildOpenCore:
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True
|
||||
# Lets us check in sys_patch.py if config supports FileVault
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_fv"
|
||||
if self.constants.disable_msr_power_ctl is True and self.model.startswith("MacBook"):
|
||||
print("- Disabling Battery Throttling")
|
||||
if self.constants.disable_msr_power_ctl is True:
|
||||
print("- Disabling Firmware Throttling")
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.nehalem.value:
|
||||
# Nehalem and newer MacBooks force firmware throttling via MSR_POWER_CTL
|
||||
# Nehalem and newer systems force firmware throttling via MSR_POWER_CTL
|
||||
self.enable_kext("SimpleMSR.kext", self.constants.simplemsr_version, self.constants.simplemsr_path)
|
||||
if self.constants.disable_connectdrivers is True:
|
||||
print("- Disabling ConnectDrivers")
|
||||
@@ -902,7 +940,7 @@ class BuildOpenCore:
|
||||
if self.constants.nvram_write is False:
|
||||
print("- Disabling Hardware NVRAM Write")
|
||||
self.config["NVRAM"]["WriteFlash"] = False
|
||||
if self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True:
|
||||
if self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True and self.constants.set_content_caching is True:
|
||||
# Add Content Caching patch
|
||||
print("- Fixing Content Caching support")
|
||||
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
|
||||
|
||||
@@ -467,6 +467,33 @@ OpenCore will enable NVMe support in it's picker
|
||||
else:
|
||||
self.allow_nvme()
|
||||
|
||||
def allow_nvme_pwr_mgmt(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Allow NVMe Power Management Adjustments"])
|
||||
print(
|
||||
"""
|
||||
For machines with upgraded NVMe drives, this
|
||||
option allows for better power management support
|
||||
within macOS.
|
||||
|
||||
Note that some NVMe drives don't support macOS's
|
||||
power management settings, and can result in boot
|
||||
issues. Disable this option if you experience
|
||||
IONVMeFamily kernel panics. Mainly applicable for
|
||||
Skylake and newer Macs.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable NVMe Power Management?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_nvme_fixing = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_nvme_fixing = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_nvme()
|
||||
|
||||
def allow_xhci(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Allow NVMe UEFI Support"])
|
||||
@@ -780,16 +807,16 @@ https://dortania.github.io/OpenCore-Legacy-Patcher/ACCEL.html#unable-to-switch-g
|
||||
print(
|
||||
"""
|
||||
By default on Nehalem and newer Macs, the firmware will throttle if
|
||||
the battery is either dead or missing. The firmware will set
|
||||
the battery or Display is either dead or missing. The firmware will set
|
||||
'BD PROCHOT' to notify the OS the machine needs to run in an extreme
|
||||
low power mode.
|
||||
|
||||
Enabling this option will patch 'MSR_POWER_CTL' to be unset allowing
|
||||
proper CPU behaviour as if battery is present. Note that this can cause
|
||||
proper CPU behaviour as if hardware is present. Note that this can cause
|
||||
instability in situations where the CPU is being taxed and pulls more
|
||||
power than the PSU can supply.
|
||||
power than the laptop's PSU can supply.
|
||||
|
||||
Note: Only supported on Nehalem and newer MacBooks (2010+)
|
||||
Note: Only supported on Nehalem and newer Macs (2010+)
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -803,6 +830,32 @@ Note: Only supported on Nehalem and newer MacBooks (2010+)
|
||||
else:
|
||||
self.set_battery_throttle()
|
||||
|
||||
def set_xcpm(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Disable XCPM"])
|
||||
print(
|
||||
"""
|
||||
By default on Ivy Bridge EP and newer Macs, the system will throttle if
|
||||
the battery or Display is either dead or missing. Apple's XCPM will set
|
||||
'BD PROCHOT' to avoid damage to the system.
|
||||
|
||||
Enabling this option will disable Apple's XNU CPU Power Management (XCPM)
|
||||
and fall back onto the older ACPI_SMC_PlatformPlugin.kext.
|
||||
|
||||
Note: Only supported on Ivy Bridge EP and newer Macs (2013+)
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Disable XCPM?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disable_xcpm = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disable_xcpm = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_xcpm()
|
||||
|
||||
def set_surplus(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Override SurPlus MaxKernel"])
|
||||
@@ -965,6 +1018,26 @@ Supported Options:
|
||||
else:
|
||||
print("Invalid input, returning to previous menu")
|
||||
self.set_nvram_write()
|
||||
|
||||
def set_cc_support(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set Content Caching Support"])
|
||||
print(
|
||||
"""
|
||||
On systems spoofing via VMM, Content Caching is disabled by
|
||||
default by Apple. This option allows you to mask VMM from
|
||||
AssetCache.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set Content Caching Support (y/n/q): ")
|
||||
if change_menu in ["y", "Y", "yes", "Yes"]:
|
||||
self.constants.set_content_caching = True
|
||||
elif change_menu in ["n", "N", "no", "No"]:
|
||||
self.constants.set_content_caching = False
|
||||
elif change_menu in ["q", "Q", "Quit", "quit"]:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_cc_support()
|
||||
|
||||
def credits(self):
|
||||
utilities.TUIOnlyPrint(
|
||||
@@ -1031,9 +1104,9 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
no_unpatch = True
|
||||
change_menu = input("Patch System Volume?: ")
|
||||
if no_patch is not True and change_menu == "1":
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants, None).start_patch()
|
||||
elif no_unpatch is not True and change_menu == "2":
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch()
|
||||
sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants, None).start_unpatch()
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
|
||||
@@ -1154,9 +1227,10 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
title = ["Adjust Bootable Volume Settings"]
|
||||
menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_firewire],
|
||||
[f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_nvme],
|
||||
[f"Set XHCI Boot:\tCurrently {self.constants.xhci_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_xhci],
|
||||
[f"Set FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_firewire],
|
||||
[f"Set XHCI Boot:\t\tCurrently {self.constants.xhci_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_xhci],
|
||||
[f"Set NVMe Boot:\t\tCurrently {self.constants.nvme_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_nvme],
|
||||
[f"Set NVMe Power Management:\tCurrently {self.constants.allow_nvme_fixing}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_nvme_pwr_mgmt],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
@@ -1188,10 +1262,12 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
],
|
||||
[f"Set Hibernation Workaround:\tCurrently {self.constants.disable_connectdrivers}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_hibernation_workaround],
|
||||
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
||||
[f"Disable XCPM:\t\tCurrently {self.constants.disable_xcpm}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_xcpm],
|
||||
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
||||
[f"Set 3rd Party SSD Support:\tCurrently {self.constants.allow_3rd_party_drives}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_3rd_party_drices],
|
||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||
[f"Set NVRAM Write:\t\tCurrently {self.constants.nvram_write}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_nvram_write],
|
||||
[f"Set Content Caching:\tCurrently {self.constants.set_content_caching}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_cc_support],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
@@ -1259,12 +1335,16 @@ B. Exit
|
||||
options = []
|
||||
title = ["Select the macOS Installer you wish to download"]
|
||||
menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
avalible_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "DeveloperSeed")
|
||||
if avalible_installers:
|
||||
available_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "DeveloperSeed")
|
||||
if available_installers:
|
||||
# Add mirror of 11.2.3 for users who want it
|
||||
options.append([f"macOS {mirror_data.Install_macOS_Big_Sur_11_2_3['Version']} ({mirror_data.Install_macOS_Big_Sur_11_2_3['Build']} - {utilities.human_fmt(mirror_data.Install_macOS_Big_Sur_11_2_3['Size'])} - {mirror_data.Install_macOS_Big_Sur_11_2_3['Source']})", lambda: self.download_install_assistant(mirror_data.Install_macOS_Big_Sur_11_2_3['Link'])])
|
||||
for app in avalible_installers:
|
||||
options.append([f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})", lambda x=app: self.download_install_assistant(avalible_installers[x]['Link'])])
|
||||
for app in available_installers:
|
||||
if available_installers[app]['Variant'] in ["DeveloperSeed", "PublicSeed"]:
|
||||
variant = " Beta"
|
||||
else:
|
||||
variant = ""
|
||||
options.append([f"macOS {available_installers[app]['Version']}{variant} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])} - {available_installers[app]['Source']})", lambda x=app: self.download_install_assistant(available_installers[x]['Link'])])
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
response = menu.start()
|
||||
@@ -1275,10 +1355,10 @@ B. Exit
|
||||
options = []
|
||||
title = ["Select the macOS Installer you wish to use"]
|
||||
menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
avalible_installers = installer.list_local_macOS_installers()
|
||||
if avalible_installers:
|
||||
for app in avalible_installers:
|
||||
options.append([f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})", lambda x=app: self.list_disks(avalible_installers[x]['Path'])])
|
||||
available_installers = installer.list_local_macOS_installers()
|
||||
if available_installers:
|
||||
for app in available_installers:
|
||||
options.append([f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", lambda x=app: self.list_disks(available_installers[x]['Path'])])
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
response = menu.start()
|
||||
|
||||
@@ -14,31 +14,32 @@ from data import os_data
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
# Patcher Versioning
|
||||
self.patcher_version = "0.4.1" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version = "0.2.9" # PatcherSupportPkg
|
||||
self.patcher_version = "0.4.3" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version = "0.3.4" # PatcherSupportPkg
|
||||
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
||||
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
|
||||
self.discord_link = "https://discord.gg/rqdPgH8xSN"
|
||||
self.guide_link = "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
||||
self.repo_link = "https://github.com/dortania/OpenCore-Legacy-Patcher"
|
||||
self.repo_link_latest = f"{self.repo_link}/releases/tag/{self.patcher_version}"
|
||||
self.copyright_date = "Copyright © 2020-2022 Dortania"
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
self.opencore_commit = "b530a29 - 01-11-2022"
|
||||
self.opencore_version = "0.7.7"
|
||||
self.opencore_commit = "30798fb - 02-07-2022"
|
||||
self.opencore_version = "0.7.8"
|
||||
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version = "1.5.9" # Lilu
|
||||
self.whatevergreen_version = "1.5.6" # WhateverGreen
|
||||
self.lilu_version = "1.6.0" # Lilu
|
||||
self.whatevergreen_version = "1.5.7" # WhateverGreen
|
||||
self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup
|
||||
self.nvmefix_version = "1.0.9" # NVMeFix
|
||||
self.applealc_version = "1.6.3" # AppleALC
|
||||
self.restrictevents_version = "1.0.6" # RestrictEvents
|
||||
self.restrictevents_mbp_version = "1.0.6" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
|
||||
self.featureunlock_version = "1.0.6" # FeatureUnlock
|
||||
self.featureunlock_version = "1.0.7" # FeatureUnlock
|
||||
self.debugenhancer_version = "1.0.4" # DebugEnhancer
|
||||
self.cpufriend_version = "1.2.4" # CPUFriend
|
||||
self.bluetool_version = "2.6.1" # BlueToolFixup (BrcmPatchRAM)
|
||||
@@ -56,10 +57,12 @@ class Constants:
|
||||
|
||||
## Apple - Dortania Modified
|
||||
self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet
|
||||
self.i210_version = "1.0.0" # CatalinaIntelI210Ethernet
|
||||
self.corecaptureelcap_version = "1.0.1" # corecaptureElCap
|
||||
self.io80211elcap_version = "2.0.0" # IO80211ElCap
|
||||
self.io80211high_sierra_version = "1.0.1" # IO80211HighSierra
|
||||
self.io80211mojave_version = "1.0.1" # IO80211Mojave
|
||||
self.bigsursdxc_version = "1.0.0" # BigSurSDXC
|
||||
|
||||
## Dortania
|
||||
## https://github.com/dortania
|
||||
@@ -67,6 +70,7 @@ class Constants:
|
||||
self.smcspoof_version = "1.0.0" # SMC-Spoof
|
||||
self.mce_version = "1.0.0" # AppleMCEReporterDisabler
|
||||
self.btspoof_version = "1.0.0" # Bluetooth-Spoof
|
||||
self.aspp_override_version = "1.0.1" # ACPI_SMC_PlatformPlugin Override
|
||||
|
||||
## Syncretic
|
||||
## https://forums.macrumors.com/members/syncretic.1173816/
|
||||
@@ -181,6 +185,9 @@ class Constants:
|
||||
self.walkthrough = False # Enable Walkthrough
|
||||
self.disable_connectdrivers = False # Disable ConnectDrivers (hibernation)
|
||||
self.allow_3rd_party_drives = True # Allow ThridPartyDrives quirk
|
||||
self.set_content_caching = False # Set Content Caching
|
||||
self.allow_nvme_fixing = True # Allow NVMe Kernel Space Patches
|
||||
self.disable_xcpm = False # Disable XCPM (X86PlatformPlugin.kext)
|
||||
|
||||
self.legacy_accel_support = [
|
||||
os_data.os_data.mojave,
|
||||
@@ -279,6 +286,10 @@ class Constants:
|
||||
def bcm570_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
|
||||
|
||||
@property
|
||||
def i210_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/CatalinaIntelI210Ethernet-v{self.i210_version}.zip")
|
||||
|
||||
@property
|
||||
def marvel_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
|
||||
@@ -290,6 +301,10 @@ class Constants:
|
||||
@property
|
||||
def mce_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
|
||||
|
||||
@property
|
||||
def bigsursdxc_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/BigSurSDXC-v{self.bigsursdxc_version}.zip")
|
||||
|
||||
@property
|
||||
def mousse_path(self):
|
||||
@@ -338,6 +353,10 @@ class Constants:
|
||||
@property
|
||||
def btspoof_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Bluetooth-Spoof-v{self.btspoof_version}.zip")
|
||||
|
||||
@property
|
||||
def aspp_override_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/ASPP-Override-v{self.aspp_override_version}.zip")
|
||||
|
||||
@property
|
||||
def nvmefix_path(self):
|
||||
@@ -685,10 +704,6 @@ class Constants:
|
||||
def legacy_wifi_support(self):
|
||||
return self.payload_apple_application_support / Path("Legacy-Wifi")
|
||||
|
||||
@property
|
||||
def legacy_keyboard_backlight_support(self):
|
||||
return self.payload_apple_application_support / Path("Keyboard-Backlight")
|
||||
|
||||
@property
|
||||
def legacy_dropbox_support(self):
|
||||
return self.payload_apple_application_support / Path("Dropbox")
|
||||
|
||||
@@ -12,14 +12,22 @@ class generate_defaults:
|
||||
settings.amfi_status = True
|
||||
|
||||
if host_is_target:
|
||||
if settings.computer.usb_controllers and smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Pre-Ivy do not natively support XHCI boot support
|
||||
# If we detect XHCI on older model, enable
|
||||
for controller in settings.computer.usb_controllers:
|
||||
if isinstance(controller, device_probe.XHCIController):
|
||||
settings.xhci_boot = True
|
||||
if settings.computer.usb_controllers:
|
||||
try:
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value:
|
||||
# Pre-Ivy do not natively support XHCI boot support
|
||||
# If we detect XHCI on older model, enable
|
||||
for controller in settings.computer.usb_controllers:
|
||||
if isinstance(controller, device_probe.XHCIController):
|
||||
settings.xhci_boot = True
|
||||
break
|
||||
except KeyError:
|
||||
pass
|
||||
if utilities.check_metal_support(device_probe, settings.computer) is False:
|
||||
settings.disable_cs_lv = True
|
||||
settings.secure_status = False
|
||||
settings.sip_status = False
|
||||
settings.allow_fv_root = True
|
||||
if settings.computer.gpus:
|
||||
for gpu in settings.computer.gpus:
|
||||
if gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
@@ -79,6 +87,11 @@ class generate_defaults:
|
||||
settings.secure_status = False # Modified root volume
|
||||
settings.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# settings.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
|
||||
if "Book" in model:
|
||||
settings.set_content_caching = False
|
||||
else:
|
||||
settings.set_content_caching = True
|
||||
|
||||
custom_cpu_model_value = utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
@@ -96,13 +109,24 @@ class generate_defaults:
|
||||
# Users disabling TS2 most likely have a faulty dGPU
|
||||
# users can override this in settings
|
||||
settings.allow_ts2_accel = False
|
||||
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value and model != "MacPro5,1":
|
||||
# Sidecar and AirPlay to Mac only blacklist Ivy and newer (as well as MacPro5,1)
|
||||
# Avoid extra patching without benefit
|
||||
settings.fu_arguments = " -disable_sidecar_mac"
|
||||
else:
|
||||
settings.fu_arguments = None
|
||||
try:
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value and model != "MacPro5,1":
|
||||
# Sidecar and AirPlay to Mac only blacklist Ivy and newer (as well as MacPro5,1)
|
||||
# Avoid extra patching without benefit
|
||||
settings.fu_arguments = " -disable_sidecar_mac"
|
||||
else:
|
||||
settings.fu_arguments = None
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] >= cpu_data.cpu_data.skylake.value:
|
||||
# On 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
|
||||
# Technically this should be patched based on NVMeFix.kext logic,
|
||||
# however Apple deemed the SSD unsupported for enhanced performance
|
||||
# In addition, some upgraded NVMe drives still have issues with enhanced power management
|
||||
# Safest to disable by default, allow user to configure afterwards
|
||||
settings.allow_nvme_fixing = False
|
||||
else:
|
||||
settings.allow_nvme_fixing = True
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
settings.recovery_status = utilities.check_recovery()
|
||||
|
||||
@@ -50,7 +50,10 @@ class PCIDevice:
|
||||
|
||||
device = cls(vendor_id, device_id, int.from_bytes(properties["class-code"][:6], byteorder="little"), name=ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetName(entry, None)[1]))
|
||||
if "model" in properties:
|
||||
device.model = properties["model"].strip(b"\0").decode()
|
||||
model = properties["model"]
|
||||
if type(model) is bytes:
|
||||
model = model.strip(b"\0").decode()
|
||||
device.model = model
|
||||
if "acpi-path" in properties:
|
||||
device.acpi_path = properties["acpi-path"]
|
||||
device.populate_pci_path(entry)
|
||||
@@ -73,18 +76,19 @@ class PCIDevice:
|
||||
def detect(cls, device):
|
||||
return device.vendor_id == cls.VENDOR_ID and ((device.class_code == cls.CLASS_CODE) if getattr(cls, "CLASS_CODE", None) else True) # type: ignore # pylint: disable=no-member
|
||||
|
||||
# def acpi_path(self):
|
||||
# # Eventually
|
||||
# raise NotImplementedError
|
||||
|
||||
def populate_pci_path(self, original_entry: ioreg.io_registry_entry_t):
|
||||
# Based off gfxutil logic, seems to work.
|
||||
paths = []
|
||||
entry = original_entry
|
||||
while entry:
|
||||
if ioreg.IOObjectConformsTo(entry, "IOPCIDevice".encode()):
|
||||
location = [hex(int(i, 16)) for i in ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetLocationInPlane(entry, "IOService".encode(), None)[1]).split(",") + ["0"]]
|
||||
paths.append(f"Pci({location[0]},{location[1]})")
|
||||
# Virtual PCI devices provide a botched IOService path (us.electronic.kext.vusb)
|
||||
# We only care about physical devices, so skip them
|
||||
try:
|
||||
location = [hex(int(i, 16)) for i in ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetLocationInPlane(entry, "IOService".encode(), None)[1]).split(",") + ["0"]]
|
||||
paths.append(f"Pci({location[0]},{location[1]})")
|
||||
except ValueError:
|
||||
break
|
||||
elif ioreg.IOObjectConformsTo(entry, "IOACPIPlatformDevice".encode()):
|
||||
paths.append(f"PciRoot({hex(int(ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, '_UID', ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0))})") # type: ignore
|
||||
break
|
||||
@@ -149,6 +153,14 @@ class NVMeController(PCIDevice):
|
||||
aspm: Optional[int] = None
|
||||
# parent_aspm: Optional[int] = None
|
||||
|
||||
@dataclass
|
||||
class EthernetController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x020000
|
||||
|
||||
chipset: enum.Enum = field(init=False)
|
||||
|
||||
def __post_init__(self):
|
||||
self.detect_chipset()
|
||||
|
||||
@dataclass
|
||||
class SATAController(PCIDevice):
|
||||
@@ -170,6 +182,14 @@ class EHCIController(PCIDevice):
|
||||
class OHCIController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x0c0310
|
||||
|
||||
@dataclass
|
||||
class UHCIController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x0c0300
|
||||
|
||||
@dataclass
|
||||
class SDXCController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x080501
|
||||
|
||||
@dataclass
|
||||
class NVIDIA(GPU):
|
||||
VENDOR_ID: ClassVar[int] = 0x10DE
|
||||
@@ -197,6 +217,18 @@ class NVIDIA(GPU):
|
||||
else:
|
||||
self.arch = NVIDIA.Archs.Unknown
|
||||
|
||||
@dataclass
|
||||
class NVIDIAEthernet(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x10DE
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
nForceEthernet = "nForceEthernet"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
# nForce driver matches against Vendor ID, thus making all nForce chipsets supported
|
||||
self.chipset = NVIDIAEthernet.Chipsets.nForceEthernet
|
||||
|
||||
@dataclass
|
||||
class AMD(GPU):
|
||||
@@ -290,6 +322,27 @@ class Intel(GPU):
|
||||
else:
|
||||
self.arch = Intel.Archs.Unknown
|
||||
|
||||
@dataclass
|
||||
class IntelEthernet(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x8086
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
AppleIntel8254XEthernet = "AppleIntel8254XEthernet Supported"
|
||||
AppleIntelI210Ethernet = "AppleIntelI210Ethernet Supported"
|
||||
Intel82574L = "Intel82574L Supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in pci_data.intel_ids.AppleIntel8254XEthernet:
|
||||
self.chipset = IntelEthernet.Chipsets.AppleIntel8254XEthernet
|
||||
elif self.device_id in pci_data.intel_ids.AppleIntelI210Ethernet:
|
||||
self.chipset = IntelEthernet.Chipsets.AppleIntelI210Ethernet
|
||||
elif self.device_id in pci_data.intel_ids.Intel82574L:
|
||||
self.chipset = IntelEthernet.Chipsets.Intel82574L
|
||||
else:
|
||||
self.chipset = IntelEthernet.Chipsets.Unknown
|
||||
|
||||
@dataclass
|
||||
class Broadcom(WirelessCard):
|
||||
@@ -320,6 +373,21 @@ class Broadcom(WirelessCard):
|
||||
else:
|
||||
self.chipset = Broadcom.Chipsets.Unknown
|
||||
|
||||
@dataclass
|
||||
class BroadcomEthernet(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x14E4
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
AppleBCM5701Ethernet = "AppleBCM5701Ethernet supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in pci_data.broadcom_ids.AppleBCM5701Ethernet:
|
||||
self.chipset = BroadcomEthernet.Chipsets.AppleBCM5701Ethernet
|
||||
else:
|
||||
self.chipset = BroadcomEthernet.Chipsets.Unknown
|
||||
|
||||
@dataclass
|
||||
class Atheros(WirelessCard):
|
||||
@@ -340,6 +408,56 @@ class Atheros(WirelessCard):
|
||||
self.chipset = Atheros.Chipsets.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Aquantia(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x1D6A
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
AppleEthernetAquantiaAqtion = "AppleEthernetAquantiaAqtion supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in pci_data.aquantia_ids.AppleEthernetAquantiaAqtion:
|
||||
self.chipset = Aquantia.Chipsets.AppleEthernetAquantiaAqtion
|
||||
else:
|
||||
self.chipset = Aquantia.Chipsets.Unknown
|
||||
|
||||
@dataclass
|
||||
class Marvell(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x11AB
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
MarvelYukonEthernet = "MarvelYukonEthernet supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in pci_data.marvell_ids.MarvelYukonEthernet:
|
||||
self.chipset = Marvell.Chipsets.MarvelYukonEthernet
|
||||
else:
|
||||
self.chipset = Marvell.Chipsets.Unknown
|
||||
|
||||
@dataclass
|
||||
class SysKonnect(EthernetController):
|
||||
VENDOR_ID: ClassVar[int] = 0x1148
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
MarvelYukonEthernet = "MarvelYukonEthernet supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in pci_data.syskonnect_ids.MarvelYukonEthernet:
|
||||
self.chipset = SysKonnect.Chipsets.MarvelYukonEthernet
|
||||
else:
|
||||
self.chipset = SysKonnect.Chipsets.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Computer:
|
||||
real_model: Optional[str] = None
|
||||
@@ -351,11 +469,14 @@ class Computer:
|
||||
dgpu: Optional[GPU] = None # Shortcut for GFX0
|
||||
storage: list[PCIDevice] = field(default_factory=list)
|
||||
usb_controllers: list[PCIDevice] = field(default_factory=list)
|
||||
sdxc_controller: list[PCIDevice] = field(default_factory=list)
|
||||
ethernet: Optional[EthernetController] = field(default_factory=list)
|
||||
wifi: Optional[WirelessCard] = None
|
||||
cpu: Optional[CPU] = None
|
||||
oclp_version: Optional[str] = None
|
||||
opencore_version: Optional[str] = None
|
||||
bluetooth_chipset: Optional[str] = None
|
||||
ambient_light_sensor: Optional[bool] = False
|
||||
third_party_sata_ssd: Optional[bool] = False
|
||||
|
||||
@staticmethod
|
||||
@@ -367,9 +488,12 @@ class Computer:
|
||||
computer.wifi_probe()
|
||||
computer.storage_probe()
|
||||
computer.usb_controller_probe()
|
||||
computer.sdxc_controller_probe()
|
||||
computer.ethernet_probe()
|
||||
computer.smbios_probe()
|
||||
computer.cpu_probe()
|
||||
computer.bluetooth_probe()
|
||||
computer.ambient_light_sensor_probe()
|
||||
computer.sata_disk_probe()
|
||||
return computer
|
||||
|
||||
@@ -426,6 +550,25 @@ class Computer:
|
||||
break
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def ambient_light_sensor_probe(self):
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("ALS0".encode()), None)[1]), None)
|
||||
if device:
|
||||
self.ambient_light_sensor = True
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def sdxc_controller_probe(self):
|
||||
sdxc_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SDXCController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
for device in sdxc_controllers:
|
||||
self.sdxc_controller.append(SDXCController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def usb_controller_probe(self):
|
||||
xhci_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
@@ -448,6 +591,14 @@ class Computer:
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
uhci_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(UHCIController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
for device in xhci_controllers:
|
||||
self.usb_controllers.append(XHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
@@ -457,7 +608,27 @@ class Computer:
|
||||
for device in ohci_controllers:
|
||||
self.usb_controllers.append(OHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
for device in uhci_controllers:
|
||||
self.usb_controllers.append(UHCIController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def ethernet_probe(self):
|
||||
ethernet_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(EthernetController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
# for device in ethernet_controllers:
|
||||
# self.ethernet.append(EthernetController.from_ioregistry(device))
|
||||
# ioreg.IOObjectRelease(device)
|
||||
|
||||
for device in ethernet_controllers:
|
||||
vendor: Type[EthernetController] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=EthernetController) # type: ignore
|
||||
if vendor:
|
||||
self.ethernet.append(vendor.from_ioregistry(device)) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def storage_probe(self):
|
||||
sata_controllers = ioreg.ioiterator_to_list(
|
||||
|
||||
@@ -168,9 +168,18 @@ Please build OpenCore first!"""
|
||||
# cancelled prompt
|
||||
return
|
||||
else:
|
||||
utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + ["", "Please report this to the devs at GitHub."]
|
||||
).start()
|
||||
if self.constants.gui_mode is False:
|
||||
utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + [""]
|
||||
).start()
|
||||
else:
|
||||
print("An error occurred!")
|
||||
print(result.stderr.decode())
|
||||
|
||||
# Check if we're in Safe Mode, and if so, tell user FAT32 is unsupported
|
||||
if utilities.check_boot_mode() == "safe_boot":
|
||||
print("\nSafe Mode detected. FAT32 is unsupported by macOS in this mode.")
|
||||
print("Please disable Safe Mode and try again.")
|
||||
return
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {full_disk_identifier}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
parent_disk = partition_info["ParentWholeDisk"]
|
||||
@@ -242,7 +251,10 @@ Please build OpenCore first!"""
|
||||
print("\nPress [Enter] to continue.\n")
|
||||
input()
|
||||
else:
|
||||
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()
|
||||
if self.constants.gui_mode is False:
|
||||
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!"]).start()
|
||||
else:
|
||||
print("EFI failed to mount!")
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
if exc_info[0] == FileNotFoundError:
|
||||
|
||||
@@ -12,26 +12,54 @@ def list_local_macOS_installers():
|
||||
|
||||
for application in Path("/Applications").iterdir():
|
||||
# Verify whether application has createinstallmedia
|
||||
if (Path("/Applications") / Path(application) / Path("Contents/Resources/createinstallmedia")).exists():
|
||||
plist = plistlib.load((Path("/Applications") / Path(application) / Path("Contents/Info.plist")).open("rb"))
|
||||
try:
|
||||
# Doesn't reflect true OS build, but best to report SDK in the event multiple installers are found with same version
|
||||
app_version = plist["DTPlatformVersion"]
|
||||
clean_name = plist["CFBundleDisplayName"]
|
||||
try:
|
||||
if (Path("/Applications") / Path(application) / Path("Contents/Resources/createinstallmedia")).exists():
|
||||
plist = plistlib.load((Path("/Applications") / Path(application) / Path("Contents/Info.plist")).open("rb"))
|
||||
try:
|
||||
app_sdk = plist["DTSDKBuild"]
|
||||
# Doesn't reflect true OS build, but best to report SDK in the event multiple installers are found with same version
|
||||
app_version = plist["DTPlatformVersion"]
|
||||
clean_name = plist["CFBundleDisplayName"]
|
||||
try:
|
||||
app_sdk = plist["DTSDKBuild"]
|
||||
except KeyError:
|
||||
app_sdk = "Unknown"
|
||||
|
||||
# app_version can sometimes report GM instead of the actual version
|
||||
# This is a workaround to get the actual version
|
||||
if app_version.startswith("GM"):
|
||||
try:
|
||||
app_version = int(app_sdk[:2])
|
||||
if app_version < 20:
|
||||
app_version = f"10.{app_version - 4}"
|
||||
else:
|
||||
app_version = f"{app_version - 9}.0"
|
||||
except ValueError:
|
||||
app_version = "Unknown"
|
||||
# Check if App Version is High Sierra or newer
|
||||
can_add = False
|
||||
if app_version.startswith("10."):
|
||||
app_sub_version = app_version.split(".")[1]
|
||||
if int(app_sub_version) >= 13:
|
||||
can_add = True
|
||||
else:
|
||||
can_add = False
|
||||
else:
|
||||
can_add = True
|
||||
if can_add is True:
|
||||
application_list.update({
|
||||
application: {
|
||||
"Short Name": clean_name,
|
||||
"Version": app_version,
|
||||
"Build": app_sdk,
|
||||
"Path": application,
|
||||
}
|
||||
})
|
||||
except KeyError:
|
||||
app_sdk = "Unknown"
|
||||
application_list.update({
|
||||
application: {
|
||||
"Short Name": clean_name,
|
||||
"Version": app_version,
|
||||
"Build": app_sdk,
|
||||
"Path": application,
|
||||
}
|
||||
})
|
||||
except KeyError:
|
||||
pass
|
||||
pass
|
||||
except PermissionError:
|
||||
pass
|
||||
# Sort Applications by version
|
||||
application_list = {k: v for k, v in sorted(application_list.items(), key=lambda item: item[1]["Version"])}
|
||||
return application_list
|
||||
|
||||
def create_installer(installer_path, volume_name):
|
||||
@@ -59,6 +87,7 @@ def download_install_assistant(download_path, ia_link):
|
||||
return False
|
||||
|
||||
def install_macOS_installer(download_path):
|
||||
print("- Extracting macOS installer from InstallAssistant.pkg\n This may take some time")
|
||||
args = [
|
||||
"osascript",
|
||||
"-e",
|
||||
@@ -78,7 +107,7 @@ def install_macOS_installer(download_path):
|
||||
return False
|
||||
|
||||
def list_downloadable_macOS_installers(download_path, catalog):
|
||||
avalible_apps = {}
|
||||
available_apps = {}
|
||||
if catalog == "DeveloperSeed":
|
||||
link = "https://swscan.apple.com/content/catalogs/others/index-12seed-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
|
||||
elif catalog == "PublicSeed":
|
||||
@@ -99,18 +128,31 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
||||
catalog_plist["Products"][item]["ExtendedMetaInfo"]["InstallAssistantPackageIdentifiers"]["BuildManifest"]
|
||||
|
||||
for bm_package in catalog_plist["Products"][item]["Packages"]:
|
||||
if "BuildManifest.plist" in bm_package["URL"]:
|
||||
utilities.download_file(bm_package["URL"], (Path(download_path) / Path("BuildManifest.plist")))
|
||||
build_plist = plistlib.load((Path(download_path) / Path("BuildManifest.plist")).open("rb"))
|
||||
version = build_plist["ProductVersion"]
|
||||
build = build_plist["ProductBuildVersion"]
|
||||
if "Info.plist" in bm_package["URL"] and "InstallInfo.plist" not in bm_package["URL"]:
|
||||
utilities.download_file(bm_package["URL"], (Path(download_path) / Path("Info.plist")))
|
||||
build_plist = plistlib.load((Path(download_path) / Path("Info.plist")).open("rb"))
|
||||
version = build_plist["MobileAssetProperties"]["OSVersion"]
|
||||
build = build_plist["MobileAssetProperties"]["Build"]
|
||||
try:
|
||||
catalog_url = build_plist["MobileAssetProperties"]["BridgeVersionInfo"]["CatalogURL"]
|
||||
if "beta" in catalog_url:
|
||||
catalog_url = "PublicSeed"
|
||||
elif "customerseed" in catalog_url:
|
||||
catalog_url = "CustomerSeed"
|
||||
elif "seed" in catalog_url:
|
||||
catalog_url = "DeveloperSeed"
|
||||
else:
|
||||
catalog_url = "Unknown"
|
||||
except KeyError:
|
||||
# Assume CustomerSeed if no catalog URL is found
|
||||
catalog_url = "CustomerSeed"
|
||||
for ia_package in catalog_plist["Products"][item]["Packages"]:
|
||||
if "InstallAssistant.pkg" in ia_package["URL"]:
|
||||
download_link = ia_package["URL"]
|
||||
size = ia_package["Size"]
|
||||
integrity = ia_package["IntegrityDataURL"]
|
||||
|
||||
avalible_apps.update({
|
||||
available_apps.update({
|
||||
item: {
|
||||
"Version": version,
|
||||
"Build": build,
|
||||
@@ -118,11 +160,12 @@ def list_downloadable_macOS_installers(download_path, catalog):
|
||||
"Size": size,
|
||||
"integrity": integrity,
|
||||
"Source": "Apple Inc.",
|
||||
"Variant": catalog_url,
|
||||
}
|
||||
})
|
||||
except KeyError:
|
||||
pass
|
||||
return avalible_apps
|
||||
return available_apps
|
||||
|
||||
def format_drive(disk_id):
|
||||
# Formats a disk for macOS install
|
||||
|
||||
@@ -16,6 +16,7 @@ class OpenCoreLegacyPatcher:
|
||||
self.generate_base_data()
|
||||
if utilities.check_cli_args() is None:
|
||||
if launch_gui is True:
|
||||
utilities.disable_cls()
|
||||
from gui import gui_main
|
||||
gui_main.wx_python_gui(self.constants)
|
||||
else:
|
||||
|
||||
@@ -12,42 +12,56 @@ import zipfile
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
from resources import constants, device_probe, utilities, generate_smbios, sys_patch_download
|
||||
from data import sip_data, sys_patch_data, model_array, os_data, smbios_data, cpu_data
|
||||
from resources import constants, utilities, generate_smbios, sys_patch_download, sys_patch_detect
|
||||
from data import sip_data, sys_patch_data, os_data
|
||||
|
||||
|
||||
class PatchSysVolume:
|
||||
def __init__(self, model, versions):
|
||||
def __init__(self, model, versions, hardware_details=None):
|
||||
self.model = model
|
||||
self.constants: constants.Constants() = versions
|
||||
self.computer = self.constants.computer
|
||||
self.root_mount_path = None
|
||||
self.sip_enabled = True
|
||||
self.sbm_enabled = True
|
||||
self.amfi_enabled = True
|
||||
self.fv_enabled = True
|
||||
self.dosdude_patched = True
|
||||
self.nvidia_legacy = False
|
||||
self.kepler_gpu = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.ivy_gpu = False
|
||||
self.brightness_legacy = False
|
||||
self.legacy_audio = False
|
||||
self.legacy_wifi = False
|
||||
self.legacy_gmux = False
|
||||
self.legacy_keyboard_backlight = False
|
||||
self.added_legacy_kexts = False
|
||||
self.amfi_must_disable = False
|
||||
self.check_board_id = False
|
||||
self.bad_board_id = False
|
||||
self.no_patch = True
|
||||
self.validate = False
|
||||
self.supports_metal = False
|
||||
self.added_legacy_kexts = False
|
||||
self.root_supports_snapshot = utilities.check_if_root_is_apfs_snapshot()
|
||||
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
# GUI will detect hardware patches betfore starting PatchSysVolume()
|
||||
# However the TUI will not, so allow for data to be passed in manually avoiding multiple calls
|
||||
if hardware_details is None:
|
||||
hardware_details = sys_patch_detect.detect_root_patch(self.computer.real_model, self.constants).detect_patch_set()
|
||||
self.init_hardware_patches(hardware_details)
|
||||
self.init_pathing(custom_root_mount_path=None, custom_data_mount_path=None)
|
||||
|
||||
def init_hardware_patches(self, hardware_details):
|
||||
|
||||
self.amfi_must_disable = hardware_details["Settings: Requires AMFI exemption"]
|
||||
self.check_board_id = hardware_details["Settings: Requires Board ID validation"]
|
||||
self.sip_enabled = hardware_details["Validation: SIP is enabled"]
|
||||
self.sbm_enabled = hardware_details["Validation: SBM is enabled"]
|
||||
self.amfi_enabled = hardware_details["Validation: AMFI is enabled"]
|
||||
self.fv_enabled = hardware_details["Validation: FileVault is enabled"]
|
||||
self.dosdude_patched = hardware_details["Validation: System is dosdude1 patched"]
|
||||
self.bad_board_id = hardware_details[f"Validation: Board ID is unsupported \n({self.computer.reported_board_id})"]
|
||||
|
||||
self.nvidia_legacy = hardware_details["Graphics: Nvidia Tesla"]
|
||||
self.kepler_gpu = hardware_details["Graphics: Nvidia Kepler"]
|
||||
self.amd_ts1 = hardware_details["Graphics: AMD TeraScale 1"]
|
||||
self.amd_ts2 = hardware_details["Graphics: AMD TeraScale 2"]
|
||||
self.iron_gpu = hardware_details["Graphics: Intel Ironlake"]
|
||||
self.sandy_gpu = hardware_details["Graphics: Intel Sandy Bridge"]
|
||||
self.ivy_gpu = hardware_details["Graphics: Intel Ivy Bridge"]
|
||||
self.brightness_legacy = hardware_details["Brightness: Legacy Backlight Control"]
|
||||
self.legacy_audio = hardware_details["Audio: Legacy Realtek"]
|
||||
self.legacy_wifi = hardware_details["Networking: Legacy Wireless"]
|
||||
self.legacy_gmux = hardware_details["Miscellaneous: Legacy GMUX"]
|
||||
self.legacy_keyboard_backlight = hardware_details["Miscellaneous: Legacy Keyboard Backlight"]
|
||||
|
||||
def init_pathing(self, custom_root_mount_path=None, custom_data_mount_path=None):
|
||||
if custom_root_mount_path and custom_data_mount_path:
|
||||
self.mount_location = custom_root_mount_path
|
||||
self.data_mount_location = custom_data_mount_path
|
||||
elif self.root_supports_snapshot is True:
|
||||
# Big Sur and newer use APFS snapshots
|
||||
self.mount_location = "/System/Volumes/Update/mnt1"
|
||||
self.mount_location_data = ""
|
||||
@@ -67,8 +81,11 @@ class PatchSysVolume:
|
||||
def find_mount_root_vol(self, patch):
|
||||
self.root_mount_path = utilities.get_disk_path()
|
||||
if self.root_mount_path.startswith("disk"):
|
||||
if self.constants.detected_os == os_data.os_data.catalina and self.validate is False:
|
||||
print("- Mounting Catalina Root Volume as writable")
|
||||
if (
|
||||
self.constants.detected_os == os_data.os_data.catalina or
|
||||
(self.constants.detected_os > os_data.os_data.catalina and self.root_supports_snapshot is False)
|
||||
):
|
||||
print("- Mounting Dedicated Root Volume as writable")
|
||||
utilities.elevated(["mount", "-uw", f"{self.mount_location}/"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print(f"- Found Root Volume at: {self.root_mount_path}")
|
||||
if Path(self.mount_extensions).exists():
|
||||
@@ -76,7 +93,7 @@ class PatchSysVolume:
|
||||
if patch is True:
|
||||
# Root Volume unpatching is unreliable due to being a live volume
|
||||
# Only worth while on Big Sur as '--last-sealed-snapshot' is hit or miss
|
||||
if self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True:
|
||||
if self.constants.detected_os == os_data.os_data.big_sur and self.root_supports_snapshot is True and utilities.check_seal() is True:
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
@@ -84,7 +101,7 @@ class PatchSysVolume:
|
||||
self.unpatch_root_vol()
|
||||
return True
|
||||
else:
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
if self.constants.detected_os > os_data.os_data.catalina and self.root_supports_snapshot is True:
|
||||
print("- Mounting APFS Snapshot as writable")
|
||||
result = utilities.elevated(["mount", "-o", "nobrowse", "-t", "apfs", f"/dev/{self.root_mount_path}", self.mount_location], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode == 0:
|
||||
@@ -94,7 +111,7 @@ class PatchSysVolume:
|
||||
if patch is True:
|
||||
# Root Volume unpatching is unreliable due to being a live volume
|
||||
# Only worth while on Big Sur as '--last-sealed-snapshot' is hit or miss
|
||||
if self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True:
|
||||
if self.constants.detected_os == os_data.os_data.big_sur and self.root_supports_snapshot is True and utilities.check_seal() is True:
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
@@ -202,7 +219,7 @@ class PatchSysVolume:
|
||||
print("- Could not find Extensions.zip, cannot manually unpatch root volume")
|
||||
|
||||
def unpatch_root_vol(self):
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
if self.constants.detected_os > os_data.os_data.catalina and self.root_supports_snapshot is True:
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
result = utilities.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
@@ -212,6 +229,7 @@ class PatchSysVolume:
|
||||
print("- Failed to revert snapshot via bless, falling back on manual restoration")
|
||||
self.manual_root_patch_revert()
|
||||
else:
|
||||
self.clean_skylight_plugins()
|
||||
print("- Unpatching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
else:
|
||||
@@ -239,12 +257,7 @@ class PatchSysVolume:
|
||||
else:
|
||||
self.success_status = True
|
||||
print("- Successfully built new kernel cache")
|
||||
# if self.constants.gui_mode is False:
|
||||
# if self.constants.detected_os > os_data.os_data.catalina:
|
||||
# input("Press [ENTER] to continue with snapshotting")
|
||||
# else:
|
||||
# input("Press [ENTER] to continue with kernel and dyld cache merging")
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
if self.root_supports_snapshot is True:
|
||||
print("- Creating new APFS snapshot")
|
||||
bless = utilities.elevated(
|
||||
["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
@@ -262,17 +275,11 @@ class PatchSysVolume:
|
||||
if self.constants.detected_os == os_data.os_data.catalina:
|
||||
print("- Merging kernel cache")
|
||||
utilities.process_status(utilities.elevated(["kcditto"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging dyld cache")
|
||||
utilities.process_status(utilities.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||
if self.constants.detected_os in [os_data.os_data.mojave, os_data.os_data.catalina]:
|
||||
print("- Merging dyld cache")
|
||||
utilities.process_status(utilities.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||
print("- Patching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||
print(
|
||||
"""\nPlease note that with ATI TeraScale 2 GPUs, you may experience colour strobing
|
||||
on reboot. Please use SwitchResX or ResXtreme to force 1 million colours on your
|
||||
monitor to fix this. If you are epileptic, please ask for someone to aid you or
|
||||
set million colour before rebooting"""
|
||||
)
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to continue")
|
||||
|
||||
@@ -300,6 +307,11 @@ set million colour before rebooting"""
|
||||
utilities.process_status(utilities.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def clean_skylight_plugins(self):
|
||||
if (Path(self.mount_application_support) / Path("SkyLightPlugins/")).exists():
|
||||
print("- Found SkylightPlugins folder, removing")
|
||||
utilities.process_status(utilities.elevated(["rm", "-rf", f"{self.mount_application_support}/SkyLightPlugins"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_brightness_patch(self):
|
||||
self.delete_old_binaries(sys_patch_data.DeleteBrightness)
|
||||
self.add_new_binaries(sys_patch_data.AddBrightness, self.constants.legacy_brightness)
|
||||
@@ -338,8 +350,10 @@ set million colour before rebooting"""
|
||||
)
|
||||
|
||||
def add_legacy_keyboard_backlight_patch(self):
|
||||
print("- Merging Keyboard Backlight SkyLightPlugins")
|
||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_keyboard_backlight_support}/", self.mount_application_support], stdout=subprocess.PIPE)
|
||||
print("- Enabling Keyboard Backlight delay")
|
||||
utilities.process_status(
|
||||
utilities.elevated(["defaults", "write", "/Library/Preferences/.GlobalPreferences.plist", "NonMetal_BacklightHack", "-bool", "true"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
|
||||
def add_legacy_dropbox_patch(self):
|
||||
print("- Merging DropboxHack SkyLightPlugins")
|
||||
@@ -395,7 +409,6 @@ set million colour before rebooting"""
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(sys_patch_data.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||
elif self.constants.detected_os in [os_data.os_data.big_sur, os_data.os_data.monterey] and self.constants.allow_ts2_accel is True:
|
||||
# TODO: Enable for Monterey when acceleration patches proress
|
||||
print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur")
|
||||
self.delete_old_binaries(sys_patch_data.DeleteAMDAccel11)
|
||||
self.delete_old_binaries(sys_patch_data.DeleteAMDAccel11TS2)
|
||||
@@ -505,6 +518,9 @@ set million colour before rebooting"""
|
||||
if self.constants.detected_os == os_data.os_data.monterey:
|
||||
self.add_legacy_dropbox_patch()
|
||||
|
||||
if self.legacy_keyboard_backlight is True:
|
||||
self.add_legacy_keyboard_backlight_patch()
|
||||
|
||||
print("- Merging general legacy Frameworks")
|
||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
@@ -542,6 +558,10 @@ set million colour before rebooting"""
|
||||
|
||||
def patch_root_vol(self):
|
||||
print(f"- Running patches for {self.model}")
|
||||
|
||||
# Before starting, clean out old plugins
|
||||
self.clean_skylight_plugins()
|
||||
|
||||
# Graphics patches
|
||||
if self.nvidia_legacy is True:
|
||||
print("- Installing legacy Nvidia Patches")
|
||||
@@ -629,10 +649,6 @@ set million colour before rebooting"""
|
||||
if self.legacy_gmux is True:
|
||||
print("- Installing Legacy Mux Brightness support")
|
||||
self.add_legacy_mux_patch()
|
||||
|
||||
if self.legacy_keyboard_backlight is True:
|
||||
print("- Installing Legacy Keyboard Backlight support")
|
||||
self.add_legacy_keyboard_backlight_patch()
|
||||
|
||||
if self.validate is False:
|
||||
self.rebuild_snapshot()
|
||||
@@ -682,123 +698,8 @@ set million colour before rebooting"""
|
||||
input("\nPress enter to continue")
|
||||
return None
|
||||
|
||||
def detect_gpus(self):
|
||||
gpus = self.constants.computer.gpus
|
||||
if self.constants.moj_cat_accel is True:
|
||||
non_metal_os = os_data.os_data.high_sierra
|
||||
else:
|
||||
non_metal_os = os_data.os_data.catalina
|
||||
for i, gpu in enumerate(gpus):
|
||||
if gpu.class_code and gpu.class_code != 0xFFFFFFFF:
|
||||
print(f"- Found GPU ({i}): {utilities.friendly_hex(gpu.vendor_id)}:{utilities.friendly_hex(gpu.device_id)}")
|
||||
if gpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi]:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
# self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
# Kepler drivers were dropped with Beta 7
|
||||
# 12.0 Beta 5: 21.0.0 - 21A5304g
|
||||
# 12.0 Beta 6: 21.1.0 - 21A5506j
|
||||
# 12.0 Beta 7: 21.1.0 - 21A5522h
|
||||
if self.constants.detected_os == os_data.os_data.monterey and self.constants.detected_os_minor > 0:
|
||||
if "21A5506j" not in self.constants.detected_os_build:
|
||||
self.kepler_gpu = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts1 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts2 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.check_board_id = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
self.ivy_gpu = True
|
||||
self.supports_metal = True
|
||||
if self.supports_metal is True:
|
||||
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU
|
||||
# Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU
|
||||
self.nvidia_legacy = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
|
||||
def check_dgpu_status(self):
|
||||
dgpu = self.constants.computer.dgpu
|
||||
if dgpu:
|
||||
if dgpu.class_code and dgpu.class_code == 0xFFFFFFFF:
|
||||
# If dGPU is disabled via class-codes, assume demuxed
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
def detect_demux(self):
|
||||
# If GFX0 is missing, assume machine was demuxed
|
||||
# -wegnoegpu would also trigger this, so ensure arg is not present
|
||||
if not "-wegnoegpu" in (utilities.get_nvram("boot-args") or ""):
|
||||
igpu = self.constants.computer.igpu
|
||||
dgpu = self.check_dgpu_status()
|
||||
if igpu and not dgpu:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_legacy_keyboard_backlight(self):
|
||||
# With Big Sur and newer, Skylight patch set unfortunately breaks native keyboard backlight
|
||||
# Penryn Macs are able to re-enable the keyboard backlight by simply running '/usr/libexec/TouchBarServer'
|
||||
# For Arrendale and newer, this has no effect.
|
||||
if self.model.startswith("MacBookPro") or self.model.startswith("MacBookAir"):
|
||||
# non-Metal MacBooks never had keyboard backlight
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
return True
|
||||
return False
|
||||
|
||||
def detect_patch_set(self):
|
||||
self.detect_gpus()
|
||||
if self.model in model_array.LegacyBrightness:
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
self.brightness_legacy = True
|
||||
|
||||
if self.model in ["iMac7,1", "iMac8,1"] or (self.model in model_array.LegacyAudio and utilities.check_kext_loaded("AppleALC", self.constants.detected_os) is False):
|
||||
# Special hack for systems with botched GOPs
|
||||
# TL;DR: No Boot Screen breaks Lilu, therefore breaking audio
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
self.legacy_audio = True
|
||||
|
||||
if (
|
||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
|
||||
and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.constants.computer.wifi, device_probe.Atheros) and self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
self.legacy_wifi = True
|
||||
|
||||
# if self.model in ["MacBookPro5,1", "MacBookPro5,2", "MacBookPro5,3", "MacBookPro8,2", "MacBookPro8,3"]:
|
||||
if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
# Sierra uses a legacy GMUX control method needed for dGPU switching on MacBookPro5,x
|
||||
# Same method is also used for demuxed machines
|
||||
# Note that MacBookPro5,x machines are extremely unstable with this patch set, so disabled until investigated further
|
||||
# Ref: https://github.com/dortania/OpenCore-Legacy-Patcher/files/7360909/KP-b10-030.txt
|
||||
if self.constants.detected_os > os_data.os_data.high_sierra:
|
||||
if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
# Ref: https://doslabelectronics.com/Demux.html
|
||||
if self.detect_demux() is True:
|
||||
self.legacy_gmux = True
|
||||
else:
|
||||
self.legacy_gmux = True
|
||||
|
||||
utilities.cls()
|
||||
print("The following patches will be applied:")
|
||||
if self.nvidia_legacy is True:
|
||||
@@ -850,7 +751,6 @@ set million colour before rebooting"""
|
||||
sip_value = (
|
||||
"For Hackintoshes, please set csr-active-config to '030A0000' (0xA03)\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = utilities.patching_status(sip, self.constants.detected_os)
|
||||
if self.sip_enabled is True:
|
||||
print("\nCannot patch! Please disable System Integrity Protection (SIP).")
|
||||
print("Disable SIP in Patcher Settings and Rebuild OpenCore\n")
|
||||
@@ -928,3 +828,5 @@ set million colour before rebooting"""
|
||||
self.find_mount_root_vol(False)
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu")
|
||||
elif self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu")
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
from resources import constants, device_probe, utilities, generate_smbios
|
||||
from data import model_array, os_data, smbios_data, cpu_data, sip_data
|
||||
# Hardware Detection Logic for Root Patching
|
||||
# Returns a dictionary of patches with boolean values
|
||||
# Used when supplying data to sys_patch.py
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from resources import constants, device_probe, utilities
|
||||
from data import model_array, os_data, sip_data
|
||||
|
||||
class detect_root_patch:
|
||||
def __init__(self, model, versions):
|
||||
@@ -50,7 +55,7 @@ class detect_root_patch:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
# self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||
self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
# Kepler drivers were dropped with Beta 7
|
||||
@@ -73,11 +78,13 @@ class detect_root_patch:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||
elif gpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.check_board_id = True
|
||||
self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||
self.ivy_gpu = True
|
||||
@@ -90,6 +97,7 @@ class detect_root_patch:
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.legacy_keyboard_backlight = False
|
||||
|
||||
def check_dgpu_status(self):
|
||||
dgpu = self.constants.computer.dgpu
|
||||
@@ -111,14 +119,10 @@ class detect_root_patch:
|
||||
return False
|
||||
|
||||
def check_legacy_keyboard_backlight(self):
|
||||
# With Big Sur and newer, Skylight patch set unfortunately breaks native keyboard backlight
|
||||
# Penryn Macs are able to re-enable the keyboard backlight by simply running '/usr/libexec/TouchBarServer'
|
||||
# For Arrendale and newer, this has no effect.
|
||||
if self.model.startswith("MacBookPro") or self.model.startswith("MacBookAir"):
|
||||
# non-Metal MacBooks never had keyboard backlight
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
|
||||
if self.constants.detected_os > os_data.os_data.catalina:
|
||||
return True
|
||||
# iMac12,x+ have an 'ACPI0008' device, but it's not a keyboard backlight
|
||||
# Best to assume laptops will have a keyboard backlight
|
||||
if self.model.startswith("MacBook"):
|
||||
return self.constants.computer.ambient_light_sensor
|
||||
return False
|
||||
|
||||
def detect_patch_set(self):
|
||||
@@ -173,10 +177,10 @@ class detect_root_patch:
|
||||
"Validation: Patching Possible": self.verify_patch_allowed(),
|
||||
"Validation: SIP is enabled": self.sip_enabled,
|
||||
"Validation: SBM is enabled": self.sbm_enabled,
|
||||
"Validation: AMFI is enabled": self.amfi_enabled,
|
||||
"Validation: AMFI is enabled": self.amfi_enabled if self.amfi_must_disable else False,
|
||||
"Validation: FileVault is enabled": self.fv_enabled,
|
||||
"Validation: System is dosdude1 patched": self.dosdude_patched,
|
||||
"Validation: Board ID is unsupported": self.bad_board_id,
|
||||
f"Validation: Board ID is unsupported \n({self.computer.reported_board_id})": self.bad_board_id,
|
||||
}
|
||||
|
||||
return self.root_patch_dict
|
||||
|
||||
@@ -84,6 +84,14 @@ def get_disk_path():
|
||||
root_mount_path = root_mount_path[:-2] if root_mount_path.count("s") > 1 else root_mount_path
|
||||
return root_mount_path
|
||||
|
||||
def check_if_root_is_apfs_snapshot():
|
||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
try:
|
||||
is_snapshotted = root_partition_info["APFSSnapshot"]
|
||||
except KeyError:
|
||||
is_snapshotted = False
|
||||
return is_snapshotted
|
||||
|
||||
|
||||
def check_seal():
|
||||
# 'Snapshot Sealed' property is only listed on booted snapshots
|
||||
@@ -312,7 +320,7 @@ def verify_network_connection(url):
|
||||
except (requests.exceptions.Timeout, requests.exceptions.TooManyRedirects, requests.exceptions.ConnectionError, requests.exceptions.HTTPError):
|
||||
return False
|
||||
|
||||
def download_file(link, location, is_gui=None):
|
||||
def download_file(link, location, is_gui=None, verify_checksum=False):
|
||||
if verify_network_connection(link):
|
||||
short_link = os.path.basename(link)
|
||||
if Path(location).exists():
|
||||
@@ -361,13 +369,18 @@ def download_file(link, location, is_gui=None):
|
||||
if total_file_size > 1024:
|
||||
total_downloaded_string = f" ({round(float(dl / total_file_size * 100), 2)}%)"
|
||||
print(f"{round(count / 1024 / 1024, 2)}MB Downloaded{file_size_string}{total_downloaded_string}\nAverage Download Speed: {round(dl//(time.perf_counter() - start) / 100000 / 8, 2)} MB/s")
|
||||
checksum = hashlib.sha256()
|
||||
with location.open("rb") as file:
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
while chunk:
|
||||
checksum.update(chunk)
|
||||
|
||||
if verify_checksum is True:
|
||||
# Verify checksum
|
||||
# Note that this can be quite taxing on slower Macs
|
||||
checksum = hashlib.sha256()
|
||||
with location.open("rb") as file:
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
return checksum
|
||||
while chunk:
|
||||
checksum.update(chunk)
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
return checksum
|
||||
return True
|
||||
else:
|
||||
cls()
|
||||
header = "# Could not establish Network Connection with provided link! #"
|
||||
@@ -393,6 +406,11 @@ def monitor_disk_output(disk):
|
||||
output = output[-2]
|
||||
return output
|
||||
|
||||
def check_boot_mode():
|
||||
# Check whether we're in Safe Mode or not
|
||||
sys_plist = plistlib.loads(subprocess.run(["system_profiler", "SPSoftwareDataType"], stdout=subprocess.PIPE).stdout)
|
||||
return sys_plist[0]["_items"][0]["boot_mode"]
|
||||
|
||||
def elevated(*args, **kwargs) -> subprocess.CompletedProcess:
|
||||
# When runnign through our GUI, we run as root, however we do not get uid 0
|
||||
# Best to assume CLI is running as root
|
||||
|
||||
@@ -8,11 +8,13 @@ def validate(settings):
|
||||
|
||||
valid_dumps = [
|
||||
example_data.MacBookPro.MacBookPro92_Stock,
|
||||
example_data.MacBookPro.MacBookPro111_Stock,
|
||||
# example_data.MacBookPro.MacBookPro171_Stock,
|
||||
# example_data.Macmini.Macmini91_Stock,
|
||||
example_data.iMac.iMac81_Stock,
|
||||
example_data.iMac.iMac112_Stock,
|
||||
example_data.iMac.iMac122_Upgraded,
|
||||
example_data.iMac.iMac122_Upgraded_Nvidia,
|
||||
example_data.iMac.iMac151_Stock,
|
||||
example_data.MacPro.MacPro31_Stock,
|
||||
example_data.MacPro.MacPro31_Upgrade,
|
||||
@@ -23,6 +25,11 @@ def validate(settings):
|
||||
example_data.MacPro.MacPro41_51__Flashed_Modern_AMD,
|
||||
]
|
||||
|
||||
valid_dumps_native = [
|
||||
example_data.iMac.iMac201_Stock,
|
||||
example_data.MacBookPro.MacBookPro141_SSD_Upgrade,
|
||||
]
|
||||
|
||||
settings.validate = True
|
||||
|
||||
def build_prebuilt():
|
||||
|
||||