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

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
Enable the SSDT-XOSI.aml table from your /EFI/OC/ACPI folder in your config.plist. The SSDT is currently set to Enabled = False but the companion ACPI patch in your config is enabled.

Or disable the companion ACPI patch required for the SSDT-XOSI.aml table in your config.plist, as without both parts being enabled the _OSI to XOSI ACPI patch and table won't work.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Looks like you also need to enable the SSDT-XOSI
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
What spec does your Legion 7 Slim contain, i.e. CPU, RAM, GPU, WiFi etc.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
Provide a copy of your system DSDT.aml.

You can extract the DSDT.aml in windows using Corpnewt's SSDTTime python script. I am assuming you have access to a drive containing Windows 11 that works on this laptop.

 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
Try this revised EFI, based on the EFI provided by @Middleman.

I have edited the EFI's subfolder contents and the config.plist.

See if this gets you any further along the boot process.
 

Attachments

  • EFI-2.zip
    20.8 MB · Views: 6

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Provide a copy of your system DSDT.aml.

You can extract the DSDT.aml in windows using Corpnewt's SSDTTime python script. I am assuming you have access to a drive containing Windows 11 that works on this laptop.

No, I don't have windows in my laptop. I changed a new SSD in my laptop. But my friends has a similar one (https://www.lenovo.com/us/en/p/lapt...on-slim-7-gen-8-(16-inch-amd)/len101g0029?org) with windows installed. Could I try to extract it from my friend's one?
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Try this revised EFI, based on the EFI provided by @Middleman.

I have edited the EFI's subfolder contents and the config.plist.

See if this gets you any further along the boot process.
Just tried your revised EFI, and it ends up with this error. And next I will try to use the extracted DSDT.aml to see what is going on
 

Attachments

  • IMG_0379.jpeg
    IMG_0379.jpeg
    2.5 MB · Views: 20

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Is it the same model of notebook, the version of bios that I have never seen before
Would Provide a copy of your system DSDT.aml?

You can extract the DSDT.aml in windows using Corpnewt's SSDTTime python script. I am assuming you have access to a drive containing Windows 11 that works on this laptop.

 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Just tried your revised EFI, and it ends up with this error. And next I will try to use the extracted DSDT.aml to see what is going on
macOS can't find CPUs. Delete any SSDT-CPUR/SSDT-PLUG/SSDT-PLUG-ALT and make a PluginType SSDT in SSDTTime.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
If the DSDT.aml isn’t from your laptop it is not going to tell us what we need to know.

Even different versions of bios for the same (identical) laptop will produce a different DSDT.aml.

So obtaining the DSDT.aml from your friends similar but not identical laptop is not going to cut it.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
If the DSDT.aml isn’t from your laptop it is not going to tell us what we need to know.

Even different versions of bios for the same (identical) laptop will produce a different DSDT.aml.

So obtaining the DSDT.aml from your friends similar but not identical laptop is not going to cut it.
Ok, I will dump one of my laptop from ubuntu disk.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
If the DSDT.aml isn’t from your laptop it is not going to tell us what we need to know.

Even different versions of bios for the same (identical) laptop will produce a different DSDT.aml.

So obtaining the DSDT.aml from your friends similar but not identical laptop is not going to cut it.
This is the DSDT.aml file that is dumped from my own laptop in Ubuntu flash disk.
Thank you so much for helping me configuring my EFI.
 

Attachments

  • DSDT.zip
    50 KB · Views: 4

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
OK, I have had a look at your DSDT.aml.

Using Corpnewt's SSDTTime and your system DSDT.aml I have generated a number of SSDT's and ACPI patches for your system.
Screenshot 2023-09-02 at 21.28.57.png SSDT's and ACPI patches generated from your DSDT.aml

These are contained in the Results folder attached below.

These SSDT's and patches have been added to the /EF/OC/ACPI folder and config.plist, which will hopefully help you boot macOS on your system.

Give the EFI-3 folder below a try, just remember to rename it to EFI before you use it.

Also make sure you use the ResetNvramEntry.efi before you boot your system with this revised EFI folder.
  • When you get to the OC boot screen, press the Spacebar,
  • This will unhide a number of drivers and tools. ResetNvramEntry.efi will be among them.
  • Highlight the driver and press enter key, or select it with your mouse.
  • Using this driver will clear any old Nvram entries, so you are booting with the entries in the new EFI and config.plist, not the old entries etc.
 

Attachments

  • Results.zip
    12 KB · Views: 2
  • EFI-3.zip
    20.8 MB · Views: 10

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
OK, I have had a look at your DSDT.aml.

Using Corpnewt's SSDTTime and your system DSDT.aml I have generated a number of SSDT's and ACPI patches for your system.
View attachment 11769 SSDT's and ACPI patches generated from your DSDT.aml

These are contained in the Results folder attached below.

These SSDT's and patches have been added to the /EF/OC/ACPI folder and config.plist, which will hopefully help you boot macOS on your system.

Give the EFI-3 folder below a try, just remember to rename it to EFI before you use it.

Also make sure you use the ResetNvramEntry.efi before you boot your system with this revised EFI folder.
  • When you get to the OC boot screen, press the Spacebar,
  • This will unhide a number of drivers and tools. ResetNvramEntry.efi will be among them.
  • Highlight the driver and press enter key, or select it with your mouse.
  • Using this driver will clear any old Nvram entries, so you are booting with the entries in the new EFI and config.plist, not the old entries etc.
First, I would like to thank for your help. I entered the Reset Nvram key before I boot. After restarting, it still gets the following error message. Would you help me take a look again? Thank you
 

Attachments

  • IMG_0381.jpeg
    IMG_0381.jpeg
    1.7 MB · Views: 18
  • IMG_0380.jpeg
    IMG_0380.jpeg
    4.3 MB · Views: 21
  • IMG_0382.jpeg
    IMG_0382.jpeg
    3.1 MB · Views: 20
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,370
Which NVME drive are you using?

If I recall correctly, some AMD laptops come fitted with unsupported NVME drives, i.e. the controller used on the drive isn't macOS compatible.
The only way to fix this is to replace the NVME drive with a supported drive, Western Digital SN570, SN770 or similar work fine in macOS.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
129
Which NVME drive are you using?

If I recall correctly, some AMD laptops come fitted with unsupported NVME drives, i.e. the controller used on the drive isn't macOS compatible.
The only way to fix this is to replace the NVME drive with a supported drive, Western Digital SN570, SN770 or similar work fine in macOS.

My NVME drive is​

Crucial P3 Plus 1TB PCIe Gen4 3D NAND NVMe M.2 SSD,​

I have successfully used a similar Crucial NVMe to build a MacOS with (https://www.msi.com/Motherboard/B450I-GAMING-PLUS-AC/support)
 
Last edited:
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.