I upgraded to Ubuntu 20.10 (Groovy Gorilla) and the issue was resolved. Here's a list of relevant package versions:
root@justin-3900x:/home/justin# apt list --installed | grep virt (etc...) WARNING: apt does not have a stable CLI interface. Use with caution in scripts. gir1.2-libvirt-glib-1.0/groovy,now 3.0.0-1 amd64 [installed,automatic] libgovirt-common/groovy,groovy,now 0.3.7-1 all [installed,automatic] libgovirt2/groovy,now 0.3.7-1 amd64 [installed,automatic] libqt5virtualkeyboard5/groovy,now 5.14.2+dfsg-2 amd64 [installed,automatic] libsys-virt-perl/groovy,now 6.3.0-1 amd64 [installed,automatic] libvirt-clients/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] libvirt-daemon-driver-qemu/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] libvirt-daemon-driver-storage-zfs/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed] libvirt-daemon-system-systemd/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] libvirt-daemon-system/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] libvirt-daemon/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] libvirt-glib-1.0-0/groovy,now 3.0.0-1 amd64 [installed,automatic] libvirt0/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] python3-libvirt/groovy,now 6.1.0-1 amd64 [installed,automatic] qml-module-qtquick-virtualkeyboard/groovy,now 5.14.2+dfsg-2 amd64 [installed,automatic] qtvirtualkeyboard-plugin/groovy,now 5.14.2+dfsg-2 amd64 [installed,automatic] ruby-fog-libvirt/groovy,groovy,now 0.6.0-1 all [installed,automatic] ruby-libvirt/groovy,now 0.7.1-1build1 amd64 [installed,automatic] vagrant-libvirt/groovy,groovy,now 0.1.2-1 all [installed,automatic] virt-manager/groovy,groovy,now 1:2.2.1-4ubuntu2 all [installed] virt-p2v/groovy,now 1.42.0-2 amd64 [installed,automatic] virt-viewer/groovy,now 7.0-2build1 amd64 [installed,automatic] virtinst/groovy,groovy,now 1:2.2.1-4ubuntu2 all [installed,automatic] qemu-kvm/groovy,now 1:5.0-5ubuntu9 amd64 [installed] ipxe-qemu-256k-compat-efi-roms/groovy,groovy,now 1.0.0+git-20150424.a25a16d-0ubuntu4 all [installed,automatic] ipxe-qemu/groovy,groovy,now 1.0.0+git-20190125.36a4c85-5ubuntu3 all [installed,automatic] libvirt-daemon-driver-qemu/groovy-updates,now 6.6.0-1ubuntu3.1 amd64 [installed,automatic] qemu-block-extra/groovy,now 1:5.0-5ubuntu9 amd64 [installed,automatic] qemu-efi-aarch64/groovy,groovy,now 2020.05-5 all [installed,automatic] qemu-efi-arm/groovy,groovy,now 2020.05-5 all [installed,automatic] qemu-kvm/groovy,now 1:5.0-5ubuntu9 amd64 [installed] qemu-system-arm/groovy,now 1:5.0-5ubuntu9 amd64 [installed] qemu-system-common/groovy,now 1:5.0-5ubuntu9 amd64 [installed,automatic] qemu-system-data/groovy,groovy,now 1:5.0-5ubuntu9 all [installed,automatic] qemu-system-gui/groovy,now 1:5.0-5ubuntu9 amd64 [installed,automatic] qemu-system-x86/groovy,now 1:5.0-5ubuntu9 amd64 [installed] qemu-user-static/groovy,now 1:5.0-5ubuntu9 amd64 [installed] qemu-utils/groovy,now 1:5.0-5ubuntu9 amd64 [installed,automatic] qemu/groovy,now 1:5.0-5ubuntu9 amd64 [installed] -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880066 Title: Microphone input dies in guest when switching evdev input Status in QEMU: New Status in qemu package in Fedora: New Bug description: justin@justin-3900x:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal justin@justin-3900x:~$ apt list --installed | egrep '*qemu*|*kvm*' WARNING: apt does not have a stable CLI interface. Use with caution in scripts. ipxe-qemu-256k-compat-efi-roms/focal,focal,now 1.0.0+git-20150424.a25a16d-0ubuntu4 all [installed,automatic] ipxe-qemu/focal,focal,now 1.0.0+git-20190109.133f4c4-0ubuntu3 all [installed,automatic] libvirt-daemon-driver-qemu/focal,now 6.0.0-0ubuntu8 amd64 [installed,automatic] qemu-block-extra/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed,automatic] qemu-kvm/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed] qemu-system-common/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed,automatic] qemu-system-data/focal-updates,focal-updates,focal-security,focal-security,now 1:4.2-3ubuntu6.1 all [installed,automatic] qemu-system-gui/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed,automatic] qemu-system-x86/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed] qemu-utils/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed,automatic] qemu/focal-updates,focal-security,now 1:4.2-3ubuntu6.1 amd64 [installed] justin@justin-3900x:~$ This did not happen in Eoan (qemu 4.0.0). I was able to switch in/out of a VM with my audio coming through fine. I enabled Eoan in my sources.list, downgraded all my qemu packages, and the issue was resolved. This happens on the latest Windows 10 guest when a sound device is listening for the microphone. /var/log/libvirt/qemu/<vmname>.log spews this error out when I switch with evdev (which is just the keyboard and mouse, the audio is passed through I assume spice): audio: live=228193 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=228675 sw->hw->conv_buf->size=1920 A bug was just triggered in audio_pcm_hw_get_live_in Context: audio: live=228675 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=229156 sw->hw->conv_buf->size=1920 A bug was just triggered in audio_pcm_hw_get_live_in Context: audio: live=229156 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=229638 sw->hw->conv_buf->size=1920 A bug was just triggered in audio_pcm_hw_get_live_in Context: audio: live=229638 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=230119 sw->hw->conv_buf->size=1920 A bug was just triggered in audio_pcm_hw_get_live_in Context: audio: live=230119 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=230600 sw->hw->conv_buf->size=1920 A bug was just triggered in audio_pcm_hw_get_live_in Context: audio: live=230600 hw->conv_buf->size=1920 A bug was just triggered in audio_get_avail Context: audio: live=231081 sw->hw->conv_buf->size=1920 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1880066/+subscriptions