Nvidia 750ti VGA Passthrough No HDMI Audio

waynieack

New Member
Apr 24, 2015
4
0
1
Louisiana
I've been trying to get the HDMI audio working that has been passed through via PCI pass-through to a Ubuntu VM. Video is working perfectly, but this is a movie/home automation machine so I have to have the audio working. I used these instructions to get the Video working. I am not sure what other information to give, but I have been working on this for a weeks now and it's very frustrating. I've read through 100's of pages of forums and tried countless variations with no luck. The only thing I see not working right is that pci_stub is not claiming the audio and video device, but I have blacklisted snd_hda_intel and snd_hda_codec_hdmi because I dont need audio on the host so I dont think stub is needed is it?

When I do an audio test on the VM:
Code:
# speaker-test -c 2 -r 48000 -D hdmi:NVidia,1
 
speaker-test 1.0.27.2
 
Playback device is hdmi:NVidia,1
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error

from VM dmesg (during the sound test):
Code:
[   75.612173] playback write error (DMA or IRQ trouble?)

On the VM I can see the HDMI audio negotiation:
Code:
# cat /proc/asound/card0/eld#0.1
monitor_present         1
eld_valid               1
monitor_name            AVRx65
 
connection_type         HDMI
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0x6720
product_id              0xe42
port_id                 0x20000
support_hdcp            0
support_ai              0
audio_sync_delay        0
speakers                [0x5f] FL/FR LFE FC RL/RR RC RLC/RRC
sad_count               12
sad0_coding_type        [0x1] LPCM
sad0_channels           2
sad0_rates              [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits               [0xe0000] 16 20 24
sad1_coding_type        [0x1] LPCM
sad1_channels           6
sad1_rates              [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad1_bits               [0xe0000] 16 20 24
sad2_coding_type        [0x1] LPCM
sad2_channels           8
sad2_rates              [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad2_bits               [0xe0000] 16 20 24
sad3_coding_type        [0xc] MLP (Dolby TrueHD)
sad3_channels           2
sad3_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad4_coding_type        [0xc] MLP (Dolby TrueHD)
sad4_channels           6
sad4_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad5_coding_type        [0xc] MLP (Dolby TrueHD)
sad5_channels           8
sad5_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad6_coding_type        [0xb] DTS-HD
sad6_channels           2
sad6_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad7_coding_type        [0xb] DTS-HD
sad7_channels           6
sad7_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad8_coding_type        [0xb] DTS-HD
sad8_channels           8
sad8_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad9_coding_type        [0x2] AC-3
sad9_channels           6
sad9_rates              [0xe0] 32000 44100 48000
sad9_max_bitrate        640000
sad10_coding_type       [0x7] DTS
sad10_channels          6
sad10_rates             [0x6e0] 32000 44100 48000 88200 96000
sad10_max_bitrate       1536000
sad11_coding_type       [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad11_channels          8
sad11_rates             [0xc0] 44100 48000

I get this on the host when the VM boots:
Code:
May  8 21:37:05 razorhost pvedaemon[13063]: <root@pam> starting task UPID:RAZORHOST:0000346E:00890EC8:554D72D1:qmstart:106:root@pam:
May  8 21:37:05 razorhost pvedaemon[13422]: start VM 106: UPID:RAZORHOST:0000346E:00890EC8:554D72D1:qmstart:106:root@pam:
May  8 21:37:05 razorhost pveproxy[5500]: worker 12913 finished
May  8 21:37:05 razorhost pveproxy[5500]: starting 1 worker(s)
May  8 21:37:05 razorhost pveproxy[5500]: worker 13425 started
May  8 21:37:05 razorhost kernel: [89891.625327] device tap106i0 entered promiscuous mode
May  8 21:37:05 razorhost kernel: [89891.629875] vmbr0: port 2(tap106i0) entered forwarding state
May  8 21:37:05 razorhost kernel: [89891.630506] vmbr0: port 2(tap106i0) entered forwarding state
May  8 21:37:06 razorhost kernel: [89892.258588] vfio_ecap_init: 0000:02:00.0 hiding ecap 0x1e@0x258
May  8 21:37:06 razorhost kernel: [89892.259252] vfio_ecap_init: 0000:02:00.0 hiding ecap 0x19@0x900
May  8 21:37:08 razorhost kernel: [89894.934412] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:08 razorhost kernel: [89894.950724] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:08 razorhost kernel: [89894.951386] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:08 razorhost kernel: [89894.952081] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:08 razorhost kernel: [89894.952834] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.277669] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:09 razorhost kernel: [89895.293263] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:09 razorhost kernel: [89895.294020] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:09 razorhost kernel: [89895.294822] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.295639] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.552903] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:09 razorhost kernel: [89895.568554] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:09 razorhost kernel: [89895.568555] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:09 razorhost kernel: [89895.568559] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.568560] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.825095] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:09 razorhost kernel: [89895.840494] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:09 razorhost kernel: [89895.841231] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:09 razorhost kernel: [89895.842025] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:09 razorhost kernel: [89895.842828] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:18 razorhost pvedaemon[13063]: worker exit
May  8 21:37:18 razorhost pvedaemon[5472]: worker 13063 finished
May  8 21:37:18 razorhost pvedaemon[5472]: starting 1 worker(s)
May  8 21:37:18 razorhost pvedaemon[5472]: worker 13483 started
May  8 21:37:25 razorhost kernel: [89912.079629] kvm [13428]: vcpu0 unhandled rdmsr: 0x345
May  8 21:37:25 razorhost kernel: [89912.080434] kvm_set_msr_common: 118 callbacks suppressed
May  8 21:37:25 razorhost kernel: [89912.081205] kvm [13428]: vcpu0 unhandled wrmsr: 0x680 data 0
May  8 21:37:25 razorhost kernel: [89912.081963] kvm [13428]: vcpu0 unhandled wrmsr: 0x6c0 data 0
May  8 21:37:25 razorhost kernel: [89912.082731] kvm [13428]: vcpu0 unhandled wrmsr: 0x681 data 0
May  8 21:37:25 razorhost kernel: [89912.083482] kvm [13428]: vcpu0 unhandled wrmsr: 0x6c1 data 0
May  8 21:37:25 razorhost kernel: [89912.084192] kvm [13428]: vcpu0 unhandled wrmsr: 0x682 data 0
May  8 21:37:25 razorhost kernel: [89912.084862] kvm [13428]: vcpu0 unhandled wrmsr: 0x6c2 data 0
May  8 21:37:25 razorhost kernel: [89912.085636] kvm [13428]: vcpu0 unhandled wrmsr: 0x683 data 0
May  8 21:37:25 razorhost kernel: [89912.086324] kvm [13428]: vcpu0 unhandled wrmsr: 0x6c3 data 0
May  8 21:37:25 razorhost kernel: [89912.087040] kvm [13428]: vcpu0 unhandled wrmsr: 0x684 data 0
May  8 21:37:25 razorhost kernel: [89912.087756] kvm [13428]: vcpu0 unhandled wrmsr: 0x6c4 data 0
May  8 21:37:26 razorhost kernel: [89912.378140] kvm: zapping shadow pages for mmio generation wraparound
May  8 21:37:26 razorhost kernel: [89912.378796] kvm: zapping shadow pages for mmio generation wraparound
May  8 21:37:27 razorhost kernel: [89913.810771] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:27 razorhost kernel: [89913.826198] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:27 razorhost kernel: [89913.826790] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:27 razorhost kernel: [89913.827418] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:27 razorhost kernel: [89913.828009] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:28 razorhost kernel: [89914.643431] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:28 razorhost kernel: [89914.658641] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:28 razorhost kernel: [89914.659185] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:28 razorhost kernel: [89914.659734] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:28 razorhost kernel: [89914.660298] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:29 razorhost kernel: [89915.179825] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:29 razorhost kernel: [89915.195301] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:29 razorhost kernel: [89915.195826] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:29 razorhost kernel: [89915.196395] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:29 razorhost kernel: [89915.196975] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:29 razorhost kernel: [89915.780270] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:29 razorhost kernel: [89915.795813] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:29 razorhost kernel: [89915.796327] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:29 razorhost kernel: [89915.796953] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:29 razorhost kernel: [89915.797579] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:30 razorhost kernel: [89916.164605] usb 3-14: reset low-speed USB device number 3 using xhci_hcd
May  8 21:37:30 razorhost kernel: [89916.180321] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8804634445c0
May  8 21:37:30 razorhost kernel: [89916.180322] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880463444680
May  8 21:37:30 razorhost kernel: [89916.180325] usb 3-14: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:30 razorhost kernel: [89916.180327] usb 3-14: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
May  8 21:37:35 razorhost kernel: [89921.210283] vfio-pci 0000:02:00.0: irq 96 for MSI/MSI-X
May  8 21:37:41 razorhost pveproxy[5500]: worker 13110 finished
May  8 21:37:41 razorhost pveproxy[5500]: starting 1 worker(s)
May  8 21:37:41 razorhost pveproxy[5500]: worker 13518 started
May  8 21:37:44 razorhost pveproxy[13517]: got inotify poll request in wrong process - disabling inotify
May  8 21:39:18 razorhost pvedaemon[13105]: worker exit
May  8 21:39:18 razorhost pvedaemon[5472]: worker 13105 finished
May  8 21:39:18 razorhost pvedaemon[5472]: starting 1 worker(s)
May  8 21:39:18 razorhost pvedaemon[5472]: worker 13665 started
May  8 21:39:33 razorhost pvedaemon[12773]: <root@pam> successful auth for user 'root@pam'

VM config:

Code:
# cat /etc/pve/qemu-server/106.conf
boot: dcn
bootdisk: virtio0
cores: 4
cpu: host
hostpci0: 02:00,x-vga=on,pcie=1,driver=vfio
ide2: none,media=cdrom
machine: q35
memory: 4000
name: razormedia
net0: virtio=E6:4B:9C:8A:C2:42,bridge=vmbr0
numa: 0
ostype: l26
smbios1: uuid=94c27aed-4d04-4942-9707-7287d29032ea
sockets: 1
tablet: 0
usb0: host=0c16:0002
usb1: host=04fc:05d8
virtio0: storage1:106/vm-106-disk-1.qcow2,format=qcow2,size=60G

Host lspci snip:
Code:
02:00.0  VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX  750 Ti] [10de:1380] (rev a2) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device [1043:84dd]
        Physical Slot: 6
        Flags: bus master, fast devsel, latency 0, IRQ 96
        Memory at f9000000 (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 fa000000 [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: [258] #1e
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: vfio-pci

02:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fbc] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:84dd]
        Physical Slot: 6
        Flags: bus master, fast devsel, latency 0, IRQ 36
        Memory at fa080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Kernel driver in use: vfio-pci

Host /etc/default/grub:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet  intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 rootdelay=10  scsi_mod.scan=sync pcie_acs_override=downstream"

Host iommu group:
Code:
# ls /sys/bus/pci/devices/0000\:02\:00.0/iommu_group/devices/
0000:02:00.0  0000:02:00.1




Host specs:
Motherboard: ASUS Z10PE-D16 SSI EEB
areca ARC-1225-8i-MS PCI-Express 3.0
Intel Xeon E5-2630 v3 Haswell-EP 2.4GHz
16 GB DDR4 RAM
Nvidia 750 Ti (Asus STRIX-GTX750TI-OC-2GD5) << pass through to VM
Kernel: 3.13.0-49
QEMU emulator version 2.2.1
Proxmox Ver: 3.4-3

VM:
kodibuntu (Ubuntu 14.04.1 LTS - 3.13.0-49)
 
Last edited:
I noticed in someones logs on the archlinux forum that they have 0000:02:00.0 and 0000:02:00.1 logged during the VM boot, but in my logs I only have 0000:02:00.0 and no .1 which is the audio part of the card. I assume that what ever is not happening here is my problem. Can someone that has the HDMI audio functioning confirm that they see both of these lines in their logs? Does this indicate a host problem or a guest problem?

Logs from archlinux forum:
Code:
Oct 23 01:11:06 localhost.localdomain kernel: vfio-pci 0000:02:00.0: irq 45 for MSI/MSI-X
Oct 23 01:11:12 localhost.localdomain kernel: vfio-pci 0000:02:00.1: irq 48 for MSI/MSI-X
 

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!