ChefKissInc / NootedRed

The AMD Vega iGPU support patch kext. No commercial use.
https://chefkissinc.github.io/applehax/nootedred/
Other
1.66k stars 806 forks source link

(e)DP doesn't work on some systems #52

Closed STEFnr1 closed 11 months ago

STEFnr1 commented 1 year ago

Describe the bug The system boots with the internal display dysfunctional. Upon inspection of the kernel dmesg, it is clear that the issue is that the link training failed.

To Reproduce Exact reproduction environment unknown

Expected behavior Display turns off then back on, with the Apple logo visible on screen.

Screenshots -Picture of black screen here-

System Information:

Additional context Related dmesg: http://0x0.st/H-i5.txt

ASSERT FAILED : result == DDC_RESULT_SUCESSFULL.
ASSERT LOCATION : void dp_set_panel_mode(struct dc_link *, enum dp_panel_mode) :: /Volumes/Code/p4/GoldenG/OpenGL/GLBuild/AmdRadeonLibraries/src/Latest/core/dal/dc/core/dc_link_dp.c:5062 .
[5:0:0] [DAL][EVENT][link:0] >>> type:"Link Training End", status: FAIL, lane_status: 0.
[5:0:0] [DAL][EVENT][link:0] <<< type:"Link Training End", err: kIOReturnSuccess.
VisualEhrmanntraut commented 1 year ago

@STEFnr1 This issue is known internally, but we don’t know the cause yet.

This may be cause by the fact that in Linux the main display driver is the NVIDIA GTX 1650

Proof? Have you tried disabling the dGPU to see if that’s actually the case?

STEFnr1 commented 1 year ago

Disabled dGPU, but even with the dGPU enabled it still turns off the display. I know the fact that the issue is known, but it's better to have track of issues in one place.

VisualEhrmanntraut commented 1 year ago

@STEFnr1 I meant on linux

STEFnr1 commented 1 year ago

I'm not a pro in Linux. How do I do that? I am booting using the live environment (or however you write it xD)

VisualEhrmanntraut commented 1 year ago

@STEFnr1 I’m not a linux user either…sooooo

VisualEhrmanntraut commented 1 year ago

Also, I think there is an instance of this issue on someone with no dGPU, it might be some kind of edge case not implemented in AMDRadeonX6000Framebuffer (it is essentially a macOS port of Display Core like in Linux, so comparing the logic is mostly trivial)

jalavoui commented 1 year ago

in opencore - device properties- add the nvidia to the list and use "disable-gpu = YES". This will work in os x only.

idk if this is an issue with dual gpu systems. On my desktop i have to hack info.plist (move the Drivers section up 1 level)

I actually enjoy this approach, loading the Drivers not directly in iokitpersonalities might allow fix the driver loading in recovery mode as no AMDRadeonX5000HWServices exists. but i always end up hacking this :(

i noticed also that messing in bios with dual gpu mode will break windows drivers (need to delete and reinstall). in osx delete /var/db/.com.apple.iokit.graphics. In linux, as usual no issues.

the best setup i have is dual gpu enabled in bios and os x disable flag in opencore. you can try the info.plist i use (its in insanlymac thread)

STEFnr1 commented 1 year ago

in opencore - device properties- add the nvidia to the list and use "disable-gpu = YES". This will work in os x only.

What does the disable-gpu line need to be? String, boolean?

ExtremeXT commented 1 year ago

@STEFnr1 Boolean.

VisualEhrmanntraut commented 1 year ago

You can just put -wegnoegpu in your boot args. But that's not gonna help with the link training issue.

STEFnr1 commented 1 year ago

20230525_001112 Without NRed, the integrated display is detected, so the other display is maybe one emulated by NVIDIA..?

jalavoui commented 1 year ago

can you do a test? - this works on big sur only goto opencore and add your nvidia card to devices. add disable-gpu property and reboot check you no longer have nvida card visible (this is important)

in terminal type: sudo rm /private/var/db/.com.apple.iokit.graphics install NootedRed.kext replace the NootedRed.kext/Contents/info.plist with this one (unzip it first) Info.plist.zip

this is disable gpu sample (your path wont be the same) Captura de ecrã 2023-05-26, às 12 27 32

STEFnr1 commented 1 year ago

Still no display

VisualEhrmanntraut commented 1 year ago

@jalavoui Like I said in https://github.com/NootInc/NootedRed/issues/52#issuecomment-1556293515, there's someone without a dGPU, and experiencing the same issue. The black screen is because of an error caused while doing the link training, as per the title

VisualEhrmanntraut commented 1 year ago

Related dmesg: http://0x0.st/H-i5.txt

ASSERT FAILED : result == DDC_RESULT_SUCESSFULL.
ASSERT LOCATION : void dp_set_panel_mode(struct dc_link *, enum dp_panel_mode) :: /Volumes/Code/p4/GoldenG/OpenGL/GLBuild/AmdRadeonLibraries/src/Latest/core/dal/dc/core/dc_link_dp.c:5062 .
[5:0:0] [DAL][EVENT][link:0] >>> type:"Link Training End", status: FAIL, lane_status: 0.
[5:0:0] [DAL][EVENT][link:0] <<< type:"Link Training End", err: kIOReturnSuccess.
Alex-Zhangzhipeng commented 1 year ago

if i use HDMI or type c,it will be ok. But if i use DP, there will be a backlight, even when i use imac20,1 as smbios. The situation is not similar to use Macpro7,1 , it will show apple sign ,then be black . If it is HDMI , after 3 seconds , i can see the image ,but if i use DP , it will show no signal.

Alex-Zhangzhipeng commented 1 year ago

Now, something strange really happen. I plugged in both video connectors, and the DP interface showed that the secondary screen lit up successfully. After sleeping, I unplugged the HDMI, and after waking up, DP can still be used.

image

@ChefKissInc

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng Another user on our Telegram group reported this too. It’s good to know it’s consistent at the very least

Alex-Zhangzhipeng commented 1 year ago

Now I reboot , and the DP is still fine , what a good news!

截屏2023-06-20 15 56 22

@ChefKissInc

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng Do a cold boot

Alex-Zhangzhipeng commented 1 year ago

ok, I will try. @ChefKissInc

Alex-Zhangzhipeng commented 1 year ago

I shut down my computer. And unplugged the power supply and plugged it back in. Then I even use reset nvram, and the DP is still OK! @ChefKissInc

image
VisualEhrmanntraut commented 1 year ago

What if you boot into another OS first?

Alex-Zhangzhipeng commented 1 year ago

i will try 2 situations,just wait a little @ChefKissInc

Alex-Zhangzhipeng commented 1 year ago

Whether it is re-entering from the BIOS or selecting in the OC interface, the screen will not be displayed. @ChefKissInc

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng Sorry, I didn’t get that. Could you rephrase?

Alex-Zhangzhipeng commented 1 year ago

emmmm , sorry English is not my first language. At first , I change the boot device in the bios to start the windows. Then I use OpenCore to start windows. Both of these, make my computer display a black screen @ChefKissInc

Alex-Zhangzhipeng commented 1 year ago

Or it's better to use picture to explain it, haha.. 5a7c6412862721d02ff6415eb4076386 961d20aea25ffc5a72245b40e2fe3cf6

d9fdd6c20e9657aa5ae51adbf75e73b3

VisualEhrmanntraut commented 1 year ago

So Windows has a black screen now?

Alex-Zhangzhipeng commented 1 year ago

no, window is good , but when I return to Mac , Mac is black.

Alex-Zhangzhipeng commented 1 year ago

@ChefKissInc , my poor English ,sorry.

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng Alright. Install the DebugEnhancer kext along with adding -nreddbg to your boot args. Then, do the trick that gets macOS to display an image on your internal display. Finally, open the terminal and run the following 2 commands:

sudo /System/Library/Extensions/AppleGraphicsControl.kext/Contents/MacOS/AGDCDiagnose | curl --progress-bar -Ffile=@- https://0x0.st
sudo dmesg | curl --progress-bar -Ffile=@- https://0x0.st

And send the link outputted by each command over here

Alex-Zhangzhipeng commented 1 year ago

Ok, i will try these , should i use DP only? or i use DMI or both?@ChefKissInc

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng "Then, do the trick that gets macOS to display an image on your internal display”

Alex-Zhangzhipeng commented 1 year ago

sorry , maybe I misunderstand it , my pc is not a laptop @ChefKissInc cd9aacc5c7492c576beb93d6525befc0

VisualEhrmanntraut commented 1 year ago

@Alex-Zhangzhipeng So it’s just normal DisplayPort with the issue? Then the same thing but with your DisplayPort display working

Alex-Zhangzhipeng commented 1 year ago

sorry,I cannot understand it , my issue is that my DisplayPort cannot work fine when I change Windows to MacOS(windows is ok). HDMI is perfectly fine, DispalyPort is not. @ChefKissInc

jalavoui commented 1 year ago

your dsdt.aml might be bugged remove nootedred, boot os x with the display you wanna use and create a new dsdt.aml if windows fail you might need to delete gpu drivers and reinstall. i got this bug some time ago when i was playing with bios settings do not boot from bios menu - always use opencore idk if this user issue is a driver problem - maybe just bad config options nvm he just said its a dp connector issue

VisualEhrmanntraut commented 1 year ago

@jalavoui what

ghost commented 1 year ago

Hello i have the same laptop

ghost commented 1 year ago

I installed sucessfully in Monterey with ASUS TUF GAMING FX505DT

Works after the installation . First i installed the OS without the kext, and in the post installation i downloaded the kext and works.

STEFnr1 commented 1 year ago

I installed sucessfully in Monterey with ASUS TUF GAMING FX505DT

Works after the installation . First i installed the OS without the kext, and in the post installation i downloaded the kext and works.

Hello. Do you have the model with Ryzen 7? If yes, how did you make it work?

ghost commented 1 year ago

I installed sucessfully in Monterey with ASUS TUF GAMING FX505DT Works after the installation . First i installed the OS without the kext, and in the post installation i downloaded the kext and works.

Hello. Do you have the model with Ryzen 7? If yes, how did you make it work? Yes i have Ryzen 7 3570H with AMD Vega 10 too.

First I have installed macOS Monterey without the kext NootedRed once installed I have enabled the kext with the config.plist Then restart the laptop and enable Secure Boot apply the changes in the BIOS when it reboots, disable Secure Boot again (This will enable the AMD GOP driver since if the Unknown Driver appears it could not continue loading the system) (I think that this thing that I have discovered disables the CSM) Make sure that the SMBIOS is MacBookPro16,3 otherwise the screen will be black.

If everything went well, when the system loads the screen will go black in a few seconds and then the apple will appear as a result the internal graphics will be running.

I recommend change Framebuffer to 512M to Auto (this increase to 2GB VRAM) for better experience.

truongvantuan commented 1 year ago

I installed sucessfully in Monterey with ASUS TUF GAMING FX505DT

Works after the installation . First i installed the OS without the kext, and in the post installation i downloaded the kext and works.

Hello. Do you have the model with Ryzen 7? If yes, how did you make it work?

Yes i have Ryzen 7 3570H with AMD Vega 10 too.

First I have installed macOS Monterey without the kext NootedRed once installed I have enabled the kext with the config.plist

Then restart the laptop and enable Secure Boot apply the changes in the BIOS when it reboots, disable Secure Boot again (This will enable the AMD GOP driver since if the Unknown Driver appears it could not continue loading the system) (I think that this thing that I have discovered disables the CSM) Make sure that the SMBIOS is MacBookPro16,3 otherwise the screen will be black.

If everything went well, when the system loads the screen will go black in a few seconds and then the apple will appear as a result the internal graphics will be running.

I recommend change Framebuffer to 512M to Auto (this increase to 2GB VRAM) for better experience.

VRAM set to Auto, then we can get 2GB vram? Is it possible?

ghost commented 1 year ago

I tested and now i have 2GB

STEFnr1 commented 1 year ago

I installed sucessfully in Monterey with ASUS TUF GAMING FX505DT

Works after the installation . First i installed the OS without the kext, and in the post installation i downloaded the kext and works.

Hello. Do you have the model with Ryzen 7? If yes, how did you make it work?

Yes i have Ryzen 7 3570H with AMD Vega 10 too. First I have installed macOS Monterey without the kext NootedRed once installed I have enabled the kext with the config.plist Then restart the laptop and enable Secure Boot apply the changes in the BIOS when it reboots, disable Secure Boot again (This will enable the AMD GOP driver since if the Unknown Driver appears it could not continue loading the system) (I think that this thing that I have discovered disables the CSM) Make sure that the SMBIOS is MacBookPro16,3 otherwise the screen will be black. If everything went well, when the system loads the screen will go black in a few seconds and then the apple will appear as a result the internal graphics will be running. I recommend change Framebuffer to 512M to Auto (this increase to 2GB VRAM) for better experience.

VRAM set to Auto, then we can get 2GB vram? Is it possible?

Can confirm this is true. Setting the setting for the iGPU in BIOS to Auto makes the iGPU have 2GB of VRAM upon boot.

truongvantuan commented 1 year ago

I tested and now i have 2GB

I have set Auto but just got 512MB VRAM, thanks bro

ghost commented 1 year ago

I tested and now i have 2GB

I have set Auto but just got 512MB VRAM, thanks bro

Captura de pantalla 2023-07-15 a las 23 30 30

VisualEhrmanntraut commented 1 year ago

Additional information: The macOS kexts seemingly were based on Linux 5.12. However, we had one of the people run Linux 5.0, and that worked fine. We are even more lost than before :/

VisualEhrmanntraut commented 11 months ago

Caveat: Recovery still gets a black screen. Main OS works fine though.