AMD Rayon R7 5800H Install Monterey kernel Panic

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Hello everyone, the Monterey kernel panic problem has been solved for AMD R7 5800H notebook installation. It is a great thing that the CPU can now run on 8 cores. Thank you guys very much.Thank them for discovering the problem and providing kernel patches @ExtremeX@Visual

Brand: Lenovo
Model: Legion 5 6th Gen
CPU: AMD Ryzen 7 5800h
GPU: AMD Radeon RX 6600m 8GB ( Separate GPU mode)
HDD: Samsung SSD 970 EVO Plus 1TB (1000 GB, PCI-E 3.0 x4)
WDS500G3X0C-00SJG0 (500 GB, PCI-E 3.0 x4)
Network: RealTek Semiconductor RTL8168/8111 PCI-E Gigabit Ethernet NIC
Intel(R) Wi-Fi 6E AX210 160MHz
Ram: x2 8GB 3200mhz ddr4
Display: 15.6 1080p 165HZ

Updated October 5, 2023
Problems solved:
1. You do not need to disable XHCI
2. The microphone problem is rectified
3. Monitor brightness can be adjusted, only in Ventura

Unresolved issues:
Failure to wake from sleep

 

Attachments

  • EFI-2023-10-5.zip
    40 MB · Views: 156
Last edited:
Solution
Panic from Monterey 12.6
View attachment 7258
Thanks. I looked at the sched_prim.c file in the XNU Kernel source code (nice of Apple to let us know exactly where to search) and found that it's related to the TSC (Time Stamp Counter) Syncronization of the CPU cores. The section of the code which gives the panic is: https://github.com/apple-oss-distributions/xnu/blob/xnu-8020.140.41/osfmk/kern/sched_prim.c#L2836
Unfortunately Apple didn't update the XNU Source Code for macOS 12.6 yet, but I still managed to find the place where it calls the panic.
Image 1 is the code of XNU that panics if the time between cores does not match (not syncronized properly).

As seen when comparing the Big Sur and Monterey code (Image 2), Big Sur...

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
It looks like we have to stop there, tSC_ADJUST is not supported, DSDT has no redundant CPU description,maybe OpenCore will make an analog BIOS module and make the hardware support this function.

I will publish my Monterey installation method and EFI, although there are still many problems. Hopefully, more people will join into improve it, If it succeeds, it could be the most powerful Hackintosh laptop since Apple switched to ARM architecture.
 

Attachments

  • 截屏2022-05-10 12.png
    截屏2022-05-10 12.png
    139.3 KB · Views: 29

motorbott

New member
AMD OS X Member
Joined
Apr 13, 2022
Messages
13
It looks like we have to stop there, tSC_ADJUST is not supported, DSDT has no redundant CPU description,maybe OpenCore will make an analog BIOS module and make the hardware support this function.

I will publish my Monterey installation method and EFI, although there are still many problems. Hopefully, more people will join into improve it, If it succeeds, it could be the most powerful Hackintosh laptop since Apple switched to ARM architecture.
Have you tried old version of cputscsync.kext? In that post a guy in the 16th floor mentioned his pc can boot correctly without support for tsc_adjust. Maybe you can contact him for more details.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,145
When you boot with cpus=1 can you share the terminal output of sysctl -a hw machdep.cpu.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Have you tried old version of cputscsync.kext? In that post a guy in the 16th floor mentioned his pc can boot correctly without support for tsc_adjust. Maybe you can contact him for more details.
Cputscsync.kext seems to support Intel only. It didn't work
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Well, bad news.😮‍💨
Is not completely useless. We just need more eyes into this laptops. Again, In peoples minds, Ryzen laptops is no go. Is a matter to get them to consider getting involved to get it properly patched.

I have my Predator Helios 500 with the Ryzen 2700 and Vega 56, but that is desktop masquerade as a laptop. Also the CPU is considerably slower than the 5800h. If the Legion can be successfully hacked then the Zephyrs G14 with the RX 6800s (Navi 23) is possible likely
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,145
@zxc2689963 Can you boot the system and open MacIASL and go to File -> New from ACPI and select CPUSSDT and send a screenshot please.

Screenshot 2022-05-10 at 21.06.50.png
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,145
Please try with this. It's just a theory
 

Attachments

  • EFI.zip
    4 MB · Views: 33

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,145
Disable the EC SSDT and try again.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
This is the EFI I booted to Monterey, which can only be used for booting the system, not for installation, and requires configuration modifications to install: Genericusbxhci. kext cancelled, cpus=1 cancelled, voodootscsyncamd-16cores.kext selected. This can be used to install BigSur
 

Attachments

  • EFI-Monterey.zip
    23.3 MB · Views: 39

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,145
Why 16 cores? It’s a 8 core CPU. If that works though try using the 16 core cpu patch rather than 8.
 

alexjaixd

New member
AMD OS X Member
Joined
May 9, 2022
Messages
9
May I join in for discussions and possibly further development? Since we're now kinda stuck on driving all 8 cores under Monterey. But under Big Sur, all 8 cores are recognised. Why not now focus on trying Jo-Toku's suggestion to drive 6600M under Big Sur or Catalina and see if this works?
"So I made two discoveries recently with regards to hardware acceleration. Not sure if some of you know but what I found that's interesting is both AMD and Intel kexts in macOS /S/L/E I found share the same IOMatchCategory values under the kexts which is IOAcceleration. Unique to Intel is the IntelAccelerator IOClass which can be found in the AppleIntelSKLGraphics and AppleIntelICLGraphics kexts. I am quite sure with the info we've found so far it is possible to create a SSDT or even kext driver of sorts. We just need to figure out how to designate the AMD Vega properly as an internal IGPU.

Secondly (on a fairly related note of injecting AMD codes for acceleration), I managed to recently successfully boot up a RX6600 card in a Z590 system under Catalina. As we know the RX6600 isn't supported until Monterey, but I managed to fill in the required gaps in the Apple AMD kexts (AMDRadeonX6000Controller and AMDFramebuffer) by adding a Navi 23 class and the RX6600 device-id. I was totally amazed it booted up. This means it is totally possible to add the Vega 8 for acceleration.


Damn, If the below can work, would be Awesome!

"Alright, that's good going - it might work for my Atari VCS. And thanks for the explanation about the IOAcceleration.

With regards to the RX6600 Catalina solution, well this is what I did:


  1. Made an external USB SSD install of Catalina. Disabled SIP from Recovery mode and Gatekeeper for both Monterey and Catalina (from separate installs).
  2. Made a copy of the following Catalina kext files onto Catalina Desktop, plus from Monterey Beta in separate folder:
    AMDRadeonX6000.kext
    AMDRadeonX6000Framebuffer.kext
    AMDRadeonX6000HWServices.kext
  3. Reading the equivalent Monterey files, edited the Info.plist of Catalina kext files by transferring over missing sections of the AMD Info.plist (cutting and pasting) in the kexts, with particular regards to the Navi23 IOKitPersonality details and then added the FF731002 device-id to the end of it under IOPCIMatch. Saved the edited Info.plists.
  4. Copied the files over into S/L/E, renabled Gatekeeper and SIP and then rebooted with RX6600."

Wait...Could this also work on the Legion 5 maybe? The Desktop RX 6600 is the same card as the 6600m.🤔🧐
 

alexjaixd

New member
AMD OS X Member
Joined
May 9, 2022
Messages
9
It's a good idea if you can drive RX6600m in BigSur. Can you provide KEXT of Monterey RX6600? I can't extract it without Monterey, so I want to try your method. I have saved ioreg in BigSur system. Recently, I am dealing with the problem that BigSur needs to restart several times to successfully enter the system, so I can only start in thin configuration.
These are the 3 Radeon X6000 kexts under Monterey S/L/E
 

Attachments

  • Monterey-Radeon X6000 kexts.zip
    46 MB · Views: 23
Back
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.