[SOLVED] NVIDIA GPU passtrough issues

sirkope

Member
May 2, 2020
58
1
8
52
Hi all,

I need help configuring my linux vm-s to use my GeForce Gt 710 card:

I've folloved a lots of guides, but it seems, that my linux vm-s not use the NVIDIA GPU:

glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 128 bits)

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04)
00:10.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)

my config:

/etc/pve/qemu-server/102.conf

agent: 1
audio0: device=ich9-intel-hda,driver=spice
bootdisk: virtio0
cores: 4
hostpci0: 01:00,x-vga=on
memory: 6144
name: ArchLinux
net0: virtio=42:9A:26:EB:81:55,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=5f2e123d-6328-44b0-ae0d-dc7a1c542cc5
sockets: 1
vga: qxl
virtio0: BigData:vm-102-disk-0,cache=writeback,size=150G

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:eek:ff,efifb:eek:ff"

/etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

/etc/modprobe.d/iommu_unsafe_interrupts.conf
options vfio_iommu_type1 allow_unsafe_interrupts=1

/etc/modprobe.d/kvm.conf
options kvm ignore_msrs=1

/etc/modprobe.d/blacklist.conf
blacklist radeon
blacklist nouveau
blacklist nvidia

/etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:128b,10de:0e0f disable_vga=1
 
Well, I spent another day for configuring, this time, I've tried a Win10 VM.

First I realised that probably with SeaBios it won't work.
So I convert my disk from Legacy to UEFI with this tool:

powershell in admin mode

mbr2gpt /validate /allowFullOS
mbr2gpt /convert /disk:0 /allowFullOS

then, I also put the card into the second pci-e slot (it may help against rom shadowing)

I chamge my settings:

agent: 1
bios: ovmf
boot: cdn
bootdisk: virtio1
cores: 4
hostpci0: 01:00,pcie=1,romfile=GT710.bin
machine: q35
memory: 6144
name: Windows10
net0: virtio=42:E8:57:C5:38:10,bridge=vmbr0
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=5a72c8fc-c42f-4030-bd49-85f0e6662e3d
sockets: 1
vga: std
virtio1: BigData:vm-100-disk-0,cache=writeback,size=120G
vmgenid: 4c54e00a-3f82-4c16-bf75-ea7c76b72122

Now I've stucked in a 800x600 resolution (the resolution line is gray), with a stopped card by windows with error code 43, and audio also not work

Any idea? It could work this way anyhow, or need a complette reinstall?
 
crashed vga bios

nouveau fifo: sched_error 20

Valid ROM signature found @0h, PCIR offset 190h
PCIR: type 0 (x86 PC-AT), vendor: 10de, device: 128b, class: 030000
PCIR: revision 0, vendor revision: 1
Error, ran off the end

if i put pci card to harware config BEFORE install a new system, the boot crashed.
I saw a message for a sec some nouveau triggering before the sched error fload
 
Last edited:
I've made a new install with UEFI bios

agent: 1
bios: ovmf
bootdisk: virtio0
cores: 4
efidisk0: BigData:vm-104-disk-1,size=4M
hostpci0: 01:00,pcie=1,x-vga=on,romfile=181045.rom
machine: q35
memory: 6144
name: ArchLinuxUEFI
net0: virtio=EE:7E:62:8D:F0:27,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=bc4f1b74-faa6-493b-a0e9-1e873a5b189d
sockets: 1
vga: std
virtio0: BigData:vm-104-disk-0,cache=writeback,size=150G
vmgenid: 93d700d5-5397-400b-9229-c19346ce367

But no audio/GPU acceleration.

What did I miss?
 
While it arrives I try to patch NVIDIA driver.
Other possibility to change hv_vendor somehow to avoid NVIDIA installer detecting virtualised environment.
 
I'm stuck with patching:

Certificate Path: C:\TestSign.cer
Certificate Found In Root Store
[+] Signing Catalog File
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name,
a script block, or a CommandInfo object.
At C:\patcher.ps1:156 char:3
+ & $signtool sign /v /n SKSoftware /t http://timestamp.verisign.com/sc ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidOperation: :)String) [], RuntimeException
+ FullyQualifiedErrorId : BadExpression

The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name,
a script block, or a CommandInfo object.
At C:\patcher.ps1:157 char:3
+ & $signtool sign /v /n SKSOftware /t http://timestamp.verisign.com/sc ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidOperation: :)String) [], RuntimeException
+ FullyQualifiedErrorId : BadExpression

PS C:\>
 
hi, if you want to passthrough an nvidia card to windows, you have to either use
ostype: win10
hostpciX: XX:XX,x-vga=on

or use the hv-vendor-id option of the cpu line (see man qm)
e.g.
cpu: host,hv-vendor-id=something
 
A few things still confusing:
- should I have to enable onboard GPU (i5 2400) or not? I've read somewhere, that one GPU is needed for Proxmox also.
- x-vga=on or x-vga=1?
- rom file should be *.bin or *.rom ?
- Which Remote Dessktop software are you suggest? I've tried X2Go, Veyon, x11vnc, Tigthvnc, Tigervnc, XRDP in Linux vm-s, all have issues.
- It seems XRDP is ok
 
Last edited:
@sirkope

Nvidia & Error 43:

See https://wiki.archlinux.org/index.ph..._load.22_on_Nvidia_GPUs_passed_to_Windows_VMs

Sound & GPU Passthrough:

Never got it to work correctly and I've never invested a lot of time and effort - now I use a USB sound card for €10.
Still to mention, this introduces a noticable lag between video and sound - but, hey, the is earth is still flat ;)

Proxmox without any Video:
works great!
I'm using two Radeon 290x Vapor Tri and passing them to a Win10 and a linux mint 19.3 without any probs.
POST and boot screen is shown on the first GPU until Proxmox Kernels blacklist the radeon driver.
No IGP and no monitor loop devices for my GPUs - but I think I remember that there was once a day i read about necessary monitor lopping but this was in another life ...

(GPU) Passthrough:
I read and tried a LOT - best sources for me (BTW, THX if some page owner I link is reading this)
1. https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/
2. https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/
3. https://www.youtube.com/watch?v=DHpkD5N6HC0
4. unicks.eu, Arch Wiki, Proxmox Wiki

Always understand what you are trying to achive so you can transfer your knowledge between kvm/qemu, libvirt, proxmox

Your welcome to ask more questions!
Garfield
 

I don't get this virsh edit command, I should install something for it on pve?

@sirkope
Sound & GPU Passthrough:
Never got it to work correctly and I've never invested a lot of time and effort - now I use a USB sound card for €10.
Still to mention, this introduces a noticable lag between video and sound - but, hey, the is earth is still flat ;)

Nah, I won't buy one :)

@sirkope
Proxmox without any Video:
works great!
I'm using two Radeon 290x Vapor Tri and passing them to a Win10 and a linux mint 19.3 without any probs.
POST and boot screen is shown on the first GPU until Proxmox Kernels blacklist the radeon driver.
No IGP and no monitor loop devices for my GPUs - but I think I remember that there was once a day i read about necessary monitor lopping but this was in another life ...

So, you have two video cards: one for pve, and one for guest. I only have one dedicated GPU, and I'm affraid CPU's one is tilted by BIOS if motherboard recognised installed card.

@sirkope
(GPU) Passthrough:
I read and tried a LOT - best sources for me (BTW, THX if some page owner I link is reading this)
1. https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/
2. https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/
3. https://www.youtube.com/watch?v=DHpkD5N6HC0
4. unicks.eu, Arch Wiki, Proxmox Wiki

Some of them familiar, video: I can't speak german (maybe I'll watch with auto english subtitle)
 
So, I need two video card and a HDMI plug? One card for the host and one for GPU passtrough plugged the HDMI emulator in it?
 

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!