AMD Rayon R7 5800H Install Monterey kernel Panic

zxc2689963

Active member
AMD OS X Member
Feb 27, 2022
135
91
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...
The 'PCI Configuration Begin' error is a common one. There are multiple causes and as many fixes for this KP., See the OC Troubleshooting page linked below.

 
Some won't be relevant to your laptop system, others will be set as expected. Given the issues you have faced I would be careful about making too many changes at once. You would be advised to test the changes after each change.

Remember to use the ResetNvram option before booting the installer after each change to the config.
 
Some won't be relevant to your laptop system, others will be set as expected. Given the issues you have faced I would be careful about making too many changes at once. You would be advised to test the changes after each change.

Remember to use the ResetNvram option before booting the installer after each change to the config.
I have tried the fix of incorporating SSDT-PNLF-CFL.aml but come with following issues.
 

Attachments

  • IMG_0610.jpeg
    IMG_0610.jpeg
    2.5 MB · Views: 25
  • EFI (1).zip
    EFI (1).zip
    8.1 MB · Views: 1
Last edited:
The SSDT-PNLF.aml table in your OC setup is configured for the Backlight in an AMD system.

The Intel Coffee Lake PNLF table isn't right for your system. It contains a number of entries that won't match with the devices in your AMD system.

Screenshot 2024-09-06 at 23.11.44.png comparison of the two SSDT's.
 
The SSDT-PNLF.aml table in your OC setup is configured for the Backlight in an AMD system.

The Intel Coffee Lake PNLF table isn't right for your system. It contains a number of entries that won't match with the devices in your AMD system.

View attachment 14952 comparison of the two SSDT's.
Got it.thank you for your help, this SSDT-PNLF-CFL.aml is from zxc2689963's configured EFI that provided for me. What else could I try? I think this EFI could pass PCI configuration(but got KP after following of USBMS identifiers non-unique with a forbidden icon. )
 

Attachments

Last edited:
That’s a more expected issue with your laptop. USB errors were the main stumbling block for early access users with AMD laptops.
 
The 'PCI Configuration Begin' error is a common one. There are multiple causes and as many fixes for this KP., See the OC Troubleshooting page linked below.

Hi Edhawk,
I have read this troubleshooting carefully. EC patch is included in the EFI, so missing EC patch is not possible. SSDT-HPET.aml is included in EFI, so IRQ conflict issue is not possible. I am using Crucial P3 Plus 1TB PCIe Gen4 3D NAND NVMe M.2 SSD, so it is not possible to be a SATA/NVME issue. And I also have tried disabling NVME but the issue still exist. RTC missing seems not possible on AMD 6800h's motherboard. So the remaining things I need to try is PCI allocation issues, right? Plus, do I need to upgrade my bios to the latest version(only the latest version bios is available on Lenovo site)
 
Last edited:
You also need to look at your USB port config, to see which ports are causing the duplicate port issue. You may need to temporarily disable a few ports in the kext (those you are not using during the boot/install process. So you can to get through to the installer in a consistent manner.
 
You also need to look at your USB port config, to see which ports are causing the duplicate port issue. You may need to temporarily disable a few ports in the kext (those you are not using during the boot/install process. So you can to get through to the installer in a consistent manner.
Thanks, how can I look at my USB port config and use kext to disable some ports?
 
You also need to look at your USB port config, to see which ports are causing the duplicate port issue. You may need to temporarily disable a few ports in the kext (those you are not using during the boot/install process. So you can to get through to the installer in a consistent manner.
I have tried both adding npci=0x2000/0x3000 and setting ResizeAppleGpuBars=0(my bios doesn't have Above4Gcoding option). But none seems working. I will try disabling USB port. I think I won't use two usbc port during my installation. Would you help me disable two usbc port to see whether it would work? Thank you
 
Post a screen image showing the Verbose text declaring the USB non-unique issue, so I can see which ports are causing the KP. Hopefully this will give us information on which ports to disable in your setup.

Although as you don't appear to have a UTBMap or USBports or USBMap kext that might be more difficult than first anticipated.
 
Post a screen image showing the Verbose text declaring the USB non-unique issue, so I can see which ports are causing the KP. Hopefully this will give us information on which ports to disable in your setup.

Although as you don't appear to have a UTBMap or USBports or USBMap kext that might be more difficult than first anticipated.
 

Attachments

  • IMG_0410.jpeg
    IMG_0410.jpeg
    4.1 MB · Views: 9
Post a screen image showing the Verbose text declaring the USB non-unique issue, so I can see which ports are causing the KP. Hopefully this will give us information on which ports to disable in your setup.

Although as you don't appear to have a UTBMap or USBports or USBMap kext that might be more difficult than first anticipated.
Do you have any clues on which ports should be disabled?
 
PRT5, the port used by the macOS installer..

This is confirmed if you look at the screenshot below and the two sections highlighted in the RED rectangles, as the non-unique identifier matches with the Cruzer identification.

Screenshot 2024-09-13 at 20.02.54.png

Best option is to use a different port, or a USB2 pen drive, so you don't hit the USB3 port that is being duplicated incorrectly.
 
PRT5, the port used by the macOS installer..

This is confirmed if you look at the screenshot below and the two sections highlighted in the RED rectangles, as the non-unique identifier matches with the Cruzer identification.

View attachment 15027

Best option is to use a different port, or a USB2 pen drive, so you don't hit the USB3 port that is being duplicated incorrectly.
Just tried all 4 usb ports including usbc ports and usb2 drive. But the issue is still the same. Would you help me disable the non-unique usb port? Thank you
 
Just tried all 4 usb ports including usbc ports and usb2 drive. But the issue is still the same. Would you help me disable the non-unique usb port? Thank you
From my limited understanding, i think we will have to disable one XHCI controller using UMAF Tool as demonstrated here https://github.com/JamisonMurphy/Legion-5-Pro-Hackintosh
(But its risky, i dont know what all components it might disable. I tried disabling individual ports using UMAF and by mistake i disabled keyboard as keyboard is also connected through usb. Then i used external usb keyboard but it didnt detect at boot so i couldnt get into bios or boot selection menu. Then i booted into windows from there booted into advanced restart options and from there booted into boot menu options and was finally able to enable keyboard again.)
 
From my limited understanding, i think we will have to disable one XHCI controller using UMAF Tool as demonstrated here https://github.com/JamisonMurphy/Legion-5-Pro-Hackintosh
(But its risky, i dont know what all components it might disable. I tried disabling individual ports using UMAF and by mistake i disabled keyboard as keyboard is also connected through usb. Then i used external usb keyboard but it didnt detect at boot so i couldnt get into bios or boot selection menu. Then i booted into windows from there booted into advanced restart options and from there booted into boot menu options and was finally able to enable keyboard again.)
@Edhawk I think using acpi ssdt to disable the usb controller would be a better choice. But I may need some help on having ssdt to disable my usb port.
 
That is a possibility, but it is no more likely to work that disabling each port (individually/one at a time) in a custom UTBMap.kext or USBMap.kext. Rebooting the system to see/check which port has been disabled when the system boots to OpenCore and through to the macOS installer.

Patience would be required as this trial and error check is undertaken. Notes taken to record which port or feature was disabled as each port in the kext was checked.

But to be honest, each port should be identifiable and set with a custom 'Nickname' (shows as 'hashTag comment' in the kext's info.plist ) from when each of the ports were discovered and confirmed in Windows, using USBToolBox Tool. The output would look something like this is Hackintool > USB tab with the populated Comments field.

Screenshot 2024-09-23 at 23.18.43.png Example of USB ports with comments/Nicknames for each port so they can easily be identified.
Example from an AMD Mini PC system containing Ryzen 5 7530U & APU (laptop CPU).
 
  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.