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

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I tried doing the the USB port mapping but not with your supplied efi. When I boot with utportmap it hangs at something about activating the kext. I think it might be because of incorrect acpi patches so I will try what you suggested above tomorrow. I made a couple changes such as making both nvme controllers and nic set to built in and once I figure out how to get all USB ports mapped correctly I will post an efi. (Hopefully with the trackpad working as well) then maybe we all can tackle the cpus=1 quark.
Right, you mean UTBMap.kext? To use it you must also include the USBToolbox.kext. I don't think it has to do with incorrect ACPIs as otherwise the system won't boot. It's more than likely that. But yes we'll try to look into it afterwards (cpus=1) once you've done the USB ports & BT.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Right, you mean UTBMap.kext? To use it you must also include the USBToolbox.kext. I don't think it has to do with incorrect ACPIs as otherwise the system won't boot. It's more than likely that. But yes we'll try to look into it afterwards (cpus=1) once you've done the USB ports & BT.
I included the usbtoolbox.kext too but was right at end of day, I may have not added it to the config.plist tho. I will investigate it further tomorrow. Appreciate all the help!
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
I haven't seen any white noise, but I can also tell you I managed to install both Mojave and Catalina on the Atari VCS which uses an AMD APU with a Vega64 chip.
I made a guide for it here > https://www.tonymacx86.com/threads/guide-atari-vcs-2020-console.309903/

I think you should have a look at it because it is a more compatible setup for AMD based laptops, particularly if you want to get the graphics working.

I haven't updated it yet with the new no-gfx-spoof method as that was a recent addition from Opencore. But I think it should work.


Here is an example of the where the White Noise happen.


Specs on the laptop above are:

Omen 17 (2017-18)

CPU: I7 7700hq
GPU: RX 580 8GB
Memory: 16GB Ddr4 @ 2400
HHD: Nvme 256GB (From my Helios 500) Currently Mojave installed.
Wifi & BL: Fenvi m.2


As a Mojave Machine, is almost as perfect as you can ask for. But cant install any further

Edit: I have not applied any of your suggestions as I have been busy. However this video is context for several laptops and all with compatible Radeon Dedicated GPUs
 
Last edited:

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Welcome to help improve, I modified the device attributes of RX6600M in order to improve performance, and I tried the custom USB is invalid, I have to use the old GenericusbxHci. kext to complete Monterey startup, but all USB ports will fail, that is why BigSur is installed first
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Welcome to help improve, I modified the device attributes of RX6600M in order to improve performance, and I tried the custom USB is invalid, I have to use the old GenericusbxHci. kext to complete Monterey startup, but all USB ports will fail, that is why BigSur is installed first
Here is the odd thing about the USB ports in Monterey… I can plug in a usb dongle for wireless keyboard and mouse and it work, so I think usb 2 support is working, I just don’t think it works for usb 3.0 devices or higher… I am going to test that theory here in a few with usb 2.0 flash drive
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Welcome to help improve, I modified the device attributes of RX6600M in order to improve performance, and I tried the custom USB is invalid, I have to use the old GenericusbxHci. kext to complete Monterey startup, but all USB ports will fail, that is why BigSur is installed first
Here is the odd thing about the USB ports in Monterey… I can plug in a usb dongle for wireless keyboard and mouse and it work, so I think usb 2 support is working, I just don’t think it works for usb 3.0 devices or higher… I am going to test that theory here in a few with usb 2.0 flash drive
Have you both looked at RyzenUSBfix? > https://github.com/AlGreyy/ryzenusbfix
This is from AlGreyy, who does the Ryzen patches for Monterey.

Another thing you could try is to use the XHC SSDTs from the B550 builds which should allow for all the ports to be used.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Have you both looked at RyzenUSBfix? > https://github.com/AlGreyy/ryzenusbfix
This is from AlGreyy, who does the Ryzen patches for Monterey.

Another thing you could try is to use the XHC SSDTs from the B550 builds which should allow for all the ports to be used.
The last efi you supplied (with suggested settings) produced a kernel panic at boot, so I reverted back to the old efi, I am trying the RyzenUSBFix now. Will post update
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Its taking forever to install developer tools. (So I can run the fixusb script)
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Have you both looked at RyzenUSBfix? > https://github.com/AlGreyy/ryzenusbfix
This is from AlGreyy, who does the Ryzen patches for Monterey.

Another thing you could try is to use the XHC SSDTs from the B550 builds which should allow for all the ports to be used.
I tried to use the RyzenUSBFix but it asks for a access token if you use the second script and if you use the curl script it errors with 404 page not found, any ideas of the trick to get the script to work? Reading the instructions does not mention nothing of passwords or access tokens or that error.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
That's outdated and it has those errors because XLNC doesn't use that GitHub account anymore so it has no repos in it.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
That's outdated and it has those errors because XLNC doesn't use that GitHub account anymore so it has no repos in it.
Do you by any chance know of a replacement that might help with the Legion 5 project?
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
I guess If we wanted a laptop with a 6600M with higher possibility to be hackintoshed we should have gotten this piece of overprice tech 🤣

Screen Shot 2022-06-14 at 1.04.47 PM.png

EDit: Not, that price is silly and with that money may as well buy an M1 max
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
I guess If we wanted a laptop with a 6600M with higher possibility to be hackintoshed we should have gotten this piece of overprice tech 🤣

View attachment 6121

EDit: Not, that price is silly and with that money may as well buy an M1 max
Yeah I was about to say that lol... I guess the only plus to buying something like that is that you could max out ram and storage a lot cheaper than 16" Mac Pro BUT, I think for that price I would rather do the M1 Max and get the battery life and performance. I do think we will get the Legion 5 figured out in time. I had not had much time to mess with it since I got it, it has been installing developer tools until about 1:30PM my time. I will mess with it more tomorrow. The usbs worked in Big Sur, so there has to be a way to get them working.
 
Last edited:

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
Yeah I was about to say that lol... I guess the only plus to buying something like that is that you could max out ram and storage a lot cheaper than 16" Mac Pro BUT, I think for that price I would rather do the M1 Max and get the battery life and performance.
Exactly why I love hackintoshes. My daily is a the Helios laptop with the Vega 56 and the Ryzen 7 2700. With multiple drive bays and upgrade options, 4 slots I can have 128GB or DDr4. Had 96 in it, but took 32GB and put it on the Legion 5. This level of tinkering is out of the question with macs now a days. I don't like buying video game consoles as computers (poking fun at Apple here).

If those Zbboks with the w6600m come are found cheap on ebay for let say 1100, ill pick up one, but not any time soon.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,181
Do you by any chance know of a replacement that might help with the Legion 5 project?

It might be a long shot but try the old GenericUSBXHCI kext.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Yeah I was about to say that lol... I guess the only plus to buying something like that is that you could max out ram and storage a lot cheaper than 16" Mac Pro BUT, I think for that price I would rather do the M1 Max and get the battery life and performance. I do think we will get the Legion 5 figured out in time. I had not had much time to mess with it since I got it, it has been installing developer tools until about 1:30PM my time. I will mess with it more tomorrow. The usbs worked in Big Sur, so there has to be a way to get them working.

On my other Intel hacks I normally also enable the SSDT-UIAC as well as the EC-USBX and/or USBInjectall or USBMap. That usually does the trick.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
The last efi you supplied (with suggested settings) produced a kernel panic at boot, so I reverted back to the old efi, I am trying the RyzenUSBFix now. Will post update
Right. I am thinking maybe because it is missing the cpus=1 setting? I didn't add that unfortunately.

That's the reason why I included SSDT-CPUR and SSDT-CPUR-5800H-2. Reason being is the ones marked 5800H should be technically correct because they do follow the settings based on the actual DSDT output - so if it crashes again you'll have to change the kernel quirks to the ones that work with your other Monterey build. Technically it shouldn't because I had based the main EFI settings on both of my working Monterey 12.4 builds.

However I would also be interested to know what that earlier kernel panic was about.
 

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
It might be a long shot but try the old GenericUSBXHCI kext.
I already tried that, I think it’s on the efi middleman supplied as well.

Right. I am thinking maybe because it is missing the cpus=1 setting? I didn't add that unfortunately.

That's the reason why I included SSDT-CPUR and SSDT-CPUR-5800H-2. Reason being is the ones marked 5800H should be technically correct because they do follow the settings based on the actual DSDT output - so if it crashes again you'll have to change the kernel quirks to the ones that work with your other Monterey build. Technically it shouldn't because I had based the main EFI settings on both of my working Monterey 12.4 builds.

However I would also be interested to know what that earlier kernel panic was about.
Ahhh…. That was something I didn’t even check, I will retry the efi with cpus=1 tomorrow!
 
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.