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

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153

Attachments

  • IMG_0589.jpeg
    IMG_0589.jpeg
    4.4 MB · Views: 12
  • IMG_0588.jpeg
    IMG_0588.jpeg
    4.4 MB · Views: 2
  • IMG_0587.jpeg
    IMG_0587.jpeg
    4.2 MB · Views: 3

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,462
You need to make/create a custom kext for your USB ports to work. UTBDefault.kext is a piece of shite, it does nothing for your system.

You can get the latest release from the GitHub releases tab.

The zip contains 2 kexts: the main USBToolBox.kext, and UTBDefault.kext, a codeless kext used for attaching USBToolBox to all PCIe USB controllers. This is designed for use before you map, so that you can have all USB ports working (assuming no port limit) before you map. However, it is not needed and must be removed if you choose to map from the start (ie. from Windows, using the USBToolBox tool).

Please read that last part highlighted in BOLD again.

You need to follow this guide to create a UTBMap.kext, not use the empty/codeless UTBDefault.kext.


You need to select the 'Read more' option in the first post to display the USBToolBox/Tool guide.

If you do not have Windows installed, you can utilise USBToolBox on Windows PE by running Hiren's BootCD PE for free on a USB drive.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153
You need to make/create a custom kext for your USB ports to work. UTBDefault.kext is a piece of shite, it does nothing for your system.

You can get the latest release from the GitHub releases tab.

The zip contains 2 kexts: the main USBToolBox.kext, and UTBDefault.kext, a codeless kext used for attaching USBToolBox to all PCIe USB controllers. This is designed for use before you map, so that you can have all USB ports working (assuming no port limit) before you map. However, it is not needed and must be removed if you choose to map from the start (ie. from Windows, using the USBToolBox tool).

Please read that last part highlighted in BOLD again.

You need to follow this guide to create a UTBMap.kext, not use the empty/codeless UTBDefault.kext.


You need to select the 'Read more' option in the first post to display the USBToolBox/Tool guide.

If you do not have Windows installed, you can utilise USBToolBox on Windows PE by running Hiren's BootCD PE for free on a USB drive.
I have tried using this USBToolBox to build UTBMap.kext again. Would you help me check to see whether it is ok? I have used this kext to create EFI, but it still fails with this issue. Thanks
 

Attachments

  • UTBMap.kext.zip
    978 bytes · Views: 3
  • IMG_0590.jpeg
    IMG_0590.jpeg
    4.3 MB · Views: 5
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,462
Remind me about the number of USB ports on your laptop. From your UTBMap.kext/Contents/info/plist I would believe the following to be correct.
  • 4 x Internal ports - Webcam, ITE, Bluetooth + another/unused port
  • 2 x USB3 physical ports
  • 2 x Type-C physical ports.
Using the Nickname, option 'N' when discovering the ports can be really helpful. See the Hackintool > USB tab as an example, from my AMD B550M system below.

Screenshot 2024-06-17 at 21.55.53.png USB ports discovered with 'Comments' describing the port type and location.

Screenshot 2024-06-17 at 21.58.53.png Same kext details (first section) as viewed in ProperTree

Adding the comments/nickname really helps when others are looking at your USB configuration, as leaving them blank means the person trying to help you has no idea if you have discovered and activated the correct ports.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153
Remind me about the number of USB ports on your laptop. From your UTBMap.kext/Contents/info/plist I would believe the following to be correct.
  • 4 x Internal ports - Webcam, ITE, Bluetooth + another/unused port
  • 2 x USB3 physical ports
  • 2 x Type-C physical ports.
Using the Nickname, option 'N' when discovering the ports can be really helpful. See the Hackintool > USB tab as an example, from my AMD B550M system below.

View attachment 14299 USB ports discovered with 'Comments' describing the port type and location.

View attachment 14300 Same kext details (first section) as viewed in ProperTree

Adding the comments/nickname really helps when others are looking at your USB configuration, as leaving them blank means the person trying to help you has no idea if you have discovered and activated the correct ports.
This is my created UTBMap.kext commented for convenience.
 

Attachments

  • usbport.png
    usbport.png
    225.2 KB · Views: 5
  • UTBMap.kext.zip
    1 KB · Views: 0

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,462
That snip of the port discovery from Windows explains a lot.

You may need an ACPI rename patch, to change XHCI TO XHC_, as XHCI and XHC1 are used by Apple.

First thing is the companion ports should also be identified, named/commented.
Second is that the Fingerprint reader won’t work in macOS, so the port should be disabled in the kext.

The rest looks good.

I will have a look at the kext later when I am at my desk, using an iPad currently so can’t edit or examine it.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153
That snip of the port discovery from Windows explains a lot.

You may need an ACPI rename patch, to change XHCI TO XHC_, as XHCI and XHC1 are used by Apple.

First thing is the companion ports should also be identified, named/commented.
Second is that the Fingerprint reader won’t work in macOS, so the port should be disabled in the kext.

The rest looks good.

I will have a look at the kext later when I am at my desk, using an iPad currently so can’t edit or examine it.
I have commented on companion ports.
 

Attachments

  • UTBMap.kext.zip
    1 KB · Views: 1

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,462
I have just opened your UTBMap.kext/Contents/Info.plist and looked through the setup.

Screenshot 2024-06-18 at 18.48.32.png Screenshot 2024-06-18 at 18.48.45.png revised UTBMap.kext/Contents/info.plist

I have disabled the Fingerprint port, by adding '#' in front of the word Port. Under the XHC2 USB controller.

Screenshot 2024-06-18 at 18.41.37.png XHC2 > HS01 fingerprint port disabled

I definitely think you need to use the XHC1 to XHC_ rename patch, to prevent the 2 x USB3 on the rear and the Intel Bluetooth port clashing with one of Apple's USB controllers.

Screenshot 2024-06-18 at 18.45.03.png XHC1 to XHC_ rename patch

I have renamed the XHC1 controller in the UTBMap.kext below as XHC.

I have also attached a copy of the XHC1 to XHC_ rename patch for you to use in the APCI > Patches section of your config.plist.

The attached EFI-11 contains the rename patch, UTBMap.kext & USBToolBox.kext. See if this gets you past this USB issue.
 

Attachments

  • EFI-11.zip
    5.6 MB · Views: 6
  • XHC1 to XHC_.plist.zip
    849 bytes · Views: 4

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153
I have just opened your UTBMap.kext/Contents/Info.plist and looked through the setup.

View attachment 14311 View attachment 14312 revised UTBMap.kext/Contents/info.plist

I have disabled the Fingerprint port, by adding '#' in front of the word Port. Under the XHC2 USB controller.

View attachment 14308 XHC2 > HS01 fingerprint port disabled

I definitely think you need to use the XHC1 to XHC_ rename patch, to prevent the 2 x USB3 on the rear and the Intel Bluetooth port clashing with one of Apple's USB controllers.

View attachment 14309 XHC1 to XHC_ rename patch

I have renamed the XHC1 controller in the UTBMap.kext below as XHC.

I have also attached a copy of the XHC1 to XHC_ rename patch for you to use in the APCI > Patches section of your config.plist.

The attached EFI-11 contains the rename patch, UTBMap.kext & USBToolBox.kext. See if this gets you past this USB issue.
Thanks for providing the updates. I just tired your newest modified EFI. Unluckily, it stills come with a forbidden icon on the same place(USBSMC identifier non-unique)
 

Attachments

  • IMG_0591.jpeg
    IMG_0591.jpeg
    4.6 MB · Views: 5

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,205

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
153
Have you tried with this updated version of GenericUSBXHCI? https://github.com/RattletraPM/GUX-RyzenXHCIFix/releases
I think I have tried this post,but still has no luck to work
 

innocentrose

New member
AMD OS X Member
Joined
May 28, 2024
Messages
4
You need to make/create a custom kext for your USB ports to work. UTBDefault.kext is a piece of shite, it does nothing for your system.

You can get the latest release from the GitHub releases tab.

The zip contains 2 kexts: the main USBToolBox.kext, and UTBDefault.kext, a codeless kext used for attaching USBToolBox to all PCIe USB controllers. This is designed for use before you map, so that you can have all USB ports working (assuming no port limit) before you map. However, it is not needed and must be removed if you choose to map from the start (ie. from Windows, using the USBToolBox tool).

Please read that last part highlighted in BOLD again.

You need to follow this guide to create a UTBMap.kext, not use the empty/codeless UTBDefault.kext.


You need to select the 'Read more' option in the first post to display the USBToolBox/Tool guide.

If you do not have Windows installed, you can utilise USBToolBox on Windows PE by running Hiren's BootCD PE for free on a USB drive.

I am in a similar situation as redhorse1990
My laptop is Legion 7 Gen 7 AMD Advantage Edition 16ARHA7
CPU : AMD Ryzen 7 6800H 3.2 GHz
dGPU : AMD Radeon RX 6700M 10 GB ( Navi22 )
Memory : DDR5-4800MHz 16 GB
SSD : WD SN810 1tb
WiFi : MediaTek RZ616 (i will change it)
Its detailed specs are here
I have followed your guide for usb mapping and tried my best to name and put detail of each port
The physical ports on my laptop are as under
360.jpg
Right
Right.jpg
Rear
Rear.jpg
Left
Left.jpg

The USBToolBox files are attached however its screenshot with my notes is below
USBToolBox-Config.jpg
As you can see the left and rear USB C ports are independent, but i have observed following
1. The rear two USB A ports are internally coupled with right USB C for USB3 speeds at port 5 and
2. The rear two USB A ports are internally coupled with right USB C and Finger Print Sensor for USB2 speeds at port 2

Now, i am confused as to what ports should i disable and what controllers should i rename.
I am attaching usb.json file for USBToolBox below

I have made the installer usb, initially i made an EFI folder by following chefkissinc and dortania guide but couldnt get past the usb kernel panic.
Then i used zxc2689963's EFI folder from here and proceeded till installer screen (by booting from usb) where i got stuck in same situation of trackpad and mouse responding real slow and install button not doing anything.

Could you please have a look at the EFI folder and also make the USB kext for me to use.
It would be really helpful.
 

Attachments

  • usb.json.zip
    2.2 KB · Views: 1

innocentrose

New member
AMD OS X Member
Joined
May 28, 2024
Messages
4
You need to make/create a custom kext for your USB ports to work. UTBDefault.kext is a piece of shite, it does nothing for your system.

You can get the latest release from the GitHub releases tab.

The zip contains 2 kexts: the main USBToolBox.kext, and UTBDefault.kext, a codeless kext used for attaching USBToolBox to all PCIe USB controllers. This is designed for use before you map, so that you can have all USB ports working (assuming no port limit) before you map. However, it is not needed and must be removed if you choose to map from the start (ie. from Windows, using the USBToolBox tool).

Please read that last part highlighted in BOLD again.

You need to follow this guide to create a UTBMap.kext, not use the empty/codeless UTBDefault.kext.


You need to select the 'Read more' option in the first post to display the USBToolBox/Tool guide.

If you do not have Windows installed, you can utilise USBToolBox on Windows PE by running Hiren's BootCD PE for free on a USB drive.
Do you have the same brand with mine?
If your laptop is the same with mine, you can go to this thread and work together with us

My laptop is Legion 7 Gen 7 AMD Advantage Edition,
Yours is Legion Slim 7 Gen 7 AMD Advantage Edition

i think we have different usb and dgpu configurations.

However, i have posted an update just above.
I am definitely willing to work with you guys to ryzentosh our machines.
 
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.