[SOLVED] PCI passthrough fails when HDMI display used

dethegeek

Member
Oct 16, 2011
5
0
21
Hi

I'm setting up a virtual machine with a Nvidia GeForce 710 card.

A first try using the guide in the wiki succeeded with a VGA or / and DVI display. (reference : https://pve.proxmox.com/wiki/Pci_passthrough )

If I attempt to start the VM with a HDMI and/or DVI display the VM no longer send signal to my display a few seconds after the VM loaded the kernel. This happens way before Xorg loads, and I can avoid the issue with the kernel setting "nomodeset", but I can no longer use a descent resolution.

The VM idoes not crash or freeze : i can login and interact using SSH.

I think there is an issue with the pci passthrough because the HDMI audio card is not available in the VM, and the problem occurs only if I connect a HDMI display.

Code:
# lspci -k in the VM
(snip)
01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 710B] (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. GK208 [GeForce GT 710B]
    Kernel driver in use: nouveau
    Kernel modules: nouveau
(snip)
despite the host's settings

Code:
# lspci -k
(snip)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 128b (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. Device 5360
    Kernel driver in use: vfio-pci
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. Device 5360
    Kernel driver in use: vfio-pci
(snip)
Here is my VM configuration

Code:
agent: 1
bios: ovmf
bootdisk: scsi0
cores: 4
cpu: host
hostpci0: 01:00,pcie=1,x-vga=on
ide2: file=none,media=cdrom
machine: q35
memory: 4096
name: srv-pdi-01
net0: e1000=36:31:34:37:32:61,bridge=vmbr0
numa: 0
ostype: l26
smbios1: uuid=81134b13-b292-416a-b898-f77bc1f6a94c
sockets: 1
usb0: host=1631:5000
usb1: host=046d:c016
virtio0: file=local:108/vm-108-disk-1.qcow2,size=64G

What do you suggest to allow normal operation with HDMI ?
 
Last edited:
Hi

I fixed a typo in the config

Code:
hostpci0: 01:00.0,pcie=1,x-vga=on

is actually

Code:
hostpci0: 01:00,pcie=1,x-vga=on

(the first one was from a try to setup 2 passthrough : one per function of my graphic card.)

After many tries with various settings and also using args:

I found HDMI works fine only if I connect the HDMI monitor after guest's lightdm service started. I did not tried to plug the monitor earlier in the boot process.

I also notice the HDMI controller is stil not available in the guest.

I managed to show it only by configuring the passthrough with the following :

Code:
argd: -vga none -device vfio-pci,host=01:00.0,bus=pcie.0,addr=01.0,multifunction=on,x-vga=on -device vfio-pci,host=01:00.1,bus=pcie.0,addr=01.1
 
Hi

My issue seems to be related to Nouveau, and not to PCI passthrough.

Configuring the guest's OS to use Nvidia proprietary drivers instead Nouveau solved the issue.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!