You are not logged in.

#1 2025-11-30 13:30:50

uint128_t
Member
Registered: 2025-11-30
Posts: 2

Attempting to use igpu as main display and discrete gpu for passthroug

Hi. I'm attempting to use the apu (integrated graphics) as the main display out and bind vfio to dgpu (discrete gpu (nvidia)). I have gotten this to work as long as a cable is only connected to apu (motherboard).

As soon as I connect a display cable to the dgpu the boot splash and initial boot messages are output on the dgpu up until password prompt for luks after which the content becomes static. I suspect that the vfio bindings are applied at this point. There is no output from the apu.

The reason for this setup is to have my desktop/host running on the apu and at request start a virtual machine with qemu with dgpu passthrough to support graphical applications.

Current setup is mkinitcpio + systemd boot. I have tried different combinations of modules, kernel arguments, blacklisting and edid overrides without any luck. The /etc/mkinitcpio.conf and systemd boot entry are appended below.

Integrated graphics have been explicit enabled in bios and configured to be prioritized the igpu over dgpu in bios plus the usual bios configuration to support passthrough. It should also be mentioned that both the apu and dgpu are connected to the same monitor.

Is it possible to configure the apu as the main display and leave dgpu available for passthough to a virtual machine?


```mkinitcpio
MODULES=(amdgpu vfio vfio_pci vfio_iommu_type1)
FILES=(/usr/lib/firmware/edid/apu_display.bin)
HOOKS=(base udev systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt filesystems fsck)
```

```systemd-boot
title arch linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options rd.luks.name={UUID}=cryptroot root=/dev/mapper/cryptroot rw iommu=pt rd.driver.pre=vfio-pci vfio-pci.ids=10de:1f02,10de:10f9 modprobe.blacklist=nouveau video=HDMI-A-1:e drm.edid_firmware=HDMI-A-1:edid/apu_display.bin
```

Last edited by uint128_t (2025-11-30 13:32:45)

Offline

#2 2025-11-30 18:09:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,586

Re: Attempting to use igpu as main display and discrete gpu for passthroug

Remove the kms hook, optionally add amdpu(?) to the modules array.
Also see the table in https://wiki.archlinux.org/title/Mkinit … mmon_hooks - you've some overlapping hooks there.

On a formal note, please use [code][/code] tags - the BBS predates markdown by approximately your age.

Online

#3 2025-12-04 17:34:17

uint128_t
Member
Registered: 2025-11-30
Posts: 2

Re: Attempting to use igpu as main display and discrete gpu for passthroug

Thank you for the response. I have reviewed the mkinitcpio wiki page and adjusted hooks and modules in /etc/mkinitcpio.conf on best effort.

After a few more attempts at this (combinations of reinstalling arch, resetting bios and switching to grub) I noticed that with CMS enabled and igpu configured as the primary display then the system booted with display output on the igpu.

However, if I disable CMS in the bios then system booted with display output on the dgpu ignoring the primary display setting in the bios and any combination of kernel arguments that I could find.

Unfortunately, leaving CSM enabled disables secure boot plus other features in the bios.

I'm unsure if my lack of understanding of the boot sequence, bios, firmware, specifications or combination of hardware are preventing me from achieving this. I will probably try to find a more standard approach as an alternative.

Offline

#4 2025-12-04 20:33:58

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,586

Re: Attempting to use igpu as main display and discrete gpu for passthroug

adjusted hooks and modules in /etc/mkinitcpio.conf on best effort

Please post the file and your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

for a boot w/ CSM disabled

more standard approach as an alternative

More standard than https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF ?

Online

Board footer

Powered by FluxBB