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

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I suppose to a low level the IGPU is used? or is it the dedicated rx6600m (not fully)? Not sure since it using 7mb of video ram, just the bare minimum.

I think @zxc2689963 did test this out and mentioned that didnt work. I think it was on page 2 or 3 of this thread. I could give it a try on my free time and see it it does work
Has agdpmod=pikera been enabled in the boot-arg?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
The bad news,

MacOS Ventuia still only runs on single-cpu cpus, removing cpus=1 results in a kernel Panic, despite all my efforts
Wow @zxc2689963 I'm surprised you got it working on Ventura, good going!

Now about the CPUs setting, have you tried testing using with lilucpu=10 ?

Lilucpu is a function of Lilu.kext that allows for setting the CPU gen if other settings don't work.
The number is the gen version so 10 means Intel 10th gen (which is the 5800H's equivalent).
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
The bad news,

MacOS Ventuia still only runs on single-cpu cpus, removing cpus=1 results in a kernel Panic, despite all my efforts
@zxc2689963 would you care to post your EFI for us to check?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
And I know agdpmod=pikera needed for Navi23 but the early stage KP is related to CPU not GPU. So I'm testing with less parameters at this point.
@ccr4700

It doesn't matter whether it is KPing at the CPU stage. It is a requirement if that's what you have installed.
It is all related, because the booting sequence checks against the hardware that you have.
If it doesn't detect you have a GPU active to do the next part of the process it's not going to load.
This is why on booting with Intel systems, setting the correct platform-id is of utmost importance,
because it is tied to IGPU activation.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
He posted his EFI. The One to install Big Sur is on post #98. I forgot where is the Monterey, but I uploaded it here on this post

The Monterey should be this one I attached
Thanks but I'm not after his earlier one which I know of, but his Ventura one.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Use this guy's EFI and modify it slightly according to the Monterey-EFI I shared. It is not recommended to install Ventura for the time being. Wireless card and sound card are invalid

 

Attachments

  • EFI-Ventura.zip
    5 MB · Views: 27

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Update: I Upgraded to Monterey.

Performance wise is great(Holy ****), just browsing around feels every bit as fast as a full core. I was expecting to be a dog, but no. is very usable. Im sure when multicore is required it will slow down big time. I do graphics for work, so likely not suitable for rendering, but I am very impressed how this thing work on a single core/ two threads. Is like a very fast dual core cpu
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Use this guy's EFI and modify it slightly according to the Monterey-EFI I shared. It is not recommended to install Ventura for the time being. Wireless card and sound card are invalid

Did you try it?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Use this guy's EFI and modify it slightly according to the Monterey-EFI I shared. It is not recommended to install Ventura for the time being. Wireless card and sound card are invalid

Thanks for this and good to know there’s some progress on Ventura.

On the wireless side I can say that it should still work for Ventura. You need to use itlwm.kext v2.1.0 instead of Airportitlwm as well as the Heliport kext.
That’s what the OpenIntelWireless devs have advised.
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Thanks for this and good to know there’s some progress on Ventura.

On the wireless side I can say that it should still work for Ventura. You need to use itlwm.kext v2.1.0 instead of Airportitlwm as well as the Heliport kext.
That’s what the OpenIntelWireless devs have advised.
Even from the Broadcom m.2 cards?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Thanks for this and good to know there’s some progress on Ventura.

On the wireless side I can say that it should still work for Ventura. You need to use itlwm.kext v2.1.0 instead of Airportitlwm as well as the Heliport kext.
That’s what the OpenIntelWireless devs have advised.
@zxc2689963 & @Jo-Toku

Okay so I've just had a look at the EFI used compared with the build from my own B550 which uses a 5900X. It looks like the reason sound is not working is you don't seem to have a SSDT for the SMC installed (SSDT-SBUS-MCHC.aml) which is required to activate the sound circuitry. Also no SSDT-HPET.aml.

Other than that, your system uses a near-identical SSDT-CPUR file to the one from my desktop-based B550 save for the extra 16 threads added. I'm surprised because when I looked at the DSDT of your build 2 months ago, the individual cores were identified as devices instead of as CPUs (which has been how Intel CPUs have all been typically designated before 11th gen Rocket Lake, which now uses the same naming scheme as this AMD chip).
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I am on Monterey, what the right one?
Just use the AirportBrcmFixup as that's for Broadcom WiFi cards and see if that works first (which it should). For the Bluetooth (if Broadcom) you will need BluetoolFixup.kext, BRCMPatch3RAM & BrcmFirmwareData.kext.
 
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.