5

I'm using QEMU with KVM in virt-manager, with a Windows 10 guest. I've noticed the audio is very choppy, and will cut in and out constantly.

After installing most of the virtio drivers for Windows, and trying all the different sound device options shown in virt-manager, I still get the same choppy audio. My host is Ubuntu 18.04, and I'm using headphones through a standard 3.5mm headphone jack.

This issue does not occur

  • when listening to audio on the host, or
  • when listening to audio from another Linux Guest.

I've tried searching for virtio sound drivers, but haven't had any luck. Has anyone else encountered this problem? And if so, are there any solutions?

EDIT: I'm using a SPICE server for video output, and connecting to my local machine (localhost).

wispi
  • 166

3 Answers3

1

I tried the ich6 and ich9 and had the same issue with a Windows 7 guest. I then switched to the old ac97 type, installed the hardware-driver for this in the Windows guest, and the constant skipping-audio stopped.

That said, I do still get the occasional sound-glitch, which I am attempting to solve with setting the VMM-processes to a higher priority (nice setting) in the host-machine. "Pinning" CPUs is also recommended (so the VMM has exclusive use of them).

More research suggests the only low-latency, good solution is to use a USB sound-device, passing this through to the guest, and ensure that device supports USB-reset (which, I am guessing, is an event which occurs when the device is passed from host to guest).

JosephK
  • 111
1

i am not that experienced with Spice and audio stuff, but there are other ways to pass through the Sound of the VM to the Host. I use Scream - i dont know much about it, but is seems like it just works. It uses the Networkbridge to Stream the Sound - and i havent had many trouble with it. maybe thats an alternative.

There is also a small tool somebody wrote to make it even easier to set up:

Another Idea i just got is to change the samplerate in Windows - maybe this can fix the problem :)

0

QUICK SOLUTION FOR INTERMITTENT SOUND WITH CRACKLING ON VIRTUAL MACHINE WITH WINDOWS 10 OPERATING SYSTEM

If you are using the built in sound card and an intermittent crackling sound is heard at the output do the following steps:

STEP 1. Use VirtManager and make sure that the virtual machine was shut off

STEP 2. From the Virtual Machine Manager Edit menu, select Virtual Machine Details

STEP 3. To access the virtual hardware details window, click the icon (bulb) in the toolbar

STEP 4. From the side panel, select CPUs and set the number of vCPUs to half the number of CPUs of the logical host. For example, vCPU allocation: 2 if Logical Host CPUs: 4

STEP 5. From the side panel, select Sound ich9 and set HDA (ICH6) or HDA (ICH9) model

STEP 6. Press the apply button

STEP 7. Run the guest virtual machine.

Normally, Windows 10 will automatically search and install driver for devices installed on the guest virtual machine. You can try to look for missing drivers by downloading the ISO image with virtIO drivers.


NOTE 1. If the problem is solved but occurs when using some programs, see TROUBLESHOOTING from this GUIDE, namely: My guest machine freezes consequently my USB audio interface crashing (for passthrough solution using an additional PCIe Gen3 x4 USB 3.2 card).
Troubleshooting has been tested on an USB audio interface, but should be suitable for built in sound card as well.

NOTE 2. If you are a musician and you want more productivity, most likely you will need an USB audio interface and additional PCIe devices (PCIe card passthrough solution).