acidanthera / bugtracker

Acidanthera Bugtracker
374 stars 42 forks source link

What does it mean in CpuTscSync "CPUs without MSR_IA32_TSC_ADJUST (03Bh) are currently unsupported on macOS 12 and newer"? #2163

Closed Drovosek01 closed 1 year ago

Drovosek01 commented 1 year ago

Hello.

I have a computer based on a Chinese x79 motherboard with the following characteristics:

QIYIDA x79 lga2011 | Xeon E5 2670 v2 (Ivy Bridge-EP) | Sapphire RX580 Nitro+ 4Gb | 64GB 1866MHz RAM

When I started to study the hackintosh topic in order to install mac OS Monterey on my hardware, I read on the dortania website that I needed kext CpuTscSync in order for the processor cores to synchronize.

In the kext CpuTscSync repository in the Readme file, I saw

WARNING: CPUs without MSR_IA32_TSC_ADJUST (03Bh) are currently unsupported on macOS 12 and newer.

but I still used the latest version of this kext (version 1.0.9) paired with OpenCore 0.85 and macOS Monterey managed to run.

Yes, initially this macOS started only 2 or 3 or 4 times, and before that it spontaneously rebooted when macOS started (although I added all bootargs and bootloader settings in the config so that the computer would not restart when panicking, so that I could read the text on the screen when panicking), but I managed to fix it when I removed the extra logical processors from DSDT (I left only 20 because my processor has 20 threads) and after that macOS started starting the first time.

Then, using MacCPUID and AIDA64, I found out that my processor does not support register TSC_ADJUST: Снимок экрана 2022-11-22 000657 image

After that, I experimented and instead of the CpuTscSync kext, I alternately used 3 variants of the VoodooTSCSync kext (in the variation from the Clover repository, I changed the value to 19 in the plist) and with each of these variants, the system also started without problems.

  1. https://github.com/CloverHackyColor/VoodooTSCSync
  2. https://bitbucket.org/RehabMan/voodootscsync/downloads/RehabMan-VoodooTSCSync-2018-1020.zip
  3. https://www.insanelymac.com/forum/files/file/744-voodootscsync-configurator/

Question:

  1. What does the presence or absence of register MSR_IA32_TSC_ADJUST affect when using macOS Monterey?
  2. Why is it written in the Readme of repository CpuTscSync that processors without register MSR_IA32_TSC_ADJUST are not supported in macOS Monterey? But in fact, everything runs fine with this kext and a processor without the specified register in macOS Monterey, this is misleading
  3. In the release history of kext CpuTscSync, it is indicated in version 1.0.4 (https://github.com/acidanthera/CpuTscSync/releases/tag/1.0.4) that support for the MSR_IA32_TSC_ADJUST register has been added to macOS Monterey, does this only apply to processors that have this register?

Here is my current working ESP with fixed DSDT (I haven't finished setting up my hackintosh yet, so there's a lot of garbage here) ESP Dump.zip

And here is the original DSDT that I extracted in Windows using SSDT Time DSDT.aml original.zip

Drovosek01 commented 1 year ago

I apologize for misleading everyone (not intentionally).

CpuTscSync of the latest version (currently v1.0.9) really doesn't work when starting my macOS Monterey and stops at the kernel panic from this kext (attached photo).

All this time, it turns out, I used a fork of the CpuTscSync kext, completed by a Chinese developer. Fork from this repository - https://github.com/wy414012/huaNan_x79_e5_2670_v1_c2/tree/master/OpenCore/EFI/OC/Kexts/CpuTSCSync.kext

That is, I used CpuTscSync v1.5.3 and Monterey loads normally with it (this kext doesn't work in Mojave, but CpuTscSync v1.0.9 from acidanthera works)

kernel-panic-cputscsync-monterey

Here seems to be the official repository of this fork CpuTscSync https://gitee.com/chenguangheiguo/cputscsync-chenguang-network-studio-master or is it https://gitee.com/yaming-network/CpuTscSync or https://github.com/wy414012/CpuTscSync

(but in the yaming repository, the latest release is version 1.5.1, and in the repository with full EFI there is release 1.5.3, but the hash of the binary files from the macOS folder inside the kexes from this release 1.5.3 and release 1.5.1 from gitee are the same, so why is there a repository with an EFI build in Info.plist of this kext version 1.5.3)

P.S.

In any case, after configuring DSDT, both systems are loaded without problems with VoodooTscSync from slice (possibly with other versions of VoodooTscSync will also be loaded)

P.P.S. It would be cool if acidanthera's CpuTscSync project returned the kext to macOS Monterey for processors that do not support the TSC_ADJUST register

vit9696 commented 1 year ago

The other issue is about OpenCore, which is actually invalid. But this one may make some sense.

@lvs1974 could you check this fork and see whether it has something we lack?

lvs1974 commented 1 year ago

@vit9696: I had a look at

  1. https://gitee.com/chenguangheiguo/cputscsync-chenguang-network-studio-master - it is not a Lilu plugin and it is not a fork. This is clean VoodooTscSync, with different class name - CpuTSCSync. Uses only MSR_IA32_TSC.

  2. https://gitee.com/yaming-network/CpuTscSync - the same as the first repository

  3. https://github.com/wy414012/CpuTscSync - the base for repositories 1 & 2, almost the same code.

So, these 3 projects have nothing common with acidanthera CpuTscSync, they just copy VoodooTscSync functionality.

And regarding the panic: it was attempt to write into MSR_IA32_TSC_ADJUST register.

vit9696 commented 1 year ago

Right, I guess, it is best to let their author to handle what is needed for his particular task and leave our project alone.

cosmiccowboy68 commented 7 months ago

Experienced hackintosher stumped for months trying, But Finally, I have found a way to install Monterey, Ventura and Soboma onto a DELL Precision T3610. Which I thought was impossible due to its bios and lack of certain functions such as TSC_sync. I found this page for a x79 MB.

https://github.com/acidanthera/bugtracker/issues/2163

and used the EFI found here as a base

https://github.com/acidanthera/bugtracker/files/10074725/ESP.Dump.zip

If there is any interest I can give out more details.

Many thanks to Drovosek01 for his EFI