Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI PRO Z790-P dGPU with Dasharo (coreboot+heads) variant #794

Open
KurtFuchs opened this issue Apr 17, 2024 · 8 comments
Open

MSI PRO Z790-P dGPU with Dasharo (coreboot+heads) variant #794

KurtFuchs opened this issue Apr 17, 2024 · 8 comments

Comments

@KurtFuchs
Copy link

Dasharo version
0.9.0

Dasharo variant
(coreboot+heads) for Desktop (MSI)

Question text
I own a Dasharo Entry Subscription for the EDK Variant and yesterday i wanted to try the heads variant. I compiled the version 0.9.0 from source and flashed using FlashBIOS. The computer boots and works fine, but i can't get a dGPU to display an output, even if i'm booted into an OS (Linux).The dGPU won't even show up in a lspci. The IGP works flawless. Is there a way to enable/support a dGPU? I researched online and found some discussion regarding heads and a dGPU in a T430, but without a definit answer.

@miczyg1
Copy link
Contributor

miczyg1 commented Apr 17, 2024

@KurtFuchs dGPU will be a problem with heads, at least during boot. One can either have an iGPU or dGPU working with a heads variant; each of them would require separate builds. That said, the kexec'ed Linux should be able to initialize the graphics.

Could you please provide the log from coreboot's cbmem utility? https://docs.dasharo.com/common-coreboot-docs/dumping_logs/

It should possibly help us get the answer why the graphics does not show up in OS.

@KurtFuchs
Copy link
Author

Thank you for the quick answer. I reflashed heads and cleared CMOS and got the dGPU to show up with lspci. But still can't get a Display Output on it. The log is attached
cbmem.log

dGPU will be a problem with heads, at least during boot. One can either have an iGPU or dGPU working with a heads variant; each of them would require separate builds.

That would be fine for me, i prefer the more powerful one :)

@miczyg1
Copy link
Contributor

miczyg1 commented Apr 19, 2024

Thank you for the quick answer. I reflashed heads and cleared CMOS and got the dGPU to show up with lspci. But still can't get a Display Output on it. The log is attached cbmem.log

Right now nothing suspicious in the log, especially that the dGPU showed up, indeed.

dGPU will be a problem with heads, at least during boot. One can either have an iGPU or dGPU working with a heads variant; each of them would require separate builds.

That would be fine for me, i prefer the more powerful one :)

You may try rebuilding heads with a changed config to run VGA OptionROMs, but note it is not recommended to run any external executables with heads for security reasons.

To try dGPU initialization, the config should have the following:

#
# Devices
#
CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
CONFIG_HAVE_FSP_GOP=y
CONFIG_VGA_ROM_RUN=y
# CONFIG_RUN_FSP_GOP is not set
# CONFIG_NO_GFX_INIT is not set
CONFIG_NO_EARLY_GFX_INIT=y
CONFIG_ON_DEVICE_ROM_LOAD=y
CONFIG_PCI_OPTION_ROM_RUN_REALMODE=y
# CONFIG_PCI_OPTION_ROM_RUN_YABEL is not set

#
# Display
#
# CONFIG_FRAMEBUFFER_SET_VESA_MODE is not set
CONFIG_VGA_TEXT_FRAMEBUFFER=y
# end of Display

Depending on your board it should be either
https://github.com/Dasharo/heads/blob/master/config/coreboot-msi_z790p_ddr4.config for DDR4 variant OR
https://github.com/Dasharo/heads/blob/master/config/coreboot-msi_z790p_ddr5.config for DDR5 variant. Simply put the above fragment in the same place in the config.

@KurtFuchs
Copy link
Author

KurtFuchs commented Apr 19, 2024

This seems to work, atleast for the recovery shell. But gui-init won't start with the error:
IMG_20240419_190037_785
IMG_20240419_190053_517

I will try to boot a linux distro and attach the cbmem log shortly, as i couldn't get the recovery shell to detect usb drives to save the cbmem log from within the shell.

As i use 3 Displays, i'm thinking about buying a USB-C to DP/HDMI Adapter for Display output from the Intel iGPU and just use the dGPU as accelerator for some python applications. That would fix most issues i think.

EDIT:
I figured the cbmem log woulnd't help with the second issue.
One error that also pops up is Framebuffer: No such device.
I guess the GUI does not find a usable GPU when ROM loading is set and the dGPU gets initialised within heads.

I just researched the specs of the MSI Z790P and found out, that it does not support USB-C Alt mode.

Having some time constraints right now and needing my Computer on a daily basis, i decided to switch back to the EDKII variant, for now at least. Although i would love to come back later to heads.

@miczyg1
Copy link
Contributor

miczyg1 commented Apr 22, 2024

Ahh yes, you would need to configure VESA framebuffer instead of VGA text mode:

CONFIG_FRAMEBUFFER_SET_VESA_MODE=?
# CONFIG_VGA_TEXT_FRAMEBUFFER is not set

You would have to find the right VESA mode hexcode you want to have and put that in config. Then a framebuffer will appear.

@KurtFuchs
Copy link
Author

KurtFuchs commented Apr 26, 2024

You would have to find the right VESA mode hexcode you want to have and put that in config. Then a framebuffer will appear.

Thanks for the answer.
I tried it with

#
# Devices
#
CONFIG_HAVE_FSP_GOP=y
CONFIG_VGA_ROM_RUN=y
# CONFIG_RUN_FSP_GOP is not set
# CONFIG_NO_GFX_INIT is not set
CONFIG_NO_EARLY_GFX_INIT=y
CONFIG_ON_DEVICE_ROM_LOAD=y
CONFIG_PCI_OPTION_ROM_RUN_REALMODE=y
# CONFIG_PCI_OPTION_ROM_RUN_YABEL is not set

#
# Display
#
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
#CONFIG_FRAMEBUFFER_VESA_MODE=0x11F
CONFIG_FRAMEBUFFER_VESA_MODE=0x11B
# CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y
# CONFIG_VGA_TEXT_FRAMEBUFFER is not set
# end of Display

I tried several different VESA Modes (Standardized ones and non standard ones).
I also tried
CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y
Sadly couldn't get the GUI to display. Still get the same error that no usable screen was found.

@macpijan
Copy link
Contributor

Relevant MR: Dasharo/heads#9

@macpijan
Copy link
Contributor

@BeataZdunczyk this should go to heads milestone for MSI (I see none).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants