mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
device_probe.py: Work-around NVMe PM issues
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.3.4
|
## 0.3.4
|
||||||
- Resolves Install USB Creation using incorrect installer
|
- Resolves Install USB Creation using incorrect installer
|
||||||
|
- Resolves `installer` failing to extract InstallAssistant in older OSes
|
||||||
|
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
||||||
|
|
||||||
## 0.3.3
|
## 0.3.3
|
||||||
- Disable Asset Caching support with spoofless approach
|
- Disable Asset Caching support with spoofless approach
|
||||||
|
|||||||
+8
-2
@@ -234,8 +234,14 @@ class BuildOpenCore:
|
|||||||
print("- Falling back to -nvmefaspm")
|
print("- Falling back to -nvmefaspm")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm"
|
||||||
|
|
||||||
if self.get_kext_by_bundle_path("NVMeFix.kext")["Enabled"] is False:
|
if (controller.vendor_id != 0x144D and controller.device_id != 0xA804 and self.model not in ["MacBookPro13,3", "MacBookPro14,3"]):
|
||||||
self.enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path)
|
# 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)
|
||||||
|
|
||||||
if not nvme_devices:
|
if not nvme_devices:
|
||||||
print("- No 3rd Party NVMe drives found")
|
print("- No 3rd Party NVMe drives found")
|
||||||
|
|||||||
@@ -453,19 +453,8 @@ class Computer:
|
|||||||
controller = NVMeController.from_ioregistry(parent)
|
controller = NVMeController.from_ioregistry(parent)
|
||||||
controller.aspm = aspm
|
controller.aspm = aspm
|
||||||
|
|
||||||
if (
|
if controller.vendor_id != 0x106B:
|
||||||
# Handle Apple Vendor ID
|
# Handle Apple Vendor ID
|
||||||
controller.vendor_id != 0x106B
|
|
||||||
and (
|
|
||||||
# Handle soldered Samsung SSDs
|
|
||||||
controller.vendor_id != 0x144D and controller.device_id != 0xA804
|
|
||||||
)
|
|
||||||
):
|
|
||||||
# Avoid patching 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 usage with AppleNVMeController class
|
|
||||||
# https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225
|
|
||||||
self.storage.append(controller)
|
self.storage.append(controller)
|
||||||
|
|
||||||
ioreg.IOObjectRelease(parent)
|
ioreg.IOObjectRelease(parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user