[SOLVED] Slow sound in windows VM with Pci passthrough when coming back from sleep

derp

New Member
May 30, 2017
22
0
1
35
Hello,

I'd like to switch beetween different windows 7 VMs without shuting them down every time, thus why i use the sleep option, I also tried hibernation, so i can take back where i left when restarting a VM. Problem is I get no more sound, it's completly stuttering, videos are infinitly slow because of this, otherwise everything that doesn't involve sound seems to be working. I also tried stopping the windows audio service which makes every video work fine, and then when restarting the sound service it goes back to being super slow with infinitly slow sound. I'm using Pci passthrough on my vms.

Thanks.
 
Last edited:
Does the sound work as expected before hibernating?
Does it work if you immediately wake the same machine back up after hibernating?
What is the DPC latency when you experience this distortion? There are several free (as in beer) tools to measure this.
Does the distortion get better or even disappear if you let the VM sit idle for a while after waking up?
What hardware is the harddisk? Alternatively, what hardware does the image live on?
 
1/ Before hibernating everything works fine.
2/ need to check
3/ i'll be searching for those free tools
4/ didn't try leting it sit idle, i'm currently using one and it's still the same after two hours.
5/ SSD
 
Yup, that'll explain the distorted sound :D
I'm afraid DPC latency can be extremely hard to get under control because it is influenced by lots of factors. The VFIO mailing list might be a good place to get info, as they tend to be geared much more towards entertainment than the average proxmox setup. The SSD is definitely a step in the right direction. Core pinning is said to sometimes help, but I know of no cure-all.
If the problem doesn't occur when no other machine is started while the VM is "sleeping" it might be cause by the audio device being in a different state than the VM left it in and Windows might not go through the full initialisation process when waking up. That might be configurable, but I wouldn't bet money on it.
Additionally this seems to be a recurring problem on Windows 7. If you google accordingly you may also come across a solution.
 
Okay so after disabling the QEMU DVD ROM ATA Device in device manager i got normal DPC latency.

Except this is completly unrelated to my issue. Maybe it'll help gaming ? I don't know, but i still got sound troubles.
 
Okay I found a way.
It's relatively simple actually, just had to go to device manager, disable my nvidia geforce GTX 1060 3GB (under display adapters), screen goes black and comes back to more simple graphics, then just enable it back, and a new playback device appear in sound :

Capture.PNG

Not sure if i need to enable and disable one or the other yet, but everytime one of those two is making sound and thus videos work again.
If this can help future people, i'm using the jack plug from my screen which gets sound through hdmi, and i'm actually using hibernation.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!