5T33Z0 / OC-Little-Translated

ACPI Hotpatches and Guides for the OpenCore Bootmanager. Enhance and fine-tune your system by adding devices and enabling additional features not covered in the OpenCore Install Guide.
BSD 3-Clause "New" or "Revised" License
504 stars 71 forks source link

Sonoma on X79 (Sandy-Bridge-E Xeon). Need help for additional patching to AppleIntelCPUPowerManagement.kext (Solved!) #105

Closed BillDH2k closed 5 months ago

BillDH2k commented 6 months ago

I successfully installed Sonoma 14.3 on HP Z420/Z620 by following your excellent instruction (section: Installing macOS Ventura or newer on Ivy Bridge systems). The only issue left is the CPU Power Management for Sandy-Bridge Xeon CPU.

I injected a patched Monterey version AppleIntelCPUPowerManagement.kext (downloaded from here which has "wrmsr" fix applied), based on your instruction, which works great for Ivy-Bridge Xeon, but no CPU power management for Sandy-Bridge Xeon.

To fix the issue, I believe, three additional patches need to be applied, like I did successfully under Monterey (12.6):

Screen Shot 2024-01-30 at 3 51 15 PM

Any idea how to do this? It should be a simply "hex" string replacement, but I have no ideal how to do this for kext.

Thank you in advance!

BillDH2k commented 5 months ago

Update: By googling the answer, I've leant that I can use the 'perl -pi -e' command to do the patching.

For example, for "3E7539" -> "3E9090" data string replacement, I can use: perl -pi -e 's|\x3e\x75\x39|\x3e\x90\x90|g' my-path/AppleIntelCPUPowerManagement where "my-path" is the path to the kext binary.

This can also be done with a hex editor, e.g HexFiend. I tried both methods and both gave identical output.

BTW - the resulting patched kext did not enable CPU power management for Sandy-Bridge-E.

BillDH2k commented 5 months ago

Update: it turned out that there is no need to manually patch this kext. Simply add the three patches to config.list (i.e. hot-patching) will do the job (the kext is loaded first before the patch is applied). This will fully enable the CPU power management for Sandy-Bridge-E CPU for Ventura/Sonama!