kvm / qemu - 从Windows客户端到主机的音频,没有香料

时间:2017-02-18 20:32:34

标签: ubuntu audio qemu kvm alsa

我正在尝试使用virt-manager让我的Windows 10域使用qemu。

除非我正在运行spice控制台以听到声音,否则一切似乎都能正常工作(GPU passthrough,CPU)。声音很噼啪声,在使用图形控制台时,鼠标滞后(CPU使用率上升了10-15%),而且我似乎有了framedrops。

我现在正在使用Synergy,所以我不必使用Spice图形控制台。鼠标现在工作正常。但是,虽然我没有使用spice控制台,但我没有声音。

所以,我将音频驱动程序更改为ac97(使用Realtek的Windows Vista / 7驱动程序),这有点解决了噼啪声,但我仍然有帧丢失,因为我正在使用Spice。

我已经在线阅读过,应该有一种方法可以让它与ALSA一起工作,而不需要像Spice这样的图形控制台。因此,我更改了文件/etc/libvirt/qemu.conf以启用vnc_allow_host_audio / nographics_allow_host_audio,现在正在使用环境变量QEMU_AUDIO_DRV=alsa运行域。

这会产生附加日志(/var/log/libvirt/qemu/win10-gaming.log)中显示的错误。

如何使用ALSA或更重要的是没有Spice?

2017-02-18 17:40:10.819+0000: starting up libvirt version: 1.3.1, package: 1ubuntu10.8 (Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 06 Feb 2017 14:30:46 +0100), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.8), hostname: lindesktop
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=alsa /usr/bin/kvm-spice -name win10-gaming -S -machine pc-i440fx-xenial,accel=kvm,usb=off -cpu host,kvm=off -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/win10-gaming_VARS.fd,if=pflash,format=raw,unit=1 -m 8192 -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu -realtime mlock=off -smp 4,sockets=1,cores=2,threads=2 -uuid eb48ea95-aa76-4dad-80c9-1902547899b0 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-win10-gaming/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot menu=on,strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 -device ahci,id=sata0,bus=pci.0,addr=0x5 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/dev/sda5,format=raw,if=none,id=drive-virtio-disk1,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xc,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=1 -drive file=/home/michael/Downloads/Windows.iso,format=raw,if=none,id=drive-ide0-0-0,readonly=on -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/home/michael/Downloads/virtio-win-0.1.126.iso,format=raw,if=none,id=drive-ide0-0-1,readonly=on -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:50:bc:b9,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-win10-gaming/org.libguestfs.channel.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.libguestfs.channel.0 -vnc 127.0.0.1:0 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 -device AC97,id=sound0,bus=pci.0,addr=0x4 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0xa -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0xb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
Domain id=2 is tainted: custom-argv
Domain id=2 is tainted: host-cpu
shm_open() failed: Permission denied
Home directory not accessible: Permission denied
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `ac97.pi'

等...

0 个答案:

没有答案