dortania / OpenCore-Legacy-Patcher

Experience macOS just like before
https://dortania.github.io/OpenCore-Legacy-Patcher/
Other
12.98k stars 1.24k forks source link

Allow user-configurable CPUFriend usage #199

Closed Inspector42 closed 3 years ago

Inspector42 commented 3 years ago

Describe the bug OCLP 0.1.2 created configuration on target system with no adjustments of settings or model leads to limitation of core frequency of HD7950 Graphic Card patched/flashed with EBC Mac-Firmware. Disabling CPUFriend and associated data provider re-enables full speed. Booting with BIOS switch on GPU set to position 2 (original PC BIOS) increases core frequency to default 850Mhz of Mac Edition HD7950 while showing card as HD7xxx in "About this Mac" and no boot screen when CPUFriend remains enabled.

To Reproduce

Image 07 05 21 at 16 34

Image 07 05 21 at 12 59

It should be noted that LuxMark score on El Capitan (natively booted) only reaches meager 1970, but the driver does not read GPU frequency. I have also tried to have CPUFriend loaded right after Lilu, however that did not change the limit in frequency. Screenshots See attached LuxMark

Build Folder Release Version 0.12

Hardware (please complete the following information):

For in-depth hardware logs, we highly encourage users to run [IORegistryExplorer]

Archive.zip

Additional context Update: Replaced uploaded ioreg file as it was corrupted. Also delete comment about X86PlatformPlugin as MacPro uses _IOPlatformPluginFamily (ACPI_SMC_PlatfromPlugin) and added information about frequency stages observable.

khronokernel commented 3 years ago

This time score is above 9900 and GPU frequency goes to 930Mhz in iStatsMenu or ioreg. It seems thought as if there are 4 stages used (300, 501, 880 and 930) depending on load, which corresponds to the 4 power stages defined in ACPI_SMC_Platfrom_Plugin/Content/Resources/MacPro3,1.plist under IOPlatformThermalProfile-CtrlLoopArray-Item 1-MetaStateArray. even though is should not be using that because of SMBIOS Model-ID set to MacPro7,1. > However as there is no plist-file for MacPro7,1 in ACPI_SMC_PlatformPlugin and X86PlatformPluginFamiliy is not used there might be a magic default setting that kicks in and makes it work.

Thank you for this in-depth issue, has plenty documented and tested. The reason that these 4 stages appear is that CPUFriendProvider is simply adding ACPI_SMC_PlatformPlugin's MacPro3,1 data re-encoded to be injectable:

So overall, this actually does very much seem to be expected behaviour. However as this does limit performance, I can add an option in patcher settings to allow users to override whether or not CPUFriend is injected

Inspector42 commented 3 years ago

Thanks for the quick response. I meanwhile managed to also take a closer look at Intel SpeedStep. Although I have not figured out how to monitor CPU frequency on MacPro3,1, HWMonitor shows CPU Voltages and Currents. I have run Prime95 to fully load the CPU and compared that with values when just showing the desktop (idle). Voltages and currents are practically identical with CPUFriend or without CPUFriend both in idle as well as in full load condition. Also CPU temperatures are very close.

The only thing that makes me wonder is why the Xeon E5462 is listed with a VID from 0.850V-1.3500V and my machine is always in the mid rage with a difference of 0.05V between idle and full load independent of CPUFriend. Hence I will keep CPUFriend disabled for now but having that as an option in the configuration menu of OCLP would make things easier.

I have not cross checked if this phenomenon also happens in macOS 11 as I am waiting for my second SSD to arrive so that I can keep the working boot drive with macOS 10.15.7 untouched.