Qemu thunderbolt 音频设备在 Windows 客户机上冻结

Qemu thunderbolt 音频设备在 Windows 客户机上冻结

我有Ubuntu 20.04 托管在 HP 精英笔记本上G8 (i7 1185G7) 和通过 kvm 访问 Windows 10 客户端。 我需要将 Thunderbolt 音频设备 (Presonus Quantum) 连接到 Windows。我使用虚拟机管理器完成了此操作(使用 lspci 找到音频设备并将其添加到 VM 管理器中的机器中)。我在 Windows 中安装了官方设备驱动程序,该设备被识别并正常工作。但是,音频设备导致 Windows 10 客户机定期冻结(Linux 仍在工作)。冻结可能持续几秒到几分钟,声音输出嗡嗡作响,Windows 没有响应。然后它突然解冻,工作几秒钟,然后再次冻结。目前对我来说唯一重要的是解冻后出现的音频设备驱动程序(它是 Windows 桌面应用程序)的一条错误消息:“音频引擎已停止,因为音频引擎过载导致系统无响应“。

一些附加信息:

$ lspci
...
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device a0a4 (rev 20)
2b:00.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
2c:00.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
2c:01.0 PCI bridge: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] (rev 01)
2d:00.0 Multimedia audio controller: Device 1c67:0104  <=== this is Presonus Audio Device
...

$ boltctl
 ● PreSonus Audio Electronics Quantum 2626
   ├─ type:          peripheral
   ├─ name:          Quantum 2626
   ├─ vendor:        PreSonus Audio Electronics
   ├─ uuid:          00565981-157d-3c00-ffff-ffffffffffff
   ├─ status:        authorized
   │  ├─ domain:     d065ce53-4e96-8780-ffff-ffffffffffff
   │  └─ authflags:  none
   ├─ authorized:    Št 18. november 2021, 09:05:59
   ├─ connected:     Št 18. november 2021, 09:05:59
   └─ stored:        St 17. november 2021, 17:12:54
      ├─ policy:     iommu
      └─ key:        no

VM 管理器用于启动窗口的命令行:

  • 此命令行是由 virt-manager gui 生成的,我通过ps
  • 为了便于阅读,我插入了换行符,presonus 音频设备位于末尾
/usr/bin/qemu-system-x86_64 -name guest=win10,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-win10/master-key.aes
-machine pc-q35-4.2,accel=kvm,usb=off,vmport=off,dump-guest-core=off

-cpu Icelake-Server,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,avx512ifma=on,sha-ni=on,rdpid=on,movdiri=on,movdir64b=on,fsrm=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,hle=off,rtm=off,mpx=off,intel-pt=off,la57=off,wbnoinvd=off,hv-time,hv-relaxed,hv-vapic,hv-spinlocks=0x1fff

-m 8192 -overcommit mem-lock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 4be79611-2312-4054-a7e9-3ca041d564af -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=31,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot menu=on,strict=on

-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 
-device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 
-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 
-device pcie-pci-bridge,id=pci.8,bus=pci.1,addr=0x0 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0

-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/pool/win10.qcow2","node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' 
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}' 

-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1,write-cache=on -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=34
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b8:50:7e,bus=pci.6,addr=0x0 
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 
-chardev spicevmc,id=charchannel0,name=vdagent 
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 
-device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 
-device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b 
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 
-chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 
-chardev spicevmc,id=charredir1,name=usbredir 
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 

# this is presonus audio device (0000:2d:00.0):
-device vfio-pci,host=0000:2d:00.0,id=hostdev0,bus=pci.8,addr=0x1 
-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on

由于我在这方面没有经验,而且我没有找到任何涉及类似问题的主题,所以我想请你帮忙。我甚至不知道如何开始调试这个问题。你有什么建议吗?

非常感谢!

答案1

请参阅此处的故障排除指导,即:

  1. 问题:搭载
    Windows 10 操作系统的客户机出现间歇性声音并伴有噼啪声。
  2. 问题:我的客户机死机,导致我的 USB 音频接口崩溃(使用额外的 PCIe Gen3 x4 USB 3.2 卡的直通解决方案)

故障排除已在 USB 音频接口上进行了测试,但应该也适用于 Thunderbolt 音频接口。将 Ubuntu 操作系统上的 CPU 调速器设置为“性能”后,您的问题可能会得到解决。此外,如果可能的话,您可以尝试通过 Intel® 6240 Thunderbolt™ 控制器。当然,这在很大程度上取决于您的系统架构。

相关内容