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: 178
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
It's sad, but I'll wait for your suggestions, but for now, I'll still read and search on the Internet, maybe I'll find what I need to properly start the laptop in Mac OS. Thank you for your hard work! See you soon
Sure and you're welcome. :) (y)
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723

lyx

New member
AMD OS X Member
Joined
Jun 21, 2022
Messages
10
@lyx,

Just don’t forget to replace the PlatformInfo UUID, ROM and serials on the config.plist to newly generated ones using GenSMBIOS and SSDTPRgen because those belong to lev12345’s system.
Well, there is a problem, I'm not install rignt now. So, I run ssdtPRGen on my windows. And then........
I can't get any useful information. It will report couldn't find such file or directory.
( I use Git Bash to run this shell script )
 
Last edited:

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Well, there is a problem, I'm not install rignt now. So, I run ssdtPRGen on my windows. And then........
I can't get any useful information. It will report couldn't find such file or directory.
( I use Git Bash to run this shell script )
Okay. Well you could use SSDTTime to generate your DSDT, then use GenSMBIOS or SSDTPRGen to create the serials.
 

lyx

New member
AMD OS X Member
Joined
Jun 21, 2022
Messages
10
When I try to Setup, an error occurred........
Startup process will stop here

and then.......


I searched this sitution on Google, some blog write this error occurred because USB driver lost. Then I try to refresh UTBMap.kext,but it still didn't work.......
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
When I try to Setup, an error occurred........
Startup process will stop here

and then.......


I searched this sitution on Google, some blog write this error occurred because USB driver lost. Then I try to refresh UTBMap.kext,but it still didn't work.......
Okay. Did you also install USBToolbox.kext along with UTBMap.kext? USBToolbox should be loaded first after UTBMap and after the first 4 main OC kexts - Lilu/WhateverGreen/AppleALC/VirtualSMC. Do not forget to disable USBInjectAll and to make sure to disable XHCIPortLimit in the. SSDT-EC & SSDT-USBX must also be enabled and also the SSDT-LEGION5-XHC0-TO-XHC.aml and GenericUSBXHCI.kext.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
  • Like
Reactions: lyx

lyx

New member
AMD OS X Member
Joined
Jun 21, 2022
Messages
10

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
I‘ve tryed this EFI file,the first time, it stopped at In Memory Panic Stackshot Succeed. When I want to try it again, there is no panic, but my computer reboot automaticly.......
No it’s his latest one, not the first one.

Check your BIOS settings also, make sure they are hackintosh compatible:

AHCI Mode
CSM off
Secure Boot off
Above 4G Decoding On
SVM Support On
Serial Port Off
UEFI mode
 

lyx

New member
AMD OS X Member
Joined
Jun 21, 2022
Messages
10
No it’s his latest one, not the first one.

Check your BIOS settings also, make sure they are hackintosh compatible:

AHCI Mode
CSM off
Secure Boot off
Above 4G Decoding On
SVM Support On
Serial Port Off
UEFI mode
Maybe, there are some different in my BIOS setting.......
I can't find AHCI Mode setting option
CSM Switch
Above 4G Decoding Switch
SVM Switch
Serial Port Switch......

 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Did you install Monterey or BigSur? Try using this EFI, installing Monterey may require cpus=1
Unfortunately his system is different to yours - he has a Nvidia RTX card on the system which needs a SSDT-DDGPU or SSDT-Disabler installed.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
And, when I try to going into install interface, it will REBOOT automatically after this command

You might need to disable your WiFi and Bluetooth drivers to get past the installation screen.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
Maybe, there are some different in my BIOS setting.......
I can't find AHCI Mode setting option
CSM Switch
Above 4G Decoding Switch
SVM Switch
Serial Port Switch......

Ok @lyx,

1) AHCI is the hard drive interface. It would normally come under Peripherals or PCI Configuration.
2) It looks like your Virtual Machine settings have already been enabled under AMD V Technology.
3) AMD Platform Technology may need to be disabled (that's their version of TPM I believe).

You'll need to disable PXE Boot to LAN however - that's to boot the system via a network so is not required.

Another thing to try also - you could try deleting everything under the Device Properties > Add section (so there are no devices added in the list). On some systems it works. If not let me know. Make a backup copy of your current config.plist before you do so - just rename it as config-2.plist.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,461
@lyx your graphics options are set incorrectly for running macOS. You need to change the graphics from 'Dynamic Graphics' to 'Discrete Graphics'

IMG_20220624_180949.jpg Dynamic Graphics selected, which would use the AMD Integrated GPU to drive the display.

You need to set the RX6600m discrete graphics to drive the display.
 

Middleman

Active member
AMD OS X Member
Joined
Jan 29, 2021
Messages
723
@lyx your graphics options are set incorrectly for running macOS. You need to change the graphics from 'Dynamic Graphics' to 'Discrete Graphics'

View attachment 6318 Dynamic Graphics selected, which would use the AMD Integrated GPU to drive the display.

You need to set the RX6600m discrete graphics to drive the display.
@Edhawk - @lyx's system is different to the others. Despite being a Legion 5 he doesn't have a RX6600M fitted, he has Nvidia RTX card instead.
That's why he has to turn off the Discrete graphics and use the Dynamic one instead. On his system I am working on a build similar to my VCS
which allows for booting via the AMD APU. He has a Vega 3 card so it should work.
 
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.