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: 129
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
115
That looks as though the macOS boot process has gone a bit further, as the images don't show the same or even a similar issue. Can't see any KP.

How long did you wait at the last screen before shutting down or rebooting the system? You need to give the Bootloader and OS time to do their thing and not rush the installation. As it is common for the installation to look like it has stalled, especially on AMD Hacks. But things are still happening in the background so patience is the byword when you get to this stage.
I tired waiting for more than 10 mins in the last screen before shutting down. But it stuck at the similar place. Plus sometimes I am also stuck the another point. Would you kindly help me to see which causes the KP. Thanks
 

Attachments

  • IMG_0391.jpeg
    IMG_0391.jpeg
    3.8 MB · Views: 35
  • IMG_0390.jpeg
    IMG_0390.jpeg
    4.6 MB · Views: 19

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
Using a different USB port. Using a different USB pen drive. Those are both common troubleshooting options when installing macOS.
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
Using a different USB port. Using a different USB pen drive. Those are both common troubleshooting options when installing macOS.
Having tried at both two USB ports, I still stuck at similar place. I think the USB drive is ok because I have used it to install MacOS on another PC. But I also tried a different USB, the problem is still the same.
 

Attachments

  • IMG_0393.jpeg
    IMG_0393.jpeg
    2.7 MB · Views: 14

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Having tried at both two USB ports, I still stuck at similar place. I think the USB drive is ok because I have used it to install MacOS on another PC. But I also tried a different USB, the problem is still the same.
What type of computer do you use, use my latest EFI to try, if the CPU core number is not correct need to be modified, hard disk can not be Hynix, must be replaced
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I tired waiting for more than 10 mins in the last screen before shutting down. But it stuck at the similar place. Plus sometimes I am also stuck the another point. Would you kindly help me to see which causes the KP. Thanks
Stuck in the touchpad driver, try disabling VoodooI2C.kext, VoodooI2CHID.kext
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
What type of computer do you use, use my latest EFI to try, if the CPU core number is not correct need to be modified, hard disk can not be Hynix, must be replaced
This is my build.
I have tried yours but doesn’t work
 

redhorse1990

Member
AMD OS X Member
Joined
Jul 2, 2022
Messages
115
Try booting with thin provisioning
I just tried your EFI, it still gets another error message. My laptop type is https://www.lenovo.com/us/en/p/lapt...on-slim-7-gen-7-(16-inch-amd)/len101g0019?org which is a little different from yours. And here is the DSDT that I dumped from my own laptop. I think the problem is related to ACPI files, if I change it to the ACPI file of my original EFI, it stuck at the same place of my original EFI. But I don’t know too much of the ACPI booting logic, so I don’t know how to fix it.
 

Attachments

  • IMG_0396.jpeg
    IMG_0396.jpeg
    4.2 MB · Views: 21
  • DSDT.zip
    50 KB · Views: 4
Last edited:

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I just tried your EFI, it still gets another error message. My laptop type is https://www.lenovo.com/us/en/p/lapt...on-slim-7-gen-7-(16-inch-amd)/len101g0019?org which is a little different from yours. And here is the DSDT that I dumped from my own laptop. I think the problem is related to ACPI files, if I change it to the ACPI file of my original EFI, it stuck at the same place of my original EFI. But I don’t know too much of the ACPI booting logic, so I don’t know how to fix it.
Try this.
 

Attachments

  • SSDT-HPET.aml.zip
    610 bytes · Views: 1

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I just tried your EFI, it still gets another error message. My laptop type is https://www.lenovo.com/us/en/p/lapt...on-slim-7-gen-7-(16-inch-amd)/len101g0019?org which is a little different from yours. And here is the DSDT that I dumped from my own laptop. I think the problem is related to ACPI files, if I change it to the ACPI file of my original EFI, it stuck at the same place of my original EFI. But I don’t know too much of the ACPI booting logic, so I don’t know how to fix it.
And this ResizeAppleGpuBars cannot be -1
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,201
Booter > Quirks > ResizeAppleGpuBars should only be set as '0' if you can enable the 'Resizable Bar' option in your laptops Bios (Firmware).

If this option isn't available in your Bios, the Quirk should be left as '-1'.
 

craighazan

Donator
Donator
Joined
Nov 22, 2021
Messages
323
Booter > Quirks > ResizeAppleGpuBars should only be set as '0' if you can enable the 'Resizable Bar' option in your laptops Bios (Firmware).

If this option isn't available in your Bios, the Quirk should be left as '-1'.
Just out of interest, have you tried experimenting with this BIOS setting?. I wondered if it would make a difference to the performance of an APU.
 
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.