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,177
@ExtremeXT It may be possible but not easy. Not sure if that would fix the issue though.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
@Shaneee Thanks for your input. I'm pretty sure it would fix it since that's where it panics, but I'm guessing that it's not worth the time.

On another note, this seems like what we need! (Image)

@zty199 Please try this EFI.

@craighazan Do you also have this laptop? If so can you test it?

- ExtremeXT
 

Attachments

  • Screenshot_10.png
    Screenshot_10.png
    12.4 KB · Views: 20
  • EFI.zip
    27.3 MB · Views: 13
Last edited:

zty199

New member
AMD OS X Member
Joined
Apr 15, 2022
Messages
20
@Shaneee Thanks for your input. I'm pretty sure it would fix it since that's where it panics, but I'm guessing that it's not worth the time.

On another note, this seems like what we need! (Image)

@zty199 Please try this EFI.

@craighazan Do you also have this laptop? If so can you test it?

- ExtremeXT
Seems to be the same panic with TSC_sync_margin=0
587C9A41B16852E4D159F0DDC8F63264.jpg
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
@zty199 Okay, test this new EFI. It includes a new kernel patch that should fully suppress/remove the panic. Credits to @Visual

- ExtremeXT
 

Attachments

  • EFI.zip
    27.3 MB · Views: 15

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
I have another PC, but it has been upgraded to Ventura 13.0 beta 5...... I need to downgrade to 12.6 first
Try setting FindMask to nothing (empty) in the TSC kernel patch. I'm not home right now so I cannot send a modified EFI.
 

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

Attachments

  • EFI.zip
    27.3 MB · Views: 11

zty199

New member
AMD OS X Member
Joined
Apr 15, 2022
Messages
20
Try setting FindMask to nothing (empty) in the TSC kernel patch. I'm not home right now so I cannot send a modified EFI.
Still got OC: Kernel patcher result 17 for kernel - Not Found
screenshot.jpg

BTW, I just install Monterey 12.6 on another PC in an external disk, and I got kernel log from Hackintool. Is this log what you need?
 

Attachments

  • kerneldump.txt
    851.2 KB · Views: 1

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
Still got OC: Kernel patcher result 17 for kernel - Not Found
View attachment 7276

BTW, I just install Monterey 12.6 on another PC in an external disk, and I got kernel log from Hackintool. Is this log what you need?
I need the kernel file from /System/Library/Kernels.

EDIT: Don't need it anymore, will send new EFI soon.

- ExtremeXT
 
Last edited:

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843
@zty199
Here's the new EFI, with a new kernel patch for Monterey 12.6 (old one was for Ventura as that was the only kernel I had on hand).
As before, credits to @Visual.
Good luck.

EDIT: I modified the EFI, if you already downloaded it re-download.

- ExtremeXT
 

Attachments

  • EFI.zip
    27.3 MB · Views: 25
Last edited:

ExtremeXT

Donator
Donator
Joined
Aug 7, 2022
Messages
843

Visual

New member
AMD OS X Member
Joined
Sep 18, 2022
Messages
3

Visual

New member
AMD OS X Member
Joined
Sep 18, 2022
Messages
3
@ExtremeXT is not home at this time, so I will just provide you the patch.
Duplicate one of my patches (Comment includes "Visual") and set
Base to _thread_invoke
Find to 492b9f800400000f825f010000
and
Replace to 492b9f80040000669066906690
and try again
Sorry, Base to _thread_dispatch, not _thread_invoke
 
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.