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

mmhh

New member
AMD OS X Member
Joined
Aug 28, 2023
Messages
4
Also, my efi has three yards removed, so you need to add them yourself
Hello, I have a laptop with the same configuration, and I also encountered this problem with your EFI, did you install it through "com.apple.recovery.boot", I tried to disable XHC1, it can enter the installation interface, but cannot use any network
 

mmhh

New member
AMD OS X Member
Joined
Aug 28, 2023
Messages
4
What's your BIOS version?
First of all, thank you for sharing, I tried the EFI you shared, only modify the CPU core patch for 5800H, and start -v debug mode, under the two versions of BIOS of G9CN33WW and G9EC32WW, pass "com.apple.recovery.boot "Recovery installation, but it cannot start normally and enter the installation interface, and the same error as above appears.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
That being the case check your bios to see if you have 'Above 4G Decoding' enabled. As you don't need both the npc boot arg and this option enabled in your Bios.

You need to check which of the other possible issues that can be causing this kernel panic is relevant to your setup.

# PCI Configuration Begin
My bios version is KFCN27WW, and I don't see Above 4G Decoding options in my bios. Thank you
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Hello, I have a laptop with the same configuration, and I also encountered this problem with your EFI, did you install it through "com.apple.recovery.boot", I tried to disable XHC1, it can enter the installation interface, but cannot use any network
Do you have above 4G decoding in your bios option? Actually, I don't have this option in my bios
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
Then you need to add the npci=0x3000 boot argument to your config.plist.
 

ser63

New member
AMD OS X Member
Joined
May 13, 2023
Messages
12
This is @ExtremeXT config with added SSDT-NVME-DISABLE.aml that disable first default nvme slot and new XCH1 fix. Thats working for me now.
UPD. This is for 5600h version so change core count in config.plist if you have 5800h
 

Attachments

  • EFI.zip
    34.3 MB · Views: 31
Last edited:

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
My graphic card is 6600S. I think 6600S and 6600M has same kind of GPU cores. Do you scussesfully installed MacOS on your computer?
@redhorse1990

If your DGPU is a AMD 6600S then you could perhaps try this - add agdpmod=pikera onto your existing NVRAM boot-arg (to enable it). Also make sure that you have Lilu, VirtualSMC & Whatevergreen.kext enabled and that NootedRed.kext is disabled (if it is present).
 

redhorse1990

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

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
@redhorse1990

If your DGPU is a AMD 6600S then you could perhaps try this - add agdpmod=pikera onto your existing NVRAM boot-arg (to enable it). Also make sure that you have Lilu, VirtualSMC & Whatevergreen.kext enabled and that NootedRed.kext is disabled (if it is present).
I have tried your modification. But still have no luck to work.
1693417429424.png
 

Attachments

  • EFI.zip
    35.1 MB · Views: 7
Last edited:

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I have tried your modification. But still have no luck to work.
View attachment 11743
Okay @redhorse1990,

I had another look at your build. Turns out you missed a number of ACPIs in the EFI including EC-USBX-LAPTOP, SSDT-ALS0, SBUS-MCHC & SSDT-PLUG-DRTNIA
which are essential for an AMD setup so I have added those in for you. I saw your ResizeAppleGPUBars setting was incorrect so I have changed that to -1 instead of 10.

However I have disabled a handful of kexts and SSDTs such as AMDTscSync, SSDT-IGPU-DISABLE and SSDT-XOSI. Also for the WiFi you should not enable BOTH Airportitlwm AND itlwm - it is one or the other. For simplicity I have disabled them both. I have also added (but not enabled) NootedRed for convenience, added & enabled NVMEFix and also added and enabled USBInjectAll for testing purposes. As we are using USBInjectAll I have disabled your custom UTBMap & USBToolBox (since only one set of kext is needed). Please note USBToolbox.kext is actually no longer required as of latest OC 0.9.4. so if you want to revert to it, you only need to enable UTBMap.kext (and disable USBInjectAll).

As for everything else, SecureBootMode has been set to Default and I have unchecked Booter > SetupVirtualMap as that's not needed.

I have also added in extra settings for the Device Properties for the RX6600S. If everything goes as planned, it should boot macOS with the RX6600S.
 

Attachments

  • EFI.zip
    36.5 MB · Views: 6

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Okay @redhorse1990,

I had another look at your build. Turns out you missed a number of ACPIs in the EFI including EC-USBX-LAPTOP, SSDT-ALS0, SBUS-MCHC & SSDT-PLUG-DRTNIA
which are essential for an AMD setup so I have added those in for you. I saw your ResizeAppleGPUBars setting was incorrect so I have changed that to -1 instead of 10.

However I have disabled a handful of kexts and SSDTs such as AMDTscSync, SSDT-IGPU-DISABLE and SSDT-XOSI. Also for the WiFi you should not enable BOTH Airportitlwm AND itlwm - it is one or the other. For simplicity I have disabled them both. I have also added (but not enabled) NootedRed for convenience, added & enabled NVMEFix and also added and enabled USBInjectAll for testing purposes. As we are using USBInjectAll I have disabled your custom UTBMap & USBToolBox (since only one set of kext is needed). Please note USBToolbox.kext is actually no longer required as of latest OC 0.9.4. so if you want to revert to it, you only need to enable UTBMap.kext (and disable USBInjectAll).

As for everything else, SecureBootMode has been set to Default and I have unchecked Booter > SetupVirtualMap as that's not needed.

I have also added in extra settings for the Device Properties for the RX6600S. If everything goes as planned, it should boot macOS with the RX6600S.
Hi, I have tried your modified EFI. However I got the following error in my boot to installation.
Would you kindly provide me some help?
Thank you
1693513956383.png
 
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.