[vfio-users] Audio sync issues Windows 10

Brandon Ganem brandonganem at gmail.com
Tue Dec 20 18:32:43 UTC 2016


Alright,
My memory and google-fu is failing me - I can't get the vfio-pci driver to
stop binding to the usb controllers. I've pulled them from my modprobe file.

On Tue, Dec 20, 2016 at 11:48 AM, Brandon Ganem <brandonganem at gmail.com>
wrote:

> Eddie,
> It's enabled in Windows with the registry trick - lspci is a nice test,
> when it isn't enabled for a device it'll show "Enabled-". Before I made the
> registry mod that was the output. Getting "Enabled+" should indicate it's
> enabled and working. Additionally I just double checked device manager.
> [image: Inline image 2]
>
> Versions:
> # uname -r
> 4.8.13-1-ARCH
> # # virsh version
> Compiled against library: libvirt 2.4.0
> Using library: libvirt 2.4.0
> Using API: QEMU 2.4.0
> Running hypervisor: QEMU 2.7.0
>
> I'll give your USB idea a go. It's nice being able to use USB ports as if
> they're owned by the VM but i'm willing to give that up if it means fixing
> audio sync issues.
>
> Thanks for the help so far!
>
> On Tue, Dec 20, 2016 at 11:12 AM, Eddie Yen <missile0407 at gmail.com> wrote:
>
>> No, I mean enable it on Windows 10 VM by modify registry.
>>
>> IME, it enable on Linux host, but Windows need to enable manually by edit
>> registry.
>> Some issues (like your case) may can be solved by this.
>>
>> Also, try to dismount USB controller, you can mount your USB device by
>> enable libusb on QEMU, and can you provide your QEMU and libvirt version?
>>
>> 2016-12-20 21:27 GMT+08:00 Brandon Ganem <brandonganem at gmail.com>:
>>
>>> MSI-X is enabled on the devices that support it (everything audio
>>> related, video card). The lspci was taken with the VM running and contains
>>> "enable+" so i think that means it's enabled and working.
>>>
>>> On Tue, Dec 20, 2016 at 12:46 AM, Eddie Yen <missile0407 at gmail.com>
>>> wrote:
>>>
>>>> Maybe it's a silly question but,
>>>>
>>>> Have you try add MSI-X support by modify registry on Windows 10 VM?
>>>>
>>>> 2016-12-20 13:06 GMT+08:00 Brandon Ganem <brandonganem at gmail.com>:
>>>>
>>>>> I'm not entirely sure what this tells me, but IRQ usage drops
>>>>> significantly (particularly on "LOC") when not playing back a video. Maybe
>>>>> somebody smarter than I am has a though.
>>>>> The poorly drawn yellow line is roughly when i stopped any video play
>>>>> back in this graph. Time scale is a 15 minute window from collectd's irq
>>>>> monitor.
>>>>> [image: Inline image 1]
>>>>>
>>>>> On Sun, Dec 18, 2016 at 10:33 PM, Brandon Ganem <
>>>>> brandonganem at gmail.com> wrote:
>>>>>
>>>>>> I'm passing through USB, but only a mic is on that for audio. 00:1b.0
>>>>>> (intel built in audio) and nvidia HDMI audio both have the issue.
>>>>>>
>>>>>> On Sat, Dec 17, 2016 at 3:58 PM, Zachary Boley <zboley00 at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Doesn't look like it but are you passing a USB controller in for it?
>>>>>>> Can't really see how you're using audio
>>>>>>>
>>>>>>> On Dec 16, 2016 2:39 PM, "Brandon Ganem" <brandonganem at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>> I've got a Windows 10 VM on top of arch linux. It appears that
>>>>>>>> after some period of time my audio / video loses sync for long running
>>>>>>>> videos (youtube for example). Switching audio devices in "sound options" in
>>>>>>>> windows causes the video to sync back up to the audio.
>>>>>>>>
>>>>>>>> The audio does not appear to be distorted, it's almost as if the
>>>>>>>> video slows down by a frame or two and over time that's enough to drop the
>>>>>>>> sync.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Here's my XML:
>>>>>>>> <domain type='kvm' xmlns:qemu='http://libvirt.org
>>>>>>>> /schemas/domain/qemu/1.0'>
>>>>>>>>   <name>win10_gaming_1</name>
>>>>>>>>   <uuid>01bd2ed1-b465-4eba-b6e4-47c6ac8171c6</uuid>
>>>>>>>>   <memory unit='KiB'>16777216</memory>
>>>>>>>>   <currentMemory unit='KiB'>16777216</currentMemory>
>>>>>>>>   <vcpu placement='static'>12</vcpu>
>>>>>>>>   <iothreads>2</iothreads>
>>>>>>>>   <iothreadids>
>>>>>>>>     <iothread id='1'/>
>>>>>>>>     <iothread id='2'/>
>>>>>>>>   </iothreadids>
>>>>>>>>   <cputune>
>>>>>>>>     <vcpupin vcpu='0' cpuset='2'/>
>>>>>>>>     <vcpupin vcpu='1' cpuset='3'/>
>>>>>>>>     <vcpupin vcpu='2' cpuset='4'/>
>>>>>>>>     <vcpupin vcpu='3' cpuset='5'/>
>>>>>>>>     <vcpupin vcpu='4' cpuset='6'/>
>>>>>>>>     <vcpupin vcpu='5' cpuset='7'/>
>>>>>>>>     <vcpupin vcpu='6' cpuset='8'/>
>>>>>>>>     <vcpupin vcpu='7' cpuset='9'/>
>>>>>>>>     <vcpupin vcpu='8' cpuset='12'/>
>>>>>>>>     <vcpupin vcpu='9' cpuset='13'/>
>>>>>>>>     <vcpupin vcpu='10' cpuset='14'/>
>>>>>>>>     <vcpupin vcpu='11' cpuset='15'/>
>>>>>>>>     <emulatorpin cpuset='0-1'/>
>>>>>>>>     <iothreadpin iothread='1' cpuset='0'/>
>>>>>>>>     <iothreadpin iothread='2' cpuset='1'/>
>>>>>>>>     <iothreadsched iothreads='2' scheduler='batch'/>
>>>>>>>>   </cputune>
>>>>>>>>   <os>
>>>>>>>>     <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
>>>>>>>>     <loader readonly='yes' type='pflash'>/usr/share/edk2.
>>>>>>>> git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
>>>>>>>>     <nvram template='/usr/share/edk2.git/
>>>>>>>> ovmf-x64/OVMF_VARS-pure-efi.fd'>/var/lib/libvirt/qemu/nvram/
>>>>>>>> win10_gaming_1_VARS.fd</nvram>
>>>>>>>>     <boot dev='hd'/>
>>>>>>>>   </os>
>>>>>>>>   <features>
>>>>>>>>     <acpi/>
>>>>>>>>     <hyperv>
>>>>>>>>       <relaxed state='off'/>
>>>>>>>>       <vapic state='off'/>
>>>>>>>>       <spinlocks state='off'/>
>>>>>>>>     </hyperv>
>>>>>>>>     <kvm>
>>>>>>>>       <hidden state='on'/>
>>>>>>>>     </kvm>
>>>>>>>>   </features>
>>>>>>>>   <cpu mode='host-passthrough'>
>>>>>>>>     <topology sockets='1' cores='6' threads='2'/>
>>>>>>>>   </cpu>
>>>>>>>>   <clock offset='localtime'>
>>>>>>>>     <timer name='hypervclock' present='no'/>
>>>>>>>>   </clock>
>>>>>>>>   <on_poweroff>destroy</on_poweroff>
>>>>>>>>   <on_reboot>restart</on_reboot>
>>>>>>>>   <on_crash>destroy</on_crash>
>>>>>>>>   <devices>
>>>>>>>>     <emulator>/usr/sbin/qemu-system-x86_64</emulator>
>>>>>>>>     <disk type='file' device='disk'>
>>>>>>>>       <driver name='qemu' type='raw' cache='writethrough'/>
>>>>>>>>       <source file='/flash/win_gaming_1.img'/>
>>>>>>>>       <target dev='vda' bus='virtio'/>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
>>>>>>>> function='0x0'/>
>>>>>>>>     </disk>
>>>>>>>>     <disk type='file' device='disk'>
>>>>>>>>       <driver name='qemu' type='raw' cache='writethrough'/>
>>>>>>>>       <source file='/vmstore/steam/gaming_1/steam_library.img'/>
>>>>>>>>       <target dev='vdb' bus='virtio'/>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a'
>>>>>>>> function='0x0'/>
>>>>>>>>     </disk>
>>>>>>>>     <controller type='pci' index='0' model='pci-root'/>
>>>>>>>>     <controller type='virtio-serial' index='0'>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
>>>>>>>> function='0x0'/>
>>>>>>>>     </controller>
>>>>>>>>     <controller type='usb' index='0' model='piix3-uhci'>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
>>>>>>>> function='0x2'/>
>>>>>>>>     </controller>
>>>>>>>>     <interface type='bridge'>
>>>>>>>>       <mac address='52:54:00:a0:41:92'/>
>>>>>>>>       <source bridge='br0'/>
>>>>>>>>       <model type='virtio'/>
>>>>>>>>       <rom bar='off'/>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
>>>>>>>> function='0x0'/>
>>>>>>>> </interface>
>>>>>>>>     <input type='mouse' bus='ps2'/>
>>>>>>>>     <input type='keyboard' bus='ps2'/>
>>>>>>>>     <memballoon model='virtio'>
>>>>>>>>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
>>>>>>>> function='0x0'/>
>>>>>>>>     </memballoon>
>>>>>>>>   </devices>
>>>>>>>>   <qemu:commandline>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='ioh3420,bus=pci.0,addr=
>>>>>>>> 1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='vfio-pci,host=02:00.0,b
>>>>>>>> us=root.1,addr=00.0,multifunction=on,x-vga=on'/>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='vfio-pci,host=02:00.1,b
>>>>>>>> us=root.1,addr=00.1,multifunction=on'/>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='vfio-pci,host=00:14.0,b
>>>>>>>> us=root.1,addr=00.2,multifunction=on'/>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='vfio-pci,host=00:1a.0,b
>>>>>>>> us=root.1,addr=00.3,multifunction=on'/>
>>>>>>>>     <qemu:arg value='-device'/>
>>>>>>>>     <qemu:arg value='vfio-pci,host=00:1b.0,b
>>>>>>>> us=root.1,addr=00.4,multifunction=on'/>
>>>>>>>>   </qemu:commandline>
>>>>>>>> </domain>
>>>>>>>>
>>>>>>>>
>>>>>>>> LSPCI:
>>>>>>>> 02:00.0 VGA compatible controller: NVIDIA Corporation GM206
>>>>>>>> [GeForce GTX 960] (rev a1) (prog-if 00 [VGA controller])
>>>>>>>>         Subsystem: Micro-Star International Co., Ltd. [MSI] Device
>>>>>>>> 3202
>>>>>>>>         Physical Slot: 4
>>>>>>>>         Flags: bus master, fast devsel, latency 0, IRQ 26, NUMA
>>>>>>>> node 0
>>>>>>>>         Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
>>>>>>>>         Memory at c0000000 (64-bit, prefetchable) [size=256M]
>>>>>>>>         Memory at d0000000 (64-bit, prefetchable) [size=32M]
>>>>>>>>         I/O ports at e000 [size=128]
>>>>>>>>         Expansion ROM at fb000000 [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: [258] L1 PM Substates
>>>>>>>>         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: nouveau
>>>>>>>>
>>>>>>>> 02:00.1 Audio device: NVIDIA Corporation Device 0fba (rev a1)
>>>>>>>>         Subsystem: Micro-Star International Co., Ltd. [MSI] Device
>>>>>>>> 3202
>>>>>>>>         Physical Slot: 4
>>>>>>>>         Flags: bus master, fast devsel, latency 0, IRQ 51, NUMA
>>>>>>>> node 0
>>>>>>>>         Memory at fb080000 (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
>>>>>>>>         Kernel modules: snd_hda_intel
>>>>>>>>
>>>>>>>> 00:1b.0 Audio device: Intel Corporation C610/X99 series chipset HD
>>>>>>>> Audio Controller (rev 05)
>>>>>>>>         Subsystem: ASRock Incorporation Device 1151
>>>>>>>>         Flags: bus master, fast devsel, latency 0, IRQ 22, NUMA
>>>>>>>> node 0
>>>>>>>>         Memory at fb330000 (64-bit, non-prefetchable) [size=16K]
>>>>>>>>         Capabilities: [50] Power Management version 2
>>>>>>>>         Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
>>>>>>>>         Capabilities: [70] Express Root Complex Integrated
>>>>>>>> Endpoint, MSI 00
>>>>>>>>         Capabilities: [100] Virtual Channel
>>>>>>>>         Kernel driver in use: vfio-pci
>>>>>>>>         Kernel modules: snd_hda_intel
>>>>>>>>
>>>>>>>> 00:1d.0 USB controller: Intel Corporation C610/X99 series chipset
>>>>>>>> USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
>>>>>>>>         Subsystem: ASRock Incorporation Device 8d26
>>>>>>>>         Flags: medium devsel, IRQ 18, NUMA node 0
>>>>>>>>         Memory at fb337000 (32-bit, non-prefetchable) [size=1K]
>>>>>>>>         Capabilities: [50] Power Management version 2
>>>>>>>>         Capabilities: [58] Debug port: BAR=1 offset=00a0
>>>>>>>>         Capabilities: [98] PCI Advanced Features
>>>>>>>>         Kernel driver in use: vfio-pci
>>>>>>>>         Kernel modules: ehci_pci
>>>>>>>>
>>>>>>>> 00:1a.0 USB controller: Intel Corporation C610/X99 series chipset
>>>>>>>> USB Enhanced Host Controller #2 (rev 05) (prog-if 20 [EHCI])
>>>>>>>>         Subsystem: ASRock Incorporation Device 8d2d
>>>>>>>>         Flags: bus master, medium devsel, latency 0, IRQ 18, NUMA
>>>>>>>> node 0
>>>>>>>>         Memory at fb338000 (32-bit, non-prefetchable) [size=1K]
>>>>>>>>         Capabilities: [50] Power Management version 2
>>>>>>>>         Capabilities: [58] Debug port: BAR=1 offset=00a0
>>>>>>>>         Capabilities: [98] PCI Advanced Features
>>>>>>>>         Kernel driver in use: vfio-pci
>>>>>>>>         Kernel modules: ehci_pci
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> vfio-users mailing list
>>>>>>>> vfio-users at redhat.com
>>>>>>>> https://www.redhat.com/mailman/listinfo/vfio-users
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> vfio-users mailing list
>>>>> vfio-users at redhat.com
>>>>> https://www.redhat.com/mailman/listinfo/vfio-users
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20161220/e58563ea/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 68872 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20161220/e58563ea/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 77286 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20161220/e58563ea/attachment-0001.png>


More information about the vfio-users mailing list