dortania / bugtracker

Dortania Bugtracker
108 stars 7 forks source link

iMac20,x XCPM configuration has severe CPU QoS limitations #190

Open vit9696 opened 3 years ago

vit9696 commented 3 years ago

Guide: OpenCore Install Guide (link).

The advice to use iMac20,x SMBIOS with frequency vectors results in Apple Comet Lake frequency vectors being used. There you would find QoS values that are heavily limited to at least somewhat fit the TDP of Apple iMac cases. While we mostly tested that on Rocket Lake (11700k) with @vandroiy2013, the results with Comet Lake should be the same. The performance loss due to such a configuration on a fully unlocked setup results in up to 50% performance loss under synthetic and real-world tasks.

The solution is to inject proper frequency vectors as I explained on AppleLife. The supplied file should be useable on Comet Lake, Rocket Lake, and Alder Lake setups. Perhaps it will also be useable on older generations, but I'd recommend testing these through trial and error.

The easy way to determine whether you have performance drains is to disable SSDT-PLUG and run some tasks or benchmarks. You will see noticeably worse results if your system is affected.

The relevant values in question look like this. The first screenshot is the iMac20,1 QoS for the kernel and the second screenshot is the fixed version, based on the Haswell QoS we made some time with @Andrey1970AppleLife. As you can see, Comet Lake values are really badly capped half the way.

Снимок экрана 2021-04-10 в 01 22 01 Снимок экрана 2021-04-10 в 01 22 40

File mirror: 487281_CPUFriendDataProvider-RKL.zip

vit9696 commented 3 years ago

I should add that disabling hwp (onoff) caused noticeable temperature decrease during idle times by around 5 degrees (from 40-41° to 36°). While it may be useful for cooling, we expect that it will also decrease overall system responsiveness.

NIBLIZE commented 3 years ago

I haven't seen this on Comet Lake(10900k) with imac20,2. I tested cinebench R23 with stock ssdt-plug and no cpufriend, cpufriend with a generated vector and cpufriend with the vectors from Apple Life. All 3 tests scored similarly and were within run to run variation, technically sock ssdt-plug was the best result and all results are similar to R23 runs in windows.

How does one check the QOS kernel like in the screen screenshot?

vit9696 commented 3 years ago

With https://github.com/acidanthera/CPUFriend/blob/master/Tools/FrequencyVectors.bt. Interesting.

NIBLIZE commented 3 years ago

I understand binary templates are used with 010 editor. I'm not really sure which file to run the template on. I tried /s/l/e/IOPlatformPluginFamily.kext/Contents/Plugins/X86PlatformPlugin.kext/Contents/MacOS/X86PlatformPlugin but the template doesn't return any values. I don't want to waste your time on this since I'm not seeing the issue but will certainly help collecting any data or running tests if you want.

dreamwhite commented 2 years ago

Is this the reason why a 10700K with a compatible dGPU on Big Sur 11.5.1 fails exporting a video in H264 on Final Cut?😅

I don't know why VideoProc says that H264+HEVC is supported but at the same time FCPX (or any other software such as Premiere/iMovie and so on) fails exporting in H264.

If so, what should be the safest way to get it working between the following ones?

  1. Switch to MacPro7,1/iMacPro1,1 and use CPUFriend + custom frequency data vector to fix power management issues
  2. Remain on iMac20,1 BUT change the custom frequency data, with other settings?
  3. Don't give a f**k about H264 and export in AppleProRes, with a consequent occupied disk space ~ 10 times of a standard H264 video?

Many thanks and have a nice day

5T33Z0 commented 2 years ago

I have a i9 10850K using iMac20,2 and I created my CPUFriendDataProvider.kext with CPUFriendFriend.

The CPU Power management seems to be working fine. I am having a hard time trying to follow the argumentation here. But I will run some tests with kext attached to the first post and see if it makes any difference.

iivum commented 1 year ago

works on my 13700,thx for your work!