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

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
230
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?
The text I posted is from another poster that participates on this thread "Middleman". That was from one of his post on a thread that attempts to hack the IGPU Vega 8 for Mac OS. He did a test where he successfully managed to have the RX 6600 running under Sur, but that is on a desktop. Certainly would be interesting
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,142

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,142
Try this for me then. Remove the CPUR SSDT and EC SSDT and use the last efi I uploaded and as we know it’ll boot with one core try with cpus=2 etc and see if there’s a limit. There seems to be something strange going on with how macOS is seeing the cores even when patched in with the patches.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Try this for me then. Remove the CPUR SSDT and EC SSDT and use the last efi I uploaded and as we know it’ll boot with one core try with cpus=2 etc and see if there’s a limit. There seems to be something strange going on with how macOS is seeing the cores even when patched in with the patches.
If don't use SSDT-CPUR, ll get stuck in the figure below anyway. Using CPUR will lead to Kernel Panic
 

Attachments

  • 220512213048.jpg
    220512213048.jpg
    658.5 KB · Views: 25

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,142
If don't use SSDT-CPUR, ll get stuck in the figure below anyway. Using CPUR will lead to Kernel Panic

I know but with cpus=1 it’ll book right? I just want to see if there’s a limit to that.
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
230
Yes, only cpus=1 can be started, more than 1 cores cannot be started.Sorry, my English is poor
Have you tried Montery 12.1, not 12.3? There was major overhaul on version 12.3 if I recollect correctly. Perhaps give a try to version 12.1.

How usable is the Legion 5 on Monterey with a single core? Usable or super laggy?
 
Last edited:

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Have you tried Montery 12.1, not 12.3? There was major overhaul on version 12.3 if I recollect correctly. Perhaps give a try to version 12.1.

How usable is the Legion 5 on Monterey with a single core? Usable or super laggy?
Even with only 1 core, the speed is still very good, the special effects are full, after all, there is graphics acceleration, enough for light daily use
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
230
Even with only 1 core, the speed is still very good, the special effects are full, after all, there is graphics acceleration, enough for light daily use
Cool, that good then. So as long single core apps are in use it should be good, good to hear.

Anything else not working? Wifi, Bluetooth, sound?

Also, is using one core/2 threads I take?
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,142
I'm not expecting this to do anything different or work. I've enabled DevirtualiseMmio and built a DEBUG EFI folder. Please use it to try boot and upload the log files afterwards.
 

Attachments

  • EFI.zip
    4.2 MB · Views: 20

PStar_7

New member
AMD OS X Member
Joined
May 13, 2022
Messages
3
i have a laptop with same ryzen as you have, could you spill me where i can see how build the efi?

as dortania site tell ryzen laptop can't run hackintosh
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I'm not expecting this to do anything different or work. I've enabled DevirtualiseMmio and built a DEBUG EFI folder. Please use it to try boot and upload the log files afterwards.
This time the results were different
 

Attachments

  • 20220514101145.jpg
    20220514101145.jpg
    1.2 MB · Views: 21
  • opencore-2022-05-14-013202.zip
    13 KB · Views: 4

alexjaixd

New member
AMD OS X Member
Joined
May 9, 2022
Messages
9
i have a laptop with same ryzen as you have, could you spill me where i can see how build the efi?

as dortania site tell ryzen laptop can't run hackintosh
Although you have the same CPU, you lack a compatible GPU as OP (you have a 3060 right?), then this post doesn't apply to you, and you still won't be able to Hackintosh.
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
230
Although you have the same CPU, you lack a compatible GPU as OP (you have a 3060 right?), then this post doesn't apply to you, and you still won't be able to Hackintosh.
I just noticed his sig and says RTX 3060. That GPU is not compatible unfortunately
 
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.