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

ser63

New member
AMD OS X Member
Joined
May 13, 2023
Messages
12
After seeing that you updated EFI, I also re-installed it, and found that the touchpad could work normally. I also bought a network card "AX210" with the same configuration as yours online after I just arrived today and tried it, and it worked normally. However, I seem to find something wrong with the 3.5mm audio interface, and the sound is not normal. I don't know if it is only my computer that has this situation, here is the feedback. It is very impressive that this notebook has been deciphered to this extent by all of you. Thank you for your efforts here.
my notebook same have not working touchpad, Lenovo Legion 5 15ACH6A 5600h version with @ExtremeXT config from github
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
After seeing that you updated EFI, I also re-installed it, and found that the touchpad could work normally. I also bought a network card "AX210" with the same configuration as yours online after I just arrived today and tried it, and it worked normally. However, I seem to find something wrong with the 3.5mm audio interface, and the sound is not normal. I don't know if it is only my computer that has this situation, here is the feedback. It is very impressive that this notebook has been deciphered to this extent by all of you. Thank you for your efforts here.
I downgraded the AppleALC kext to version 1.8.0 and now it is working normally.
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
sonoma-test1.jpg

Testing macOS Sonoma 14.0 Beta 1 (23A5257q) on Legion with 5600H and RX 6600M.

Tested and working:

  • Trackpad
  • Wifi (with Itlwm 2.2.0) and Heliport (worked only with my 2.4Ghz network)
  • Sound (with AppleALC 1.8.3, including normal P2 output - headphones)
  • HEVC encode/decode (checked with Videoproc)
  • Apple+ TV

Some details:

  • Same Base EFI as last from zxc2689963 (SMBIOS MacBookPro15,2)
  • Updated for Opencore 0.9.2 / Lilu 1.6.6 / RestrictEvents 1.1.2 / VirtualSMC 1.3.2
- Updated AMD patches: https://github.com/AMD-OSX/AMD_Vanilla
- Using boot-arg cpus=1 (thanks ExtremeXT), while not updated TSC patches

About Sleep in Sonoma:

The system no longer resets when put into sleep, it tries to sleep, but soon the keyboard lights up again (screen remains off and only comes back with a touch on the keyboard/trackpad).

The funny thing is that in the log, a message indicates the cause as the XHC1 controller, which we disabled via UMAF!

kernel: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XHC1

----------

System running as stable as possible (cpus=1 makes it slow), but I haven't identified any annoying bug yet.
 

gj2600

New member
AMD OS X Member
Joined
Jun 11, 2023
Messages
3
This is the EFI I'm using, streamlining some unnecessary Settings and improving stability
  • Only Ventura 13.3+ is supported
Hello,
I have just tried to test this EFI on my Legion 5 Pro (16ACH6H with 5800H and RTX 3060), but I made some modifications to it to instead use NootedRed for iGPU support and remove the 6600M GPU support/patching (since my laptop does not have this GPU, I am hoping to disable the NVIDIA graphics and just use NootedRed with the iGPU for graphics acceleration), however I cannot get it to boot to the macOS 13.4 installer. I have also disabled XHC1 using UAFB. I've attached an image to this post of where it gets stuck while booting, sorry if the image is a little blurry however if you zoom in it should be readable.
 

Attachments

  • PXL_20230612_051521790.jpg
    PXL_20230612_051521790.jpg
    1.6 MB · Views: 34

zxc2689963

Active member
AMD OS X Member
Joined
Feb 27, 2022
Messages
135
Hello,
I have just tried to test this EFI on my Legion 5 Pro (16ACH6H with 5800H and RTX 3060), but I made some modifications to it to instead use NootedRed for iGPU support and remove the 6600M GPU support/patching (since my laptop does not have this GPU, I am hoping to disable the NVIDIA graphics and just use NootedRed with the iGPU for graphics acceleration), however I cannot get it to boot to the macOS 13.4 installer. I have also disabled XHC1 using UAFB. I've attached an image to this post of where it gets stuck while booting, sorry if the image is a little blurry however if you zoom in it should be readable.
I remember using NootedRed, the model needs to be set to SMBIOS MacBookPro16,3 MacPro 7.1, and NootedRed must be canceled first when installing
 

gj2600

New member
AMD OS X Member
Joined
Jun 11, 2023
Messages
3
I remember using NootedRed, the model needs to be set to SMBIOS MacBookPro16,3 MacPro 7.1, and NootedRed must be canceled first when installing
Thank you for your reply, I will try it, what do you mean by "NootedRed must be canceled first when installing"? Do you mean when I am installing macOS to not include the kext, then add the kext to my EFI folder after macOS has been installed?
 

gj2600

New member
AMD OS X Member
Joined
Jun 11, 2023
Messages
3
I found out why the system was getting stuck while booting, it was because I was using the debug Catalina branch of NootedRed which obviously isn't compatible with Ventura 😅 after switching to the master branch version, I was able to get macOS 13.4 installed successfully (although I still had to not include the kext during the install process) however unfortunately NootedRed will still not work for me. I have the two SSDTs added from the NR repo as well as SMCLightSensor (since the Legion 5 Pro does not have an ambient light sensor) and although macOS boots, I do not get a display output and instead just get a black screen with the backlight flickering. By removing/disabling the kext and related SSDTs, the system boots with display output however with no graphics acceleration which is to be expected. From my understanding this is currently a known issue with NR, due to eDP link training failing so I will just have to hope they can fix it.
 

Jo-Toku

Donator
Donator
AMD OS X Member
Joined
Dec 29, 2021
Messages
234
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

EFI has been uploaded to Github





Note: The Github Link is broken
 

zljjjjjj

Member
AMD OS X Member
Joined
Jun 3, 2022
Messages
40
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

2023-7-22 Update EFI, due to the invalidation on github, this EFI has the latest Remove non-monotonic patch, support for macOS Sonoma


Must do:
Download the Universal AMD Form Browser and go to the advanced BIOS to disable an XHC1

View attachment 11401

Cannot be used:
1. An XHC1 is disabled, the USB on the left and right sides cannot be used, and the Bluetooth related to XHC1 cannot be used, the specific reason is unknown
2. System hibernation is not normal,Waking up will restart the system
3. The microphone is unavailable
4. Brightness adjustment cannot be used,Requires adjustment with MonitorControlLite software

hi
 

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35

kalkmann

Member
AMD OS X Member
Joined
Nov 18, 2020
Messages
35
USB Kext solution:


Tested with Ventura 13.4.1 and 13.5, kext enables all USB ports, with both controllers enabled (kext is an fork/update from GenericUSBXHCI).

258947451-2a8346c7-6664-4be7-8120-8e0221bfc06b.jpg
 
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.