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...
Very nice work!

I wonder how long the battery life is under osx?

Actually, more than battery life, I'd like to know if it's possible to use vfio to pass a discrete graphics card (or even attach a physical disk, the laptop has two m.2 slots) directly to a virtual machine.

There is a project called osx-kvm, which I have been using as a working environment for about 2 years now, and I am very familiar with it. My daily work platform is a 3700x with 64G of RAM, plus two rx580 graphics cards, one assigned to the macos VM and one to the host Ubuntu. it's pretty smooth and stable.

I was thinking of using osx-kvm on this laptop so that I can work with Linux when I need long battery life, or have the option to boot physical disks or virtual machines when you need macos.

I'm considering whether to buy a Legion5 for this project, and I think it might be a little more worthwhile than an m-chip Macbook.
 
  • Like
Reactions: kalkmann
Very nice work!

I wonder how long the battery life is under osx?

Actually, more than battery life, I'd like to know if it's possible to use vfio to pass a discrete graphics card (or even attach a physical disk, the laptop has two m.2 slots) directly to a virtual machine.

There is a project called osx-kvm, which I have been using as a working environment for about 2 years now, and I am very familiar with it. My daily work platform is a 3700x with 64G of RAM, plus two rx580 graphics cards, one assigned to the macos VM and one to the host Ubuntu. it's pretty smooth and stable.

I was thinking of using osx-kvm on this laptop so that I can work with Linux when I need long battery life, or have the option to boot physical disks or virtual machines when you need macos.

I'm considering whether to buy a Legion5 for this project, and I think it might be a little more worthwhile than an m-chip Macbook.
This is a game laptop, the battery should not be durable, I tried to install in Proxmox VE but failed, I am not very familiar with the method of such installation, hope to see your successful installation message, osx-kvm installation should solve the USB problem of this laptop
 
This is a game laptop, the battery should not be durable, I tried to install in Proxmox VE but failed, I am not very familiar with the method of such installation, hope to see your successful installation message, osx-kvm installation should solve the USB problem of this laptop
Same here. I tried Proxmox but I got stuck with a black screen. But in any case, it will not run as native, but it is as close to native as you can get via virtualization since is very close to metal
 
Same here. I tried Proxmox but I got stuck with a black screen. But in any case, it will not run as native, but it is as close to native as you can get via virtualization since is very close to metal
Running it in KVM with GPU Passthrough yields the same experience as bare metal, you won't notice the difference, but the laptop needs to support IOMMU for that, if anyone is interested, it can be tried.
 
  • Like
Reactions: kalkmann
This is a game laptop, the battery should not be durable, I tried to install in Proxmox VE but failed, I am not very familiar with the method of such installation, hope to see your successful installation message, osx-kvm installation should solve the USB problem of this laptop
Tried with Proxmox all day today. After installing Monterey, passthroug the GPU, it gets frozen at "ioapic: version 0x11"

When I tried to passthrough the first USB controller, the XHC0, the computer would restart. With the 2nd controller I was able to use the keyboard to hit "enter".

My notebook is Legion 5-15ACH6A 82NW, Ryzen 5600H (six cores) with 6600M.
 
Tried with Proxmox all day today. After installing Monterey, passthroug the GPU, it gets frozen at "ioapic: version 0x11"

When I tried to passthrough the first USB controller, the XHC0, the computer would restart. With the 2nd controller I was able to use the keyboard to hit "enter".

My notebook is Legion 5-15ACH6A 82NW, Ryzen 5600H (six cores) with 6600M.
Can you send an image of where it stuck? Does it work without the GPU passed?

You probably weren't able to pass XHC0 because it's in IOMMU Group with another devices (usually SATA and Ethernet on AMD), this can be fixed with a custom Linux kernel, but I have no experience with this on Proxmox, I always used KVM manually on Arch.
 
Can you send an image of where it stuck? Does it work without the GPU passed?

You probably weren't able to pass XHC0 because it's in IOMMU Group with another devices (usually SATA and Ethernet on AMD), this can be fixed with a custom Linux kernel, but I have no experience with this on Proxmox, I always used KVM manually on Arch.
Without the GPU passthroug it worked normal until I finished the installation, I was following this video from https://github.com/luchina-gabriel/OSX-PROXMOX

But after doing the passthroug the problems started, I edited the boot EFI several times, but nothing made it past the ACPI phase of the verbose boot.

As I'm not familiar with virtualization and won't be able to use the PS/2 keyboard/touch in this option, I'm going to go back to the "native" installation using yours EFI for the 8-core processor as base (which already worked here).

But what will be the solution to the USB ports of this laptop works without the GenericUSBXHCI kext?

Thanks for your answer.
 
Last edited:
My previous post released a kernel patch for Ventura support

I tested your EFI (adjusting patches for my processor and serials) to install Ventura. With or without GenericUSBXHCI.kext, it's in an infinite bootloop on 4th stage of the installation (before the graphical stage).
 
I tested your EFI (adjusting patches for my processor and serials) to install Ventura. With or without GenericUSBXHCI.kext, it's in an infinite bootloop on 4th stage of the installation (before the graphical stage).
I have tested many times and found that Venture13.1 can boot successfully without GenericUSBXHCI.kext, even without customizing any USB port.





No USB ports are customized



In most cases, it will be stuck in the position below, which can be skipped only through continuous forced restart. As long as the startup is successful, the USB of the system is completely normal, no matter whether there is a customized USB port or not, I have no relevant knowledge to test why it is stuck randomly, I hope someone can give me some tips, thank you

Are you using this published EFI? Try disabling AmdTscSync.kext and configuring UEFI-Quirks-TscSyncTimeout (525000). Can you start the installer without GenericUSBXHCI.kext? What kind of wireless card are you using? I suspect that the probability of successful startup may be caused by the wireless card, of course, I have tried to remove the wireless card from the motherboard, but did not solve the problem, if replaced by BCM94360Z3/BCM94360Z4, what will happen, this is just my guess
 
  • Like
Reactions: kalkmann
Are you using this published EFI? Try disabling AmdTscSync.kext and configuring UEFI-Quirks-TscSyncTimeout (525000). Can you start the installer without GenericUSBXHCI.kext? What kind of wireless card are you using? I suspect that the probability of successful startup may be caused by the wireless card, of course, I have tried to remove the wireless card from the motherboard, but did not solve the problem, if replaced by BCM94360Z3/BCM94360Z4, what will happen, this is just my guess
By disabling AmdTscSync.kext and configuring UEFI-Quirks-TscSyncTimeout (525000) + Patch from post #705 + GenericUSBXHCI.kext it was possible to finish the installation. I had no luck with GenericUSBXHCI.kext disabled.



My Wifi card is BCM94360NG, which I couldn't get to work in any MacOS system on this machine (in Windows 11 works).

Now I have Big Sur 11.2.3/ Monterey 12.6 running with extremegrief1's EFI (MacPro7,1) and Ventura 13.2 with your EFI (MacBookPro15,2). All depending on GenericUSBXHCI.kext

Thanks for everyone's effort so far! Hacking in AMD is really for the strongs.
 
By disabling AmdTscSync.kext and configuring UEFI-Quirks-TscSyncTimeout (525000) + Patch from post #705 + GenericUSBXHCI.kext it was possible to finish the installation. I had no luck with GenericUSBXHCI.kext disabled.



My Wifi card is BCM94360NG, which I couldn't get to work in any MacOS system on this machine (in Windows 11 works).

Now I have Big Sur 11.2.3/ Monterey 12.6 running with extremegrief1's EFI (MacPro7,1) and Ventura 13.2 with your EFI (MacBookPro15,2). All depending on GenericUSBXHCI.kext

Thanks for everyone's effort so far! Hacking in AMD is really for the strongs.
Can you share the efi you are using now? Thank you very much. I have been trying to install it, but I have not been successful. Thanks again
 
Are you using this published EFI? Try disabling AmdTscSync.kext and configuring UEFI-Quirks-TscSyncTimeout (525000). Can you start the installer without GenericUSBXHCI.kext? What kind of wireless card are you using? I suspect that the probability of successful startup may be caused by the wireless card, of course, I have tried to remove the wireless card from the motherboard, but did not solve the problem, if replaced by BCM94360Z3/BCM94360Z4, what will happen, this is just my guess
I have a
https://www.lenovo.com/us/en/p/lapt...0000us?orgRef=https%3A%2F%2Fwww.google.com%2F with intel wifi card. Could I use your published EFI for ventura installation? What modification do I need? Thanks
 
Can you share the efi you are using now? Thank you very much. I have been trying to install it, but I have not been successful. Thanks again
Link to EFI: https://drive.google.com/drive/folders/1OpZXpjX-QrpjTvU7WBBljuxoQlBZeSjT?usp=share_link

My model is with Ryzen 5600H+6600M.

Remember to fill in the information in PlatformInfo > Generic

I didn't depend on working USB ports to start the installation (the Ventura image was already downloaded and I started the installation from Monterey).

Good luck!
 
Does your usb work? When I tried to install it, the usb still didn't work
As I mentioned in the answer, I didn't rely on USB ports for installation. I started the installation from Monterey (y)
 
As I mentioned in the answer, I didn't rely on USB ports for installation. I started the installation from Monterey (y)
The host can use usb in this version of the system, but I can not use it after installation, so I am curious how the host achieved this
 
  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.