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...
Adding ECDT.aml successfully loads AppleACPIEC into boot-ec, but still does not solve the problem.

55
 
  • Like
Reactions: ExtremeXT
Now I can get rid of GenericUSBXHCI.kext and use XHCI-unsupported only. However, though I can boot into 12.6, but now all my USB devices won't work (including USB mouse and keyboard), even PS/2 keyboard not working, that's confusing......

I managed to use remote control to take a look at IOReg, seems that AppleAMDUSBXHCIPCI is loaded and show under XHC0 nd XHC1 correctly. Even USBToolBox shows under USB controller too, but no ports show up......

I also tried again adding device-id and compatible properties (0x73a41002 0x73061002 supported by AppleAMDUSBXHCIPCI) under controller in config.plist and disable XHCI-unsupported, but it won't boot without GenericUSBXHCI. Seems that AppleAMDUSBXHCIPCI didn't recognize the controller?

So is using XHCI-unsupported the correct way to drive USB controller (simply just need to test which one to spoof)? Or need to find out how GenericUSBXHCI
Dear friends, 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

EFI has been uploaded to Github
Hello, since the laptop I have has similar characteristics exposed in this forum, let's see if you can help me to make it work to the fullest.

After many tests, I managed to install the latest version of monterey, tracpad does not work, nor does the graphic acceleration. If I use GenericUSBXHCI.kext it boots fast, but I don't have a camera. If I use another configuration, it boots to the third one and the camera works.

Any idea how to improve it? I will try all the suggestions. (currently I have the laptop in triple boot Windows, Manjaro and mac)

Attached the two OC.
 

Attachments

I visited many web pages and found that the problems all pointed to EC, but there were SSDT-EC fake devices. I tried to install High Sierra 10.13, which does not require the name of EC device, and found it stuck in the same place. Maybe the original EC0 device had compatibility problems, and the laptop could not disable it. AppleACPIEC of GA402 is correctly loaded to boot-ec, while Legion 5 is loaded to EC0 but not to boot-ec. If AppleACPIEC is loaded to EC0, the startup may be stuck with a high probability

I have tried the following
Block KEXT, and patch mode to remove PNP0C09, may have done wrong, no effect, is there any way to prevent the AppleACPIEC load, or let him load to the boot-ec


Curious that it works on Big Sur but not on Monterey
 
Hello, since the laptop I have has similar characteristics exposed in this forum, let's see if you can help me to make it work to the fullest.

After many tests, I managed to install the latest version of monterey, tracpad does not work, nor does the graphic acceleration. If I use GenericUSBXHCI.kext it boots fast, but I don't have a camera. If I use another configuration, it boots to the third one and the camera works.

Any idea how to improve it? I will try all the suggestions. (currently I have the laptop in triple boot Windows, Manjaro and mac)

Attached the two OC.
Are you using the RTX3050 video card? There is no driver for this graphics system, MACOS only supports AMD graphics
 
The system is prone to boot failure, this should not be a kernel patch issue, macos12 and 13 will have this situation


Is this only happening on Ventura?
 
Are you using the RTX3050 video card? There is no driver for this graphics system, MACOS only supports AMD graphics
I understand that the laptop has both graphics. Would it not work when using the CPU that is radeon?,
thanks....

 
The integrated graphics are not supported by macOS.
 
Select the green coloured 'CODE' button, then select 'Download Zip'

This will download a folder containing the elements required to 'Build/make'the WhateverRed kext, using Xcode.
 
  • Like
Reactions: OG Nerd
Tha
Select the green coloured 'CODE' button, then select 'Download Zip'

This will download a folder containing the elements required to 'Build/make'the WhateverRed kext, using Xcode.
Select the green coloured 'CODE' button, then select 'Download Zip'

This will download a folder containing the elements required to 'Build/make'the WhateverRed kext, using Xcode.
thank you very much, i will try
 
Hi guys,
I am using a Lenovo Legion 5 Pro 16ACH6H with the Ryzen 7 5800H, 32GB 3200mhz RAM and two NVMe SSDs (SAMSUNG MZVLB512HBJQ-000L2 and Intel 660p). I am trying to boot the installer for macOS Monterey 12.6.1, and I am using the EFI from here but I cannot get it to boot. At first I tried with Ventura which kernel panicked as to be expected, I don't think it's possible to get Ventura working on Ryzen just yet, least of all our laptop CPUs. But Monterey does not boot either, please see the video that I have recorded of the boot up process here. I can't immediately see anything in the verbose boot that could give me a clue, it all seems to be relatively fine.

In the BIOS, I have disabled secure boot and AMD-V however I have left TPM turned on, I am unsure whether I need to disable this or not. I have also enabled Hybrid Mode so the iGPU is active and I believe the dGPU should be disabled through the config.plist (which in my case is the RTX 3060 if that's relevant).
All help with this will be greatly appreciated, thank you :)
 
I just wanted to add that I may have pinpointed the issue, the verbose boot shows "still waiting for root device" as the prohibited sign shows on screen and upon researching this on the internet it is a USB related error. However, I tried two different USBs (one USB 3.1 and one USB 3.0, both connected to a USB 2.0 hub as I don't have a USB 2.0 drive) and still kept getting the same issue, I also tried generating a new UTBMap kext but again it kept producing the same error and I still have not yet been able to boot into the installer.
 
I just wanted to add that I may have pinpointed the issue, the verbose boot shows "still waiting for root device" as the prohibited sign shows on screen and upon researching this on the internet it is a USB related error. However, I tried two different USBs (one USB 3.1 and one USB 3.0, both connected to a USB 2.0 hub as I don't have a USB 2.0 drive) and still kept getting the same issue, I also tried generating a new UTBMap kext but again it kept producing the same error and I still have not yet been able to boot into the installer.
You must delete GenericUSBXHCI.kext to install, this EFI is set for Legion 5 RX6600m, Legion 5 USB and kernel crash problem, other types of computer may not encounter, and your graphics card does not support, there is no graphics card driver, it is better to use a virtual machine installation
 
You must delete GenericUSBXHCI.kext to install, this EFI is set for Legion 5 RX6600m, Legion 5 USB and kernel crash problem, other types of computer may not encounter, and your graphics card does not support, there is no graphics card driver, it is better to use a virtual machine installation
I was able to install it by making a partition for the installer as well as a partition for macos itself on my other drive however like you said the graphics card is not supported. I misunderstood and thought the igpu of the 5800H was being spoofed as a 6600M, I didn't even know Lenovo made a 6600M variant of the Legion. Now I just have to hope that WhateverRed is able to get a kext working so the igpu can function with acceleration as I believe the Vega 8 igpu shares some similarities in macos with the 6600M.
 
I was able to install it by making a partition for the installer as well as a partition for macos itself on my other drive however like you said the graphics card is not supported. I misunderstood and thought the igpu of the 5800H was being spoofed as a 6600M, I didn't even know Lenovo made a 6600M variant of the Legion. Now I just have to hope that WhateverRed is able to get a kext working so the igpu can function with acceleration as I believe the Vega 8 igpu shares some similarities in macos with the 6600M.
Doubtful
 
  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.