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...
Bravo! There is no kernel panic now! Thank you guys very much, you've done a great job! @ExtremeXT @Visual 🥳🥳🥳

Now I need to figure out why on my PC it just stuck at somewhere after PCI Configuration, maybe USB/SSD related......
Excellent! I think the problem is the USB controller, because the original EFI by the OP used an outdated kext for generic USB 3.0 (XHCI) support. As a temporary solution, can you try adding that kext? If it boots, I'll make an injector kext that adds native support to Apple's kexts (like XHCI-Unsupported) for Intel. Get the GenericUSBXHCI kext from the OP's EFI.
 
Excellent! I think the problem is the USB controller, because the original EFI by the OP used an outdated kext for generic USB 3.0 (XHCI) support. As a temporary solution, can you try adding that kext? If it boots, I'll make an injector kext that adds native support to Apple's kexts (like XHCI-Unsupported) for Intel. Get the GenericUSBXHCI kext from the OP's EFI.
I disabled USBToolBox and UTBMap, and enable GenericUSBXHCI, and it shows a forbidden sign at last, with this kernel panic. Maybe because I'm using a USB 3.0 installer?
IMG_0214.jpg

Here's all usable USB port info I got from Windows, but I only got BIOS device path for Camera...... I don't know how to make kexts like USBPorts.kext on AMD platform......

Have to go to sleep now, still got work to do tomorrow......
 

Attachments

I disabled USBToolBox and UTBMap, and enable GenericUSBXHCI, and it shows a forbidden sign at last, with this kernel panic. Maybe because I'm using a USB 3.0 installer?
View attachment 7285

Here's all usable USB port info I got from Windows, but I only got BIOS device path for Camera...... I don't know how to make kexts like USBPorts.kext on AMD platform......

Have to go to sleep now, still got work to do tomorrow......
Keep USBToolBox and UTBMap enabled. This is an NVMe problem, what NVMe drive do you have?
Good night.

- ExtremeXT
 
  • Like
Reactions: OG Nerd
A breakthrough! The patch worked and successfully resolved the kernel panic, thank you guys very much
Hello, glad it worked for you. Can you send a screenshot of About this Mac and an IOReg dump? Also, can you send me the hardware IDs of the USB controllers from Windows? I need it for making an injector kext instead of GenericUSBXHCI. It's outdated and shouldn't be used.

- ExtremeXT
 
  • Like
Reactions: styde and Middleman
I don't know how to make kexts like USBPorts.kext on AMD platform......
USBToolBox + UTBMap is a much better approach for USB mapping and works on every platform.
 
  • Like
Reactions: OG Nerd
Keep USBToolBox and UTBMap enabled. This is an NVMe problem, what NVMe drive do you have?
Good night.

- ExtremeXT
Sorry for bothering you again...... I got a Hynix PC711 and a Phison E12S.

I enabled USBToolBox and UTBMap, and disabled GenericUSBXHCI, tried to remove all my NVME drives (no sata drives) and my wireless network card, when trying to boot Monterey 12.6, it still stuck here......
IMG_0215.jpg

Like @Middleman said, I have checked the order of kexts, but seems nothing wrong...... Even tried to use UTBDefault.kext, add npci=0x2000/3000, etc. , but nothing helps. Maybe the same reason that I can't install Big Sur as well, always stuck at similar places.......

Hope you got any ideas?
 

Attachments

Sorry for bothering you again...... I got a Hynix PC711 and a Phison E12S.

I enabled USBToolBox and UTBMap, and disabled GenericUSBXHCI, tried to remove all my NVME drives (no sata drives) and my wireless network card, when trying to boot Monterey 12.6, it still stuck here......
View attachment 7294

Like @Middleman said, I have checked the order of kexts, but seems nothing wrong...... Even tried to use UTBDefault.kext, add npci=0x2000/3000, etc. , but nothing helps. Maybe the same reason that I can't install Big Sur as well, always stuck at similar places.......

Hope you got any ideas?
Leave GenericUSBXHCI enabled for now, along with USBToolBox and UTBMap. I will make an injector kext to avoid GenericUSBXHCI when you send me the hardware IDs.

AFAIK the Hynix PC117 uses some proprietary controller and doesn't work on macOS... not sure about the Phison.

EDIT: Apparently Hynix released a firmware update which fixes it, maybe make sure it's on the latest one.

Phison should also work according to some real Mac users

Try this EFI, it has the kernel patch pre-applied and GenericUSBXCHI.

- ExtremeXT
 

Attachments

@zty199 Would it be possible for you to take a video/screenshots of each section of your laptop's BIOS?
 
I successfully installed it, but it is very difficult to start the installation. It is very likely to be stuck in AppleNVME Assert failed, and I need to restart repeatedly and it will always succeed once. I restart more than 20 times before successful installation,

I have tried to leave only one SN750 hard drive with the same error, GenericUSBXHCI.kext cannot be used to start the installer
 

Attachments

  • 1.png
    1.png
    436.4 KB · Views: 28
  • 2.png
    2.png
    523.7 KB · Views: 29
  • 3.png
    3.png
    86.6 KB · Views: 27
  • MacBook Pro (AMD).zip
    MacBook Pro (AMD).zip
    5.6 MB · Views: 32
  • Like
Reactions: Jo-Toku
I successfully installed it, but it is very difficult to start the installation. It is very likely to be stuck in AppleNVME Assert failed, and I need to restart repeatedly and it will always succeed once. I restart more than 20 times before successful installation,

I have tried to leave only one SN750 hard drive with the same error, GenericUSBXHCI.kext cannot be used to start the installer
Have you made a DEBUG version of OC? It should help diagnose where the stuck booting issue is.
 
I successfully installed it, but it is very difficult to start the installation. It is very likely to be stuck in AppleNVME Assert failed, and I need to restart repeatedly and it will always succeed once. I restart more than 20 times before successful installation,

I have tried to leave only one SN750 hard drive with the same error, GenericUSBXHCI.kext cannot be used to start the installer
So, if you reboot you need to try it 20 or so times for the laptop boot successfully? Also, only with one drive installed?
 
I successfully installed it, but it is very difficult to start the installation. It is very likely to be stuck in AppleNVME Assert failed, and I need to restart repeatedly and it will always succeed once. I restart more than 20 times before successful installation,

I have tried to leave only one SN750 hard drive with the same error, GenericUSBXHCI.kext cannot be used to start the installer
GenericUSBXHCI is likely the cause of the problem as it's a very old kext. I'll try to make an injector kext for the USB controllers so we don't have to rely on it.

- ExtremeXT
 
Try this EFI, USB should work normally with it.

- ExtremeXT
 

Attachments

Try this EFI, USB should work normally with it.

- ExtremeXT
Thanks again for your help,Use USBToolBox will be stuck in USBToolBox: XHC0: waitForMatchingService failed or timed out

Use USBPorts.kext to customize the correct port will be stuck in AppleNVME Assert failed

Using GenericUSBXHCI.kext can enter the system normally even if it is restarted, but cannot be used to start the installation program. It will cause USB failure and can only be installed in a non-USB way, which is why many people cannot install it
 

Attachments

  • QQ图片20220922091940.jpg
    QQ图片20220922091940.jpg
    3.8 MB · Views: 21
  • QQ图片20220922091951.jpg
    QQ图片20220922091951.jpg
    4.4 MB · Views: 17
  • QQ图片20220922091957.jpg
    QQ图片20220922091957.jpg
    4.9 MB · Views: 17
  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.