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

CNGZ2022

New member
AMD OS X Member
Joined
Jul 11, 2022
Messages
25
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
Why am I still unable to use USB after installing this version? Is yours working properly? I saw earlier that you said usb was working
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
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
I understand your question. If you're referring my trying in Proxmox, I abandoned that idea and went with "native" installs.

- I started with a Big Sur 11.2.3 USB stick using MacPro7,1 EFI (from the first post). I disabled all kexts or ssdts related to USB. On this machine, if you keep resetting when the boot hangs, one time you are lucky and it passes until the system starts (the installation or the installed system).

I think everyone is using GenericUSBXHCI.kext precisely because of this problem of the hang on boot, with something related to USB controllers.

After Big Sur was installed, using the wired network, I downloaded the Monterey installation and installed it on a new APFS volume. From Monterey, I did the same for Ventura, with the particularity of using a pendrive to start Ventura with this EFI (MacBookPro15,2) and the other 2 use the EFI that is in the NVME itself (MacPro7,1).

I have Windows and the 3 MacOS only for testing USB...
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Why am I still unable to use USB after installing this version? Is yours working properly? I saw earlier that you said usb was working
What do you mean the USB? external drives? or peripherals like mouse and Keyboard?

The Legion 5 so is the only laptop in which is not able to mount external drives via USB. But peripherals should work fine. It is strange
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35


Hello everybody,

* Sorry, english is not my native language.

Taking advantage of the fact that I have 4 systems (Ventura 13.2.1, Monterey 12.6, Big Sur 11.2.3 and Windows) installed on the variant with Ryzen 5 5600H, I still insist on having the USB ports working.

In my searches, I found this (yes, old) information: https://github.com/AlGreyy/Ryzen-USB-fix-/blob/master/USBfix.txt

Based on this information, I edited an SSDT-RHUBS-OFF in hopes of getting rid of the dependency on the GenericUSBXHCI kext.

In Big Sur 11.2.3 it worked. Using EFI with smbios MacBookPro15,2 made by @zxc2689963 and with only this SSDT-RHUBS-OFF (without any other USB related kext), the system always boots and the USB ports works. But in Big Sur we don't have graphics acceleration with the 6600M

I'm no expert, much less on AMD hacks. But if you can test, correct and implement this SSDT in your experiments with Ventura and Monterey, we can move forward.

Thanks you all!
 

Attachments

  • SSDT-RHUBS-OFF.zip
    3.9 KB · Views: 22

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843


Hello everybody,

* Sorry, english is not my native language.

Taking advantage of the fact that I have 4 systems (Ventura 13.2.1, Monterey 12.6, Big Sur 11.2.3 and Windows) installed on the variant with Ryzen 5 5600H, I still insist on having the USB ports working.

In my searches, I found this (yes, old) information: https://github.com/AlGreyy/Ryzen-USB-fix-/blob/master/USBfix.txt

Based on this information, I edited an SSDT-RHUBS-OFF in hopes of getting rid of the dependency on the GenericUSBXHCI kext.

In Big Sur 11.2.3 it worked. Using EFI with smbios MacBookPro15,2 made by @zxc2689963 and with only this SSDT-RHUBS-OFF (without any other USB related kext), the system always boots and the USB ports works. But in Big Sur we don't have graphics acceleration with the 6600M

I'm no expert, much less on AMD hacks. But if you can test, correct and implement this SSDT in your experiments with Ventura and Monterey, we can move forward.

Thanks you all!
Interesting, but you shouldn't use a MacBook SMBIOS, or the GPU will not fully work (no HWD/HWE/DRM).
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
Interesting, but you shouldn't use a MacBook SMBIOS, or the GPU will not fully work (no HWD/HWE/DRM).
You mean the absence of the iGPU, right? I hadn't remembered that. Really, I need to do an EFI from scratch, which I haven't done yet on this machine.

Thanks!
 

zxc2689963

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


Hello everybody,

* Sorry, english is not my native language.

Taking advantage of the fact that I have 4 systems (Ventura 13.2.1, Monterey 12.6, Big Sur 11.2.3 and Windows) installed on the variant with Ryzen 5 5600H, I still insist on having the USB ports working.

In my searches, I found this (yes, old) information: https://github.com/AlGreyy/Ryzen-USB-fix-/blob/master/USBfix.txt

Based on this information, I edited an SSDT-RHUBS-OFF in hopes of getting rid of the dependency on the GenericUSBXHCI kext.

In Big Sur 11.2.3 it worked. Using EFI with smbios MacBookPro15,2 made by @zxc2689963 and with only this SSDT-RHUBS-OFF (without any other USB related kext), the system always boots and the USB ports works. But in Big Sur we don't have graphics acceleration with the 6600M

I'm no expert, much less on AMD hacks. But if you can test, correct and implement this SSDT in your experiments with Ventura and Monterey, we can move forward.

Thanks you all!
I have tried many methods that have not worked, only to know that the system can be probabilistically guided to success, most of them are stuck. It may be that IOUSBhostfamily is incompatible with EC, USB power controller of AMD laptop. You said that you could successfully enter the system every time in Big Sur11.2.3. You can try to copy IOUSBhostfamily.kext of Big Sur11.2.3 to Monterey and see what will happen?
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
I have tried many methods that have not worked, only to know that the system can be probabilistically guided to success, most of them are stuck. It may be that IOUSBhostfamily is incompatible with EC, USB power controller of AMD laptop. You said that you could successfully enter the system every time in Big Sur11.2.3. You can try to copy IOUSBhostfamily.kext of Big Sur11.2.3 to Monterey and see what will happen?
I'm using this information to try and replace the kext: https://stackoverflow.com/questions...stem-filesystem-as-writable-in-macos-monterey

But it seems that the change does not remain and returns to the original Monterey kext.

Does anyone know any effective way to do this test?

Thanks
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
I think the https://github.com/jacklukem/BigSurmountsrw (also works on monterey) did the trick. But, building KC, received the message: failed to build release collection:
Unable to resolve dependencies: 'com.apple.driver.usb.AppleUSBHub' names a dependency on 'com.apple.iokit.IOUSBHostFamily', which was not found.
(but the plugin mentioned in message is inside kext...).

- Monterey behavior with the Big Sur kext IOUSBhostfamily:

Still experiencing random freezes on verbose boot. Arriving at the loading of the graphical part of the system, the screen goes black (I can access the disks via the network - screen sharing does not work) and after more than 4 minutes, the login screen appears.

In the system report > USB > USB Device Tree, the devices appear, but the devices are not mounted (pendrive, etc.) and not even bluetooth works. Not even downloaded .dmg images I can mount... When trying to open Hackintool, it crashes. System shutdown is very slow.

I don't know what I should analyze in these cases, but looking at IOService from Monterey and Big Sur, I only found the "drive-child-bundle" line different in Monterey.

Any other ideas for try? Thanks!
 

Attachments

  • ioregistryexplorer-Big Sur.png
    ioregistryexplorer-Big Sur.png
    239.6 KB · Views: 7
  • ioregistryexplorer-Monterey- With IOUSBhostfamily of Big Sur.png
    ioregistryexplorer-Monterey- With IOUSBhostfamily of Big Sur.png
    286.4 KB · Views: 7

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
I think the https://github.com/jacklukem/BigSurmountsrw (also works on monterey) did the trick. But, building KC, received the message: failed to build release collection:
Unable to resolve dependencies: 'com.apple.driver.usb.AppleUSBHub' names a dependency on 'com.apple.iokit.IOUSBHostFamily', which was not found.
(but the plugin mentioned in message is inside kext...).

- Monterey behavior with the Big Sur kext IOUSBhostfamily:

Still experiencing random freezes on verbose boot. Arriving at the loading of the graphical part of the system, the screen goes black (I can access the disks via the network - screen sharing does not work) and after more than 4 minutes, the login screen appears.

In the system report > USB > USB Device Tree, the devices appear, but the devices are not mounted (pendrive, etc.) and not even bluetooth works. Not even downloaded .dmg images I can mount... When trying to open Hackintool, it crashes. System shutdown is very slow.

I don't know what I should analyze in these cases, but looking at IOService from Monterey and Big Sur, I only found the "drive-child-bundle" line different in Monterey.

Any other ideas for try? Thanks!
Any progress on that? I have a similar model of Legion 7i with 6800h and 6600s with similar problem of usb kext
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Any progress on that? I have a similar model of Legion 7i with 6800h and 6600s with similar problem of usb kext
Same here, stuck with no USB devices and no trackpad or keyboard.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Your Keyboard is not working?
To be honest, I don't remember... I set this aside and built a couple i9-13 gen hacks and forgot about this laptop.....
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
To be honest, I don't remember... I set this aside and built a couple i9-13 gen hacks and forgot about this laptop.....
ah. ok. I have it as desktop. as long as i have all of the files in the drive I just hook it to 2 monitors and a magic trackpad. It works like a charm. The keyboard works is the trackpad that doesnt
 

berki233

New member
AMD OS X Member
Joined
Feb 24, 2023
Messages
2
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

EFI has been uploaded to Github

Note: This EFI is configured for Legion 5 RX6600M and is only suitable for installation on computers with AMD independent graphics cards. GenericUSBXHCI.kext must be disabled for installation on other computers



Hello, my laptop is also Legion 5 6th Gen. The configuration is exactly the same as yours. Audio is Realtek ALC287. After booting Monterey 12.6 with this EFI, there is no sound. How to solve it?Thank you so much! I'm very sorry that my mother tongue is not English, hope you can understand.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,372
Change the boot argument alcid=xx to another layout-id.

The Realtek ALC287 codec supports layout-id 11 and 21, using one of these two might work better on your Lenovo laptop.

This of course assumes you have AppleALC.kext installed in your /EFI/OC/Kexts folder and active in your config.plist.
 

berki233

New member
AMD OS X Member
Joined
Feb 24, 2023
Messages
2
Change the boot argument alcid=xx to another layout-id.

The Realtek ALC287 codec supports layout-id 11 and 21, using one of these two might work better on your Lenovo laptop.

This of course assumes you have AppleALC.kext installed in your /EFI/OC/Kexts folder and active in your config.plist.
i taied to modifited alcid from 11 to 21,then it works,thank you so much.
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
Any progress on that? I have a similar model of Legion 7i with 6800h and 6600s with similar problem of usb kext
I didn't find any solution and focused on making EFI as compatible as possible, reducing the number of boot failures. So far so good, I can live with up to 5 forced restarts to enter the system with everything working.

So I went to try to make Sleep/Wake work. The system is going into sleep (machine turns off and the power LED is blinking, normal).

But when waking up, the date is usually 1 month ahead, time is also wrong and the system becomes unusable.

Can anyone point me to solutions for sleep/wake issues on an AMD platform?
 
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.