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

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Out of curiosity try this. It's not ideal as it simply sets all ports as 3.0 but should work for the time being.
Is this kext to be used with USBToolbox.kext or by itself?
 

Shaneee

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

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
By itself. It’ll replace them.
OK this is the dump from IOREG booting from the EFI with your kext... Note this is still on Big Sur 11.6.2 so the AX210 wireless and bluetooth will not work so dont know if that will cause any issues. I am about to erase and install an older Big Sur that was supplied by EdHawk to bypass the xhcilimit and then do another dump.

I did make a DDST from opencore and applied it to the EFI. So as of right now, the EFI below is the most current one that started from Post #98 and I added the DDST and device properties to make all network and nvme controllers internal. (This EFI does not have your USB Kext, BUT the IOREG Dump does)
 

Attachments

  • Big_Sur_11_6_2_Shanees_USB_Kext.zip
    547.3 KB · Views: 8
  • EFI.zip
    33.5 MB · Views: 7

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Before you do any wiping and reinstalling can you install the Hackintool application.

Download Hackintool

Open the app, navigate to the PCIe tab and Export the PCIe device information from your laptop.

Screenshot 2022-07-01 at 17.16.36.png Hackintool > PCIe tab, export icon highlighted.

This will drop 4 x files on your desktop, compress and post the four files here, so we can see the full PCIe details for the laptop.

Screenshot 2022-07-01 at 17.23.18.png 4 x files created when the PCIe information is exported.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Can you try booting with the attached EFI and post a new IOReg.

It is based on the one you used from post #463, with a few minor tweaks.
  • Added VGA_ to GFX0 rename patch.
  • Removed a few unnecessary entries (Intel based entries)
  • Removed OpenHfsPlus.efi as HFSPlus.efi is also present in the Drivers folder,
  • Removed the Drivers not being enabled in the config.plist.
  • Removed All the Tools, as none of them are enabled in the config.plist.
  • Replaced Itlwm.kext with Airportitlwm-Big_Sur.kext v 2.1.0, as explained below.
Just for clarity regarding your AX210 WiFi card.
  1. When you use Itlwm.kext you need to install the Heliport app for the WiFi card to be recognised and enabled in macOS, as the built-in Apple WiFi app doesn't work with Itlwm.kext. The Heliport App allows the WiFi card to be enabled, but recognised as an Ethernet port, not as a WiFi device.
  2. If you replace Itlwm.kext with Airportitlwm.kext then your WiFi card is more likely to be recognised and enabled by the built-in Apple WiFi app. It will be recognised as a WiFi device without any additional apps.
Below are two screenshots showing the EFI from post 463 and the edited version I would like you to try.

Screenshot 2022-07-01 at 17.45.15.png EFI from post #463

Screenshot 2022-07-01 at 17.45.22.png Revised EFI
 

Attachments

  • EFI.zip
    32.5 MB · Views: 11

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Before you do any wiping and reinstalling can you install the Hackintool application.

Download Hackintool

Open the app, navigate to the PCIe tab and Export the PCIe device information from your laptop.

View attachment 6439 Hackintool > PCIe tab, export icon highlighted.

This will drop 4 x files on your desktop, compress and post the four files here, so we can see the full PCIe details for the laptop.

View attachment 6440 4 x files created when the PCIe information is exported.
here is the Hackintool PCIE Export...
 

Attachments

  • Legion 5 PCI Devices.zip
    9 KB · Views: 2

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Can you try booting with the attached EFI and post a new IOReg.

It is based on the one you used from post #463, with a few minor tweaks.
  • Added VGA_ to GFX0 rename patch.
  • Removed a few unnecessary entries (Intel based entries)
  • Removed OpenHfsPlus.efi as HFSPlus.efi is also present in the Drivers folder,
  • Removed the Drivers not being enabled in the config.plist.
  • Removed All the Tools, as none of them are enabled in the config.plist.
  • Replaced Itlwm.kext with Airportitlwm-Big_Sur.kext v 2.1.0, as explained below.
Just for clarity regarding your AX210 WiFi card.
  1. When you use Itlwm.kext you need to install the Heliport app for the WiFi card to be recognised and enabled in macOS, as the built-in Apple WiFi app doesn't work with Itlwm.kext. The Heliport App allows the WiFi card to be enabled, but recognised as an Ethernet port, not as a WiFi device.
  2. If you replace Itlwm.kext with Airportitlwm.kext then your WiFi card is more likely to be recognised and enabled by the built-in Apple WiFi app. It will be recognised as a WiFi device without any additional apps.
Below are two screenshots showing the EFI from post 463 and the edited version I would like you to try.

View attachment 6441 EFI from post #463

View attachment 6442 Revised EFI
On this EFI I cannot boot past this…

IMG_0280.jpeg
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Has the DSDT.aml table in the /EFI/OC/ACPI folder been patched in any way? If not it shouldn't be in the ACPI folder.

I forgot to enable the VGA_ to GFX0 rename patch in the previous config. I have fixed that in this one.
I have also checked the Device paths for the four devices under the Add section in the config.
Changed the name of the Adata NVMe drives from ???? to ADATA NVMe, as I can't find the exact model name for the two drives.
Added alcid=1 boot argument, as it was missing from the previous config.

Try this and see what happens.
 

Attachments

  • EFI-2.zip
    32.5 MB · Views: 4

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
Has the DSDT.aml table in the /EFI/OC/ACPI folder been patched in any way? If not it shouldn't be in the ACPI folder.

I forgot to enable the VGA_ to GFX0 rename patch in the previous config. I have fixed that in this one.
I have also checked the Device paths for the four devices under the Add section in the config.
Changed the name of the Adata NVMe drives from ???? to ADATA NVMe, as I can't find the exact model name for the two drives.
Added alcid=1 boot argument, as it was missing from the previous config.

Try this and see what happens.
No... I did not patch the DSDT. I have to go out of town and wont be back till monday so I will correct that.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Fixed in this EFI-3.zip folder.

Have a good weekend.
 

Attachments

  • EFI-3.zip
    32.5 MB · Views: 13

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
OK, based on the work undertaken by @ccr4700 in his post for a similar Asus ROG AMD laptop, I have revised your EFI again.


Try booting with this revised OC EFI and see if the CPU is recognised correctly, with all 8-cores/16-threads working.
 

Attachments

  • EFI.-4zip.zip
    32.5 MB · Views: 17

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
OK, based on the work undertaken by @ccr4700 in his post for a similar Asus ROG AMD laptop, I have revised your EFI again.


Try booting with this revised OC EFI and see if the CPU is recognised correctly, with all 8-cores/16-threads working.
Still can't get rid of cpus=1, according to @ccr4700, I checked APIC.aml, his EFI APIC.aml and my original APIC.aml processor ID and Local Apic ID are both 00 starting, the difference is that I have multiple Local APIC NMI descriptions, I changed it to the same only one, I also tried to put the processor ID and Local Apic The ID is changed to 11 to start, 10 to start, 01 to start, and adjust the processor ID of CPUR.aml, which fails anyway, and the problem may not be here

 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
Can you post a copy of all the ACPI tables from your laptop, not just the DSDT and SSDT tables.

You may need to boot with a Clover USB. Then press F4, also try Function +F4, while on the Clover boot screen to have the tables copied to the /EFI/CLOVER/ACPI/origin folder on the USB.

This extraction of the ACPI Tables happens in the background, with no indication anything is happening, so just wait at least 60 seconds before shutting down and removing the Clover USB.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Can you post a copy of all the ACPI tables from your laptop, not just the DSDT and SSDT tables.

You may need to boot with a Clover USB. Then press F4, also try Function +F4, while on the Clover boot screen to have the tables copied to the /EFI/CLOVER/ACPI/origin folder on the USB.

This extraction of the ACPI Tables happens in the background, with no indication anything is happening, so just wait at least 60 seconds before shutting down and removing the Clover USB.
Okay, I posted that earlier
 

Attachments

  • clover-dsdt.zip
    108.7 KB · Views: 3

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,249
The APIC.aml table in your laptop is very different to the table with the same name from the RROG Zephyrus G14 laptop being hacked by @ccr4700. The system definitely doesn't need the table replaced like his system, as the 'Processor ID' and 'Local Apic ID' match correctly in the table from your system.

Which version Bios are you using? Is it the latest.
  • EFCN54WW
  • 22 Mar 2022


I ask this because your SSDT APCI tables are different to the tables provided by @OG Nerd, who has the same laptop. Would be ideal if we could get you both running the same Bios version.

Your SSDT-4-CB-01.aml and SSDT-5-CB-01.aml match OG's SSDT-11-CB-01.aml and SSDT-12-CB-01.aml tables respecively. I know this because the two tables in both laptops are looking to undertake the same work, i.e. they are identical except for thier names.

Screenshot 2022-07-04 at 13.47.53.png Identical tables SSDT-4 & SSDT-5

I couldn't open RSDP.aml table. Received this error message when I tried to open the table, all the others could be read.

Screenshot 2022-07-04 at 13.21.23.png Error message received when trying to open RSDP.aml with MaciASL.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I am using the latest version of BIOS, the main identifier of ACPI table is Length ID,SSDT-XXX is the compilation process order, the name is rearranged, this should be no problem

 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I compared @cr4700 FACP.aml again, and found that his is 0x800, is the correct AMDCPU parameters, my FACP.aml is 0X400, this website says that 0X400 is the old Intel, which I think is strange, this is AMD's FACP.aml, how to use Intel CPU parameters

 

amega

New member
AMD OS X Member
Joined
Jan 26, 2021
Messages
1
Hi. I want to install Monterey on an AMD laptop (Legion 5 6th Gen with Ryzen 7 5800H and Radeon 6600M GPU). But the installation failed. There is a kernel panic during startup. I don't know what to do. Please help me find out what the problem is. thank you

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

This is to install monterey12.3.1

Hello. I can help you but I'm on telegram @Amega13
 
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.