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

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
The screen image above shows that one of your SSDT's is causing a kernel panic, i.e. SSDT-USB-Reset.aml.

See screenshot below.

Screenshot 2023-11-05 at 20.03.46.png

Try removing the SSDT from your setup and see if that helps.

You should also delete the USBInjectAll.kext from your /EFI/OC/Kexts folder and config.plist, as you don't need it with an AMD system. It is set to work with Intel USB controllers, not AMD USB controllers. The Kernel > Quirks > XhciPortLimit entry will still work without this kext.

Try this revised EFI-3 attached below, see if this helps. It incorporates the changes recommended above.

Try the revised EFI on a spare USB pen drive.
 

Attachments

  • EFI-3.zip
    20.7 MB · Views: 2

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
The screen image above shows that one of your SSDT's is causing a kernel panic, i.e. SSDT-USB-Reset.aml.

See screenshot below.

View attachment 12318

Try removing the SSDT from your setup and see if that helps.

You should also delete the USBInjectAll.kext from your /EFI/OC/Kexts folder and config.plist, as you don't need it with an AMD system. It is set to work with Intel USB controllers, not AMD USB controllers. The Kernel > Quirks > XhciPortLimit entry will still work without this kext.

Try this revised EFI-3 attached below, see if this helps. It incorporates the changes recommended above.

Try the revised EFI on a spare USB pen drive.
Thank you for your fix. The original problem is resolved but it stuck at another place. Is there any fix for that?
 

Attachments

  • IMG_0409.jpeg
    IMG_0409.jpeg
    4.1 MB · Views: 19

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
You can use USBToolBox to customize the USB port, and there are many tutorials available online
Sorry, still have no idea how could I make it. This is my USB configuration files. Would you kindly make changes for me?Thanks
 

Attachments

  • UTBMap.kext.zip
    1.1 KB · Views: 0
  • DSDT.zip
    50 KB · Views: 0

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
We can’t fix or configure your USBMap.kext, as we can’t test 5he ports to see what is wrong. You are the only person who can do that.

Try using a different USB port when you boot into the installer.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
We can’t fix or configure your USBMap.kext, as we can’t test 5he ports to see what is wrong. You are the only person who can do that.

Try using a different USB port when you boot into the installer.
I have tried your EFI-3.zip in both use ports. But still gets the same error, it successfully handled ACPI Error, but it stuck at SMCTRC: start,the forbidden icon is the KP of another EFI provided by zxc2689963. I still haven't figured out both fixes. Thanks
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
The screen image that ends with the SMCTRC: Start text doesn't contain an error or Kernel Panic information. So I have no idea what that termination/stop point is caused by.

Does the system automatically reboot at that point, or just sit there with no changes?
Have you tried leaving it at that point for 20-30 minutes to see if it progresses slowly?
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
The screen image that ends with the SMCTRC: Start text doesn't contain an error or Kernel Panic information. So I have no idea what that termination/stop point is caused by.

Does the system automatically reboot at that point, or just sit there with no changes?
Have you tried leaving it at that point for 20-30 minutes to see if it progresses slowly?
No, I didn't restart. I would try to wait another more 20-30 minutes to see whether it went through.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
The screen image that ends with the SMCTRC: Start text doesn't contain an error or Kernel Panic information. So I have no idea what that termination/stop point is caused by.

Does the system automatically reboot at that point, or just sit there with no changes?
Have you tried leaving it at that point for 20-30 minutes to see if it progresses slowly?
I had another problem, do I need to add npci=0x3000 from boot-args and set ResizeAppleGPUBars to 0. Some people suggests that change, while others suggests not. I am not very sure. Thank you
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
You need to add the ncpi=0x3000 boot argument if you can't enable Above 4G Decoding in your bios.

If you enable Above 4G Decoding in your bios, GPUBars option becomes available, usually, and should also be enabled. Then and only then do you change ResizeAppleGPUBars to '0'. If you don't have the GPUBars option enabled in your bios, then leave the setting as '-1' in your config.plist.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
You need to add the ncpi=0x3000 boot argument if you can't enable Above 4G Decoding in your bios.

If you enable Above 4G Decoding in your bios, GPUBars option becomes available, usually, and should also be enabled. Then and only then do you change ResizeAppleGPUBars to '0'. If you don't have the GPUBars option enabled in your bios, then leave the setting as '-1' in your config.plist.
I have tried various fix. By setting ncpi=0x2000 and ResizeAppleGPUBars to ‘-1’ I can go to the farest. I am having another stuck at here. Could you find any related KP?Plus zxc’s EFI patch could go further but got a forbidden icon after USBMC identifier non-unique. Is there any related KP on that? Thanks
 

Attachments

  • IMG_0411.jpeg
    IMG_0411.jpeg
    4.6 MB · Views: 14
  • IMG_0412.jpeg
    IMG_0412.jpeg
    4 MB · Views: 9
Last edited:
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.