Passing NVidia GPU only works with video

paulmorabi

Member
Mar 30, 2019
81
8
13
44
Hi,

I'm trying to get my NVidia 1050ti to pass through to a Windows VM on a Ryzen 2700 running Proxmox 5.4-6. The main problem I am having is getting the NVidia audio controller to pass through and work.

The graphics card and kernel drivers are:

Code:
root@pve:~# lspci -v -s 1c:00
1c:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. [MSI] GP107 [GeForce GTX 1050 Ti]
    Flags: bus master, fast devsel, latency 0, IRQ 98
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    Expansion ROM at f7000000 [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Legacy Endpoint, MSI 00
    Capabilities: [100] Virtual Channel
    Capabilities: [250] Latency Tolerance Reporting
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [420] Advanced Error Reporting
    Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
    Capabilities: [900] #19
    Kernel driver in use: vfio-pci
    Kernel modules: nvidiafb, nouveau

1c:00.1 Audio device: NVIDIA Corporation Device 0fb9 (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8c96
    Flags: fast devsel, IRQ 255
    Memory at f7080000 (32-bit, non-prefetchable) [disabled] [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel

root@pve:~#
root@pve:~#
root@pve:~# lspci -n -s 1c:00
1c:00.0 0300: 10de:1c82 (rev a1)
1c:00.1 0403: 10de:0fb9 (rev a1)
root@pve:~# cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1

My VM config is:

Code:
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
bios: ovmf
boot: dcn
bootdisk: scsi0
cores: 16
cpu: host,hidden=1,flags=+pcid
hostpci0: 1c:00.0,x-vga=1,pcie=1,romfile=GP107.rom
ide2: none,media=cdrom
machine: q35
memory: 16000
name: Windows
net0: virtio=96:DB:30:3F:3F:91,bridge=vmbr0
numa: 1
ostype: win10
scsi0: local-lvm:vm-100-disk-0,cache=writeback,iothread=1,replicate=0,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=6c528219-7221-4008-b880-7b23b7302b2e
sockets: 1
vga: none
vmgenid: 17177e2a-bb1b-4326-8763-eed5028c9a61

Using the above config, the GPU passes through fine however there is no audio and the NVidia audio controller is not recognized in Windows.

If I pass through "1c:00" which should pass through the video and audio controller then the VM hangs, I can't connect by RDP or VNC and if I do a lspci, the details above are removed and the error is "!!! Unknown header type 7f"

I've been searching for days trying to resolve this. Any help would be really appreciated.
 
you can try to passthrough the audio device on its own:

Code:
hostpci1: 1c:00.1,pcie=1
 
hostpci0: 1c:00.0,x-vga=1,pcie=1,romfile=GP107.rom
i see that you use a romfile

are you sure that romfile is ok and suited for your gpu? did you extract it from you gpu?
did you try without it ?
 
i see that you use a romfile

are you sure that romfile is ok and suited for your gpu? did you extract it from you gpu?
did you try without it ?

Yep, I extracted it from my GPU. I tried one or two others also that I found online but none of them worked at all.
 
Try > hostpci0: 01:00
balloon: 4000
bootdisk: virtio0
cores: 12
cpu: host
hostpci0: 01:00 <= GTX 660Ti
hostpci1: 00:02.0 <= Intel IGD
hostpci2: 05:00
ide2: none,media=cdrom
memory: 13000
name: MakeMKV2
net0: virtio=36:D3:2E:27:8C:F3,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=9ef472e7-6fea-4245-b96a-16c042306007
sockets: 1
usb0: host=1-12,usb3=1
usb1: host=1-11,usb3=1
vga: none
virtio0: OS-SSD:vm-600-disk-1,size=300G
vmgenid: 4e57280d-eb1a-4f79-97c4-08e241b40a33
 
Try > hostpci0: 01:00
balloon: 4000
bootdisk: virtio0
cores: 12
cpu: host
hostpci0: 01:00 <= GTX 660Ti
hostpci1: 00:02.0 <= Intel IGD
hostpci2: 05:00
ide2: none,media=cdrom
memory: 13000
name: MakeMKV2
net0: virtio=36:D3:2E:27:8C:F3,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=9ef472e7-6fea-4245-b96a-16c042306007
sockets: 1
usb0: host=1-12,usb3=1
usb1: host=1-11,usb3=1
vga: none
virtio0: OS-SSD:vm-600-disk-1,size=300G
vmgenid: 4e57280d-eb1a-4f79-97c4-08e241b40a33

My device address is 1c:00, not 01:00. Can you explain how or why changing it would work?
 
I ended up fixing this. It turns out newer BIOS's to support the latest Ryzen processors introduce issues with pass through. Downgrading the BIOS fixed this instantly.
 
I ended up fixing this. It turns out newer BIOS's to support the latest Ryzen processors introduce issues with pass through. Downgrading the BIOS fixed this instantly.

Any details on the motherboard you are using ? what BIOS version you were using and then what version you downgraded to ?
it all helps others that have issues and stumble across a post that matches, but just says "Don't worry, fixed it"
 
Any details on the motherboard you are using ? what BIOS version you were using and then what version you downgraded to ?
it all helps others that have issues and stumble across a post that matches, but just says "Don't worry, fixed it"

Sure!

Ryzen 2700 on MSI B450M Mortar. You need to use 7B89v14 because later releases includes support for Ryzen 3000 series which introduces the issue. More details on it are at https://www.reddit.com/r/VFIO/comme..._the_latest_bios_on_asrockmsi_boards/eo4neta/
 

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!