[SOLVED] GPU Passthrough - HDMI audio

cromatn5

Well-Known Member
Mar 26, 2018
77
11
48
39
France
Hello

Since i upgraded to Proxmox 6 the HDMI audio of my GPU cannot be passed to a VM.
The GPU is 01:00.0 and audio is 01:00.1

When i start ths VM, only the GPU is passed through.

[ 2.917161] vfio-pci 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:eek:wns=none
[ 2.935884] vfio_pci: add [1002:6985[ffffffff:ffffffff]] class 0x000000/00000000
[ 2.955954] vfio_pci: add [1002:aae0[ffffffff:ffffffff]] class 0x000000/00000000
[ 256.053095] vfio-pci 0000:01:00.0: enabling device (0000 -> 0003)
[ 256.053458] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x270
[ 256.053465] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x1b@0x2d0
[ 256.053471] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x1e@0x370

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Lexa XT [Radeon PRO WX 3100] [1002:6985]
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] [1002:aae0]

agent: 1,fstrim_cloned_disks=1
bios: ovmf
bootdisk: scsi0
cores: 4
cpu: host
efidisk0: vm-data:vm-101-disk-0,size=4M
hostpci0: 01:00,x-vga=1,pcie=1,romfile=lexa.rom
ide2: none,media=cdrom
machine: q35
memory: 8192
name: GameMachine
net0: virtio=7E:46:C9:A4:83:4E,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
protection: 1
scsi0: vm-os:vm-101-disk-0,discard=on,size=50G,ssd=1
scsi1: vm-data:vm-101-disk-2,discard=on,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=c2fcc5fd-2df8-4b70-982f-c0a4242b0d1e
sockets: 1
tablet: 0
usb0: host=0a12:0001
usb1: host=045e:0719
vga: none
vmgenid: ed604467-ca39-46f2-b43b-5ea6d268494b
 
Last edited:
Hi,

You forgot in your config the Audio Device.
There is only the setting for GPU passthrough.
 
The Multifunction box is checked.
I tried to passthrougt separatly Audio and GPU but same problem, Audio is just ignored

agent: 1,fstrim_cloned_disks=1
bios: ovmf
bootdisk: scsi0
cores: 4
cpu: host
efidisk0: vm-data:vm-101-disk-0,size=4M
hostpci0: 01:00.0,x-vga=1,pcie=1
hostpci1: 01:00.1,pcie=1
ide2: none,media=cdrom
machine: q35
memory: 8192
name: GameMachine
net0: virtio=7E:46:C9:A4:83:4E,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
protection: 1
scsi0: vm-os:vm-101-disk-0,discard=on,size=50G,ssd=1
scsi1: vm-data:vm-101-disk-2,discard=on,size=200G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=c2fcc5fd-2df8-4b70-982f-c0a4242b0d1e
sockets: 1
tablet: 0
usb0: host=0a12:0001
usb1: host=045e:0719
vga: none
vmgenid: ed604467-ca39-46f2-b43b-5ea6d268494b
 
Last edited:
can you post the output of
Code:
qm showcmd ID --pretty
of your vm ID ?

also do you have any logs from inside the vm that might reveal a problem?
 
There is no log inside the VM.

/usr/bin/kvm \
-id 101 \
-name GameMachine \
-chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait' \
-mon 'chardev=qmp,mode=control' \
-chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \
-mon 'chardev=qmp-event,mode=control' \
-pidfile /var/run/qemu-server/101.pid \
-daemonize \
-smbios 'type=1,uuid=c2fcc5fd-2df8-4b70-982f-c0a4242b0d1e' \
-drive 'if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
-drive 'if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/pve-data/vm-101-disk-0' \
-smp '4,sockets=1,cores=4,maxcpus=4' \
-nodefaults \
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vga none \
-nographic \
-no-hpet \
-cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,hv_tlbflush,hv_ipi,kvm=off' \
-m 8192 \
-device 'vmgenid,guid=ed604467-ca39-46f2-b43b-5ea6d268494b' \
-readconfig /usr/share/qemu-server/pve-q35.cfg \
-device 'vfio-pci,host=01:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on' \
-device 'vfio-pci,host=01:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1' \
-device 'usb-host,vendorid=0x0a12,productid=0x0001,id=usb0' \
-device 'usb-host,vendorid=0x045e,productid=0x0719,id=usb1' \
-chardev 'socket,path=/var/run/qemu-server/101.qga,server,nowait,id=qga0' \
-device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
-device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
-device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \
-iscsi 'initiator-name=iqn.1993-08.org.debian:01:d2ee1df1edae' \
-drive 'if=none,id=drive-ide2,media=cdrom,aio=threads' \
-device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' \
-device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1' \
-drive 'file=/dev/pve-root/vm-101-disk-0,if=none,id=drive-scsi0,discard=on,format=raw,cache=none,aio=native,detect-zeroes=unmap' \
-device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1,bootindex=100' \
-device 'virtio-scsi-pci,id=virtioscsi1,bus=pci.3,addr=0x2' \
-drive 'file=/dev/pve-data/vm-101-disk-2,if=none,id=drive-scsi1,discard=on,format=raw,cache=none,aio=native,detect-zeroes=unmap' \
-device 'scsi-hd,bus=virtioscsi1.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,rotation_rate=1' \
-netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
-device 'virtio-net-pci,mac=7E:46:C9:A4:83:4E,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \
-rtc 'driftfix=slew,base=localtime' \
-machine 'type=q35' \
-global 'kvm-pit.lost_tick_policy=discard'
 
i could reproduce it also , upstream bug for reference: https://bugs.launchpad.net/qemu/+bug/1826422

the recommended way to fix this is to set the machine type to an older version e.g.
Code:
qm set ID -machine pc-q35-3.1

this should be fixed with 4.0.1 or 4.1 upstream
 
  • Like
Reactions: pjgowtham

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!