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: 158
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...

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
Out of curiosity. Try the older patch set but with the new core count patches added so it'll actually boot. I'm wondering if an older patch that was removed can fix it for this scenario. I've already set the core count in the patches.
 

Attachments

  • patches.plist.zip
    2.5 KB · Views: 5

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
Out of curiosity. Try the older patch set but with the new core count patches added so it'll actually boot. I'm wondering if an older patch that was removed can fix it for this scenario. I've already set the core count in the patches.
I'll try now, thanks
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
Should also note that the other cores are showing but listed as uninitialized because of cpus=1.
 

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
Should also note that the other cores are showing but listed as uninitialized because of cpus=1.
I can try to install Big Sur, since the installer also works with your patches without the cpus=1 signature, but the installer and the monterey system do not want to start, there is a new problem with these patches, see the photo.
 

Attachments

  • IMG_20220621_230021.jpg
    IMG_20220621_230021.jpg
    3.3 MB · Views: 26

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
I can try to install Big Sur, since the installer also works with your patches without the cpus=1 signature, but the installer and the monterey system do not want to start, there is a new problem with these patches, see the photo.
But I also removed the cpus=1 argument
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
I can try to install Big Sur, since the installer also works with your patches without the cpus=1 signature, but the installer and the monterey system do not want to start, there is a new problem with these patches, see the photo.

Interesting... So those patches allow the installer to boot without cpus=1 but not the installed system. I'll look over them and verify later on.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
Please try these adjusted patches with cpus=1 removed.
 

Attachments

  • patches.plist.zip
    2.7 KB · Views: 6

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I can try to install Big Sur, since the installer also works with your patches without the cpus=1 signature, but the installer and the monterey system do not want to start, there is a new problem with these patches, see the photo.
Can I ask what's the SMBIOS that you use with the Monterey installer? Is it iMacPro1,1?
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
I tried it and started Monterey stuck. BigSur installation is ok

What about big sur once installed? Can you boot to the desktop without cpus=1?
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
Ok I think I know which patches are sorting it. Try again with this set. In theory Monterey should also work.
 

Attachments

  • patches.plist
    15.3 KB · Views: 5

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
Ok I think I know which patches are sorting it. Try again with this set. In theory Monterey should also work.
it works with big sur, but it also doesn’t want to work with monterey, photo when loading the monterey installer
 

Attachments

  • IMG_20220622_160542.jpg
    IMG_20220622_160542.jpg
    1.9 MB · Views: 18

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,168
That’s great. So the issue with Monterey there is GPU related. Try adding the boot arg -radvesa for the Monterey installer.
 
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.