Project

General

Profile

Actions

Support #550

open

Help with dGPU integration with edk2 on W530

Added by Simon Dominic 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
08/09/2024
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Lenovo ThinkPad W530
Affected OS:

Description

I run Debian and Windows 11 on my corebooted Thinkpad W530 with edk2 payload. Until recently I was using SeabBIOS, which in my experience has been a lot simpler to set up and integrate the dGPU via vga bios. The dGPU is necessary to use external displays for the W530.

With a lot of help from Matt DeVillier, I made the switch to edk2 with this defconfig:

CONFIG_USE_OPTION_TABLE=y
CONFIG_VENDOR_LENOVO=y
CONFIG_CBFS_SIZE=0x300000
CONFIG_VGA_BIOS_DGPU_ID="10de,0ffc"
CONFIG_VGA_BIOS=y
CONFIG_IFD_BIN_PATH="descriptor.bin"
CONFIG_ME_BIN_PATH="me.bin"
CONFIG_GBE_BIN_PATH="gbe.bin"
CONFIG_VGA_BIOS_FILE="vgabios/8086,0166.rom"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_LENOVO_W530=y
CONFIG_HAVE_ME_BIN=y
CONFIG_USE_ME_CLEANER=y
CONFIG_HAVE_GBE_BIN=y
CONFIG_MAINBOARD_USE_LIBGFXINIT=y
CONFIG_VGA_BIOS_DGPU=y
CONFIG_VGA_BIOS_DGPU_FILE="vgabios/10de,0ffc.rom"
CONFIG_ELOG=y
CONFIG_PAYLOAD_EDK2=y
CONFIG_EDK2_BOOT_MANAGER_ESCAPE=y
CONFIG_EDK2_FOLLOW_BGRT_SPEC=y

If I set graphics initialization to "Run VGA Option ROMs", the system completely hangs and I get a white underscore. libgfxinit works.

With nvramtool. I can set hybrid_graphics_mode to "Dual Graphics". Interestingly, external displays is working on (Debian) Linux, but only detects the Intel iGPU. Specifically, even though I've chosen dual graphics, fastfetch only shows that one GPU, and not "GPU 1" and "GPU 2", and yet I get the functionality of the dGPU of external displays. On Windows, external display functionality doesn't work, and Windows Updates does not install Vulkan or Nvidia drivers like it did with the stock bios.

When I change hybrid_graphics_mode to "Discrete Only", I get a black screen on boot. This can be reversed by resetting the CMOS settings by disconnecting the CMOS battery, removing the battery and powering on with just the charger plugged in.

What can be done to have the dGPU actually properly detected (both Linux and Windows), and not cause black screen when selecting discrete graphics only?

No data to display

Actions

Also available in: Atom PDF