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

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,179
If don't use SSDT-CPUR, ll get stuck in the figure below anyway. Using CPUR will lead to Kernel Panic

I know but with cpus=1 it’ll book right? I just want to see if there’s a limit to that.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Have you tried Montery 12.1, not 12.3? There was major overhaul on version 12.3 if I recollect correctly. Perhaps give a try to version 12.1.

How usable is the Legion 5 on Monterey with a single core? Usable or super laggy?
Even with only 1 core, the speed is still very good, the special effects are full, after all, there is graphics acceleration, enough for light daily use
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,179
I'm not expecting this to do anything different or work. I've enabled DevirtualiseMmio and built a DEBUG EFI folder. Please use it to try boot and upload the log files afterwards.
 

Attachments

  • EFI.zip
    4.2 MB · Views: 20

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
I'm not expecting this to do anything different or work. I've enabled DevirtualiseMmio and built a DEBUG EFI folder. Please use it to try boot and upload the log files afterwards.
This time the results were different
 

Attachments

  • 20220514101145.jpg
    20220514101145.jpg
    1.2 MB · Views: 21
  • opencore-2022-05-14-013202.zip
    13 KB · Views: 4

alexjaixd

New member
AMD OS X Member
Joined
May 9, 2022
Messages
9
Legion 5 only stays at cpus=1, one CPU core runs Monterey, other AMD laptops don't know if they support TSC_ADJUST, tried loading RX6600M in BigSur modified driver, but failed, so far no one drives RX6600 in BigSur, Or send pictures to show
@zxc2689963 Just wondering have you tried 12.1 instead of 12.3.1 ? Think Monterey has made some changes from 12.3 and onwards.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
2,179
Unless the OpenCore team have something to test on and need to they are unlikely to help out here. Algrey may know though. I'll send him a message.
 

PStar_7

New member
AMD OS X Member
Joined
May 13, 2022
Messages
3
There may be a way to boot network recovery through OpenCore, and a way to boot hard disk recovery, without upgrading to Monterey in BigSur
hey would you share working EFI/USB boot file for this r7?
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Monterey started asking for TSC_ADJUST support, so some X79 and X99 cannot be upgraded to Monterey,Legion 5 unfortunately has the same problem, hopefully OpenCore team will add this feature in the future, may need UEFI firmware to simulate TSC_ADJUST, Let the hardware support



 

Allen623329

New member
AMD OS X Member
Joined
Aug 21, 2021
Messages
8
Some common issues to check:
  1. Are you using any unnecessary Kexts in your setup, CPU power management related?
  2. Have you set Kernel > Emulate > DummyPowerManagement = True
  3. Have you set Kernel > Quirks > ProvideCurrentCPUInfo = True
  4. Have you checked the 3 x AMD Kernel Patches are set correctly for your 8-core CPU?
Yeah, they are of the correct values
 

Middleman

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

OG Nerd

Knows Enough To Get In Trouble
Donator
AMD OS X Member
Joined
Dec 7, 2021
Messages
284
I had heard from two different person that they might have solved it by modding the bios and motherboard themselves, or maybe we are counting on the Opencore team.
Can you get them to elaborate on it a bit more? My legion 5 will be here tomorrow so I will be able to add to testing as well.
 

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Use this guy's EFI and modify it slightly according to the Monterey-EFI I shared. It is not recommended to install Ventura for the time being. Wireless card and sound card are invalid

 

Attachments

  • EFI-Ventura.zip
    5 MB · Views: 27
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.