AMD Rayon R7 5800H Install Monterey kernel Panic

zxc2689963

Active member
AMD OS X Member
Feb 27, 2022
135
92
28
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

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...
Ok, they are good drives. I use them in a couple of my Hacks.

I will need to look at what else can cause the KP at that stage of the boot process.
 
Anyone have success with built in microphone? My is not working... but sound in speackers works well
 
@ser63
Microphone not working in which system?
Which Realtek Audio Codec does your motherboard use?
Which Audio Layout ID are you injecting from your config.plist?
Have you tried any other layout ID's to see if switching to an alternative ID helps?
 
@ser63
Microphone not working in which system?
Which Realtek Audio Codec does your motherboard use?
Which Audio Layout ID are you injecting from your config.plist?
Have you tried any other layout ID's to see if switching to an alternative ID helps?
seems to not working, lenovo legion 5-15ach6a 5600h and rx6600m
ALC287
Layout 21
 
In Windows it is displayed as realtek microphone, this kext should works for that case?
If this is the case, then this kext is not suitable for you.
However, in the README.md of this repository, there is also link to a forked AppleALC available for non-ACP microphones. I'm not sure if it works, but you might want to give it a try.
 
First, I would like to thank for your help. I entered the Reset Nvram key before I boot. After restarting, it still gets the following error message. Would you help me take a look again? Thank you
Hi! I have same problem with my Legion 5-15ARH05, but if I switch to Switchable Graphics, macos almost started (stuck on "can't find com.apple.dock.fullscreen process" or something).
I think that I need to disable ResizeBar on the video card, but this is impossible to do or I don’t know how to do it. You can try switching the video card mode in the BIOS and see what happens
 
ould you come up with any solutions to fix the KP issue in EFI?
Try this EFI, I removed an error in the ACPI patches, which made the SSDT-USB-Reset table fail to load.

I think there may be issues with the SSDT-ALSO & SSDT-PLNF tables in the ACPI folder. But lets see what happens with the revised EFI attached before we go looking for more trouble.
 

Attachments

Try this EFI, I removed an error in the ACPI patches, which made the SSDT-USB-Reset table fail to load.

I think there may be issues with the SSDT-ALSO & SSDT-PLNF tables in the ACPI folder. But lets see what happens with the revised EFI attached before we go looking for more trouble.
I just tried your EFI, still have no luck to boot to installation. Here is my error. Thank you again for taking a look.
 

Attachments

  • IMG_0387.jpeg
    IMG_0387.jpeg
    2.3 MB · Views: 12
  • IMG_0386.jpeg
    IMG_0386.jpeg
    2.4 MB · Views: 8
  • IMG_0385.jpeg
    IMG_0385.jpeg
    2.4 MB · Views: 12
The first screen image shows issues related to AppleVTD. If you still have 'dart=0' boot argument in your config.plist this is probably causing the AppleVTD issue. AppleVTD needs to be enabled when running recent versions of macOS, so use of the dart=0 boot argument is not recommended.

The second screen image is a waste of space! It tells us nothing useful.

The third images stops at or close to the 'PCI Configuration begins' error. This looks the most likely cause for the kernel panic. That is usually where the GPU/PCIe devices etc. are enabled by the OS. There are a number of reasons for a kernel panic at this stage of the boot process, with as many methods for fixing the KP.


I have been assuming you have the 'Above 4G Decoding' entry enabled in your bios. If that is not the case then you need to add the 'npci=0x3000' boot argument to your config.plist. It is important that you only use the Bios option or the boot argument, never use both at the same time as this is just as likely to cause a KP.
 
The first screen image shows issues related to AppleVTD. If you still have 'dart=0' boot argument in your config.plist this is probably causing the AppleVTD issue. AppleVTD needs to be enabled when running recent versions of macOS, so use of the dart=0 boot argument is not recommended.

The second screen image is a waste of space! It tells us nothing useful.

The third images stops at or close to the 'PCI Configuration begins' error. This looks the most likely cause for the kernel panic. That is usually where the GPU/PCIe devices etc. are enabled by the OS. There are a number of reasons for a kernel panic at this stage of the boot process, with as many methods for fixing the KP.


I have been assuming you have the 'Above 4G Decoding' entry enabled in your bios. If that is not the case then you need to add the 'npci=0x3000' boot argument to your config.plist. It is important that you only use the Bios option or the boot argument, never use both at the same time as this is just as likely to cause a KP.
I don't see a dart=0 boot arg in my config.plist, here is the boot arg used in my config.plist -v keepsyms=1 debug=0x100 -vi2c-force-polling agdpmod=pikera npci=0x3000
My bios doesn't have a Above 4G Decoding options. So I am not sure whether the Above 4G Decoding is enabled. What else could I try in my EFI?
Thanks again for answering.
 
Three common issues for AMD systems:
  1. Try changing npci=0x3000 to npci=0x2000 see if that makes a difference on your laptop.
  2. Which Drive(s) are you using in your laptop, NVME/SATA SSD/HDD, which make and model are you using?.
  3. I assume you are using a recent, if not the most recent bios for your laptop, which Bios version are you using?
If you need to update your bios because it is a year or more old, make sure you set the bios to system defaults after it updates, then save the changes and restart the system.
Enter the bios again to make the changes for your laptop to work with macOS.
Then try booting your macOS installer.
 
Three common issues for AMD systems:
  1. Try changing npci=0x3000 to npci=0x2000 see if that makes a difference on your laptop.
  2. Which Drive(s) are you using in your laptop, NVME/SATA SSD/HDD, which make and model are you using?.
  3. I assume you are using a recent, if not the most recent bios for your laptop, which Bios version are you using?
If you need to update your bios because it is a year or more old, make sure you set the bios to system defaults after it updates, then save the changes and restart the system.
Enter the bios again to make the changes for your laptop to work with macOS.
Then try booting your macOS installer.
My bios version is KFCN27WW. I think there is not major update in recent time on my bios. I am using

Crucial P3 Plus 1TB PCIe Gen4 3D NAND NVMe M.2 SSD​

 
Three common issues for AMD systems:
  1. Try changing npci=0x3000 to npci=0x2000 see if that makes a difference on your laptop.
  2. Which Drive(s) are you using in your laptop, NVME/SATA SSD/HDD, which make and model are you using?.
  3. I assume you are using a recent, if not the most recent bios for your laptop, which Bios version are you using?
If you need to update your bios because it is a year or more old, make sure you set the bios to system defaults after it updates, then save the changes and restart the system.
Enter the bios again to make the changes for your laptop to work with macOS.
Then try booting your macOS installer.
After changing ncpi=0x2000, there is still no luck to work with the following error. Is there other way to fix it? Thanks
 

Attachments

  • IMG_0389.jpeg
    IMG_0389.jpeg
    2.5 MB · Views: 9
  • IMG_0388.jpeg
    IMG_0388.jpeg
    4.2 MB · Views: 9
That looks as though the macOS boot process has gone a bit further, as the images don't show the same or even a similar issue. Can't see any KP.

How long did you wait at the last screen before shutting down or rebooting the system? You need to give the Bootloader and OS time to do their thing and not rush the installation. As it is common for the installation to look like it has stalled, especially on AMD Hacks. But things are still happening in the background so patience is the byword when you get to this stage.
 
That looks as though the macOS boot process has gone a bit further, as the images don't show the same or even a similar issue. Can't see any KP.

How long did you wait at the last screen before shutting down or rebooting the system? You need to give the Bootloader and OS time to do their thing and not rush the installation. As it is common for the installation to look like it has stalled, especially on AMD Hacks. But things are still happening in the background so patience is the byword when you get to this stage.
Thanks, I will give another try
 
  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.