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

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
So far the Sound is working, I got the USB ports mapped, BUT, they still do not show up or populate when a drive (usb 2 or 3) is plugged in. Below is my modifications of the EFI. The strange thing is that you can plug in a usb dongle for mouse and keyboard in any of the usb ports and it will work, but it will not for any usb drives. The sound and usb dongle for mouse only work with GenericUSBXHCI.kext enabled. I also redid my usb port mappings with USBToolbox and added both those kexts, the mapping results and the USBToolbox.kext. I don't really know where to go from here. None of Middlemans suggestions worked. I did notice that it detects the USB ports as Matisse if that helps.
 

Attachments

  • EFI.zip
    23.6 MB · Views: 11

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
So far the Sound is working, I got the USB ports mapped, BUT, they still do not show up or populate when a drive (usb 2 or 3) is plugged in. Below is my modifications of the EFI. The strange thing is that you can plug in a usb dongle for mouse and keyboard in any of the usb ports and it will work, but it will not for any usb drives. The sound and usb dongle for mouse only work with GenericUSBXHCI.kext enabled. I also redid my usb port mappings with USBToolbox and added both those kexts, the mapping results and the USBToolbox.kext. I don't really know where to go from here. None of Middlemans suggestions worked. I did notice that it detects the USB ports as Matisse if that helps.
That’s how mine is behaving. Sound good, mouse via usb good but drives don’t mount.

I did develop a problem. I’m thrown out of the os to a page asking me to choose the boot drive. It started after I changed the fenvi card for an intel
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
That’s how mine is behaving. Sound good, mouse via usb good but drives don’t mount.

I did develop a problem. I’m thrown out of the os to a page asking me to choose the boot drive. It started after I changed the fenvi card for an intel
Try my efi, I fine tuned it for the intel Wireless AX. The only issue with that is the bluetooth is not working, but that is USB dependent. It should work as it is, minus changing the platform info to yours, of coarse. I am working on cleaning the efi up more, removing drivers not needed, ect. (Working on the devices section as well to get both network cards and both nvme controllers to show internal)

EDIT: My efi on above post #241 has these changes.
 
Last edited:

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
I noticed that the usb controller is XHCI, isn't there some weird issue where you need to patch it and rename it to XHC with a patch in ACPI? I tried that but it did not do anything.

IMG_0278.jpeg
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I noticed that the usb controller is XHCI, isn't there some weird issue where you need to patch it and rename it to XHC with a patch in ACPI? I tried that but it did not do anything.

View attachment 6141
Alright good going!

As for the ports, try these and see if they work for you. They are from the B550 build that I have.
I usually have SSDT-B550-XHC0-TO-XHC.aml and SSDT-B550-PTXH-TO-XHC2.aml enabled
plus EC-USBX and the USBMap enabled.
 

Attachments

  • B550 XHC.zip
    9.6 KB · Views: 3

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Alright good going!

As for the ports, try these and see if they work for you. They are from the B550 build that I have.
I usually have SSDT-B550-XHC0-TO-XHC.aml and SSDT-B550-PTXH-TO-XHC2.aml enabled
plus EC-USBX and the USBMap enabled.
OK, I tried it with both of those enabled at same time along with EC & USBX enabled but there was no change.

I do not have USBMap installed, I made a usb map using USBToolbox, which I have the discovered kext and the USBToolbox.kext enabled. Does that make a difference, if so, should I remove them and what USBMap should I try?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
OK, I tried it with both of those enabled at same time along with EC & USBX enabled but there was no change.

I do not have USBMap installed, I made a usb map using USBToolbox, which I have the discovered kext and the USBToolbox.kext enabled. Does that make a difference, if so, should I remove them and what USBMap should I try?
Yes sure.

For your information, CaseySJ mentioned that the AMD B550 has not one but two USB controllers, and both use the native ACPI names XHC0 and PTXH.
That's why we have both of those SSDTs are enabled in mine.

Yes you should disable those two and enable USBInjectall see if that sees it.

If you have made a DSDT dump for your system, you should have a look and see if XHC0 and PTXH are present.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Yes sure.

For your information, CaseySJ mentioned that the AMD B550 has not one but two USB controllers, and both use the native ACPI names XHC0 and PTXH.
That's why we have both of those SSDTs are enabled in mine.

Yes you should disable those two and enable USBInjectall see if that sees it.

If you have made a DSDT dump for your system, you should have a look and see if XHC0 and PTXH are present.
What is the recommended route for getting the Dump? Should I do it in Windows 11 using SSDTTime? If so, should I boot into it through opencore or just boot off the efi on the windows drive, I can either boot windows through opencore or boot from its SSD?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
What is the recommended route for getting the Dump? Should I do it in Windows 11 using SSDTTime? If so, should I boot into it through opencore or just boot off the efi on the windows drive, I can either boot windows through opencore or boot from its SSD?
You can certainly try SSDTTime, although my recommended method is to use a copy of Clover on a USB stick and pressing the F4 key at the menu.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
You can certainly try SSDTTime, although my recommended method is to use a copy of Clover on a USB stick and pressing the F4 key at the menu.
I do have a DSDT.aml I created from DCPIManager, will that work? (Attached it to this post)
 

Attachments

  • DSDT.aml.zip
    44.1 KB · Views: 5
Last edited:

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I do have a DSDT.aml I created from DCPIManager, will that work? (Attached it to this post)
Yes it works fine.

Okay so I've opened it up. It looks like you have two USB controllers names, and one is not PTXH.
It's XHC0 & XHC1.

Screen Shot 2022-06-16 at 7.03.53 AM.png

In addition it has a path of _SB.PCI0.GP17 and not _SB.PCI0.GP13 as in one of the SSDTs we
were using with the B550. That explains why it's not working as it should.

Screen Shot 2022-06-16 at 7.10.48 AM.png
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Alright so I've gone and made the changes to the files.
Give these SSDTs a try.
 

Attachments

  • Legion 5 XHC.zip
    1.9 KB · Views: 8

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Alright so I've gone and made the changes to the files.
Give these SSDTs a try.
Perfect! I will try it tomorrow morning when I get back. In the meantime if anyone with a legion 5 wants to download the and try them, please do and post results.
 

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
Good afternoon, I'm sorry that I'm writing in the wrong topic, but after reading the post, I correctly understood that it turned out to install mac os on a laptop and at the same time start graphics acceleration? the question is, according to this method, you can only get a discrete card? no integrated card? The ryzen 7 5800H itself, but the acer laptop
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Good afternoon, I'm sorry that I'm writing in the wrong topic, but after reading the post, I correctly understood that it turned out to install mac os on a laptop and at the same time start graphics acceleration? the question is, according to this method, you can only get a discrete card? no integrated card? The ryzen 7 5800H itself, but the acer laptop
Hi there,

Yes that’s correct, only the discrete card can work at the moment using this method (with graphics acceleration (as this card is supported in Monterey). However I am currently helping someone else work on one that has both an AMD Ryzen 3000G and IGPU in another post on the site.
 

lev12354

Member
AMD OS X Member
Joined
Jun 14, 2021
Messages
62
Hi there,

Yes that’s correct, only the discrete card can work at the moment using this method (with graphics acceleration (as this card is supported in Monterey). However I am currently helping someone else work on one that has both an AMD Ryzen 3000G and IGPU in another post on the site.
Thanks for the answer. I will follow that post and hope that my integrated graphics will work. And if necessary, I can try to install it myself, if you tell me what to do. I have experience with intel installation, on laptops and PCs
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Thanks for the answer. I will follow that post and hope that my integrated graphics will work. And if necessary, I can try to install it myself, if you tell me what to do. I have experience with intel installation, on laptops and PCs
Okay in that case let us know what is what the spec of your laptop?
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
sad :( -
ryzen 7 5800h + Vega 8 (IGPU)
nvidia rtx 3060 (laptop)
MT7921 + killer e2600 (WI-FI + BLUETOOTH + LAN)
MOTHERBOARD - Acer Nitro AN515-45 R6CU
Okay. Can you do a BIOS dump of the laptop using Clover or DCPIManager?
 
Back
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.