question

omgMajk avatar image
2 Votes"
omgMajk asked omgMajk answered

Sound stutters/lags/pops (on host machine) whenever Hyper-V is doing something

It was suggested to me on the community forums that I post my question here instead. Eventhough this is about a Windows 10 Pro machine I use to work and also game on.

For a while now I have been running WSL2 on my Windows 10 Pro machine without issues but a couple of updates ago, I'm not entirely sure when, I started hearing stutters or pops in my sound every now and then. I tried LatencyMon and it found a bunch of issues, three different sources of audio lag that it could identify (screenshots of LatencyMon below thread). I tried putting my system on high performance first, reverted to some old graphics drivers second (because I read somewhere that newer nvidia drivers could do this) and re-installed my network drivers because it said it could be related to network drivers. But today I listened a little more closely and I checked the system logs whenever I heard this audio crackle and it turns out that every single time Hyper-V is doing something in the background, something with network. I also tried disabling the Hyper-V Network Connection (WSL) but it doesn't seem to fix it entirely. I can't find any threads on this, except a very old thread that seems to have been fixed by turning system to high performance, this is as I said, already done. These log texts are included:

112741-hyperv.png

Networking driver in Virtual Machine is loaded and the protocol version is negotiated to the most recent version (Virtual machine ID 4E28C58C-BE6A-451D-A5E8-E944A5756E4D).

NIC 4E28C58C-BE6A-451D-A5E8-E944A5756E4D--FC785225-9131-5661-AC0C-3A157C61AE15 (Friendly Name: ) successfully connected to port 32097E04-6456-4FBB-AA70-A91218419EFB (Friendly Name: 5E03A28A-6836-45A1-AE15-0C24DBFDE003) on switch E4E1D1EB-6009-48AD-8CC8-E195490F0524(Friendly Name: WSL).

The operation 'Create' succeeded on nic 4E28C58C-BE6A-451D-A5E8-E944A5756E4D--FC785225-9131-5661-AC0C-3A157C61AE15 (Friendly Name: ). Port 32097E04-6456-4FBB-AA70-A91218419EFB (Friendly Name: 5E03A28A-6836-45A1-AE15-0C24DBFDE003) successfully created on switch E4E1D1EB-6009-48AD-8CC8-E195490F0524 (Friendly Name: WSL).

The operation 'Delete' succeeded on nic 0E162F26-4FC8-452F-972A-43E573F7DEFA--FC785225-9131-5661-AC0C-3A157C61AE15 (Friendly Name: ).

Also, whenever I go to my terminal and fire up ubuntu or kali, and then do a wsl --shutdown, the audio stutters again. Always. To be clear, I am not running Kali when this is happening, the above log entires happen every three minutes and every three minutes my sound stutters. WSL can be shut or running, it doesn't matter.

I have a few theories to when this started happening, I'm not exactly sure which one of them it is because they all happened in the same period and I am slow to notice things sometimes. I ran a program called Wallpaper Engine that, when I updated my graphics drivers "greenscreened" (bsod for insider edition) my system. I uninstalled that program directly after. Also, around that time, I updated windows to some new version 21H1 or some sub-update. I updated my bios to fix usb stability issues they had (amd/asus rog strix b-550-f), known issues with pci-e 4.

Does anyone know anything about this? What can I do to figure this out further?

112751-2021-07-05-04-45-49-window.png
112703-2021-07-05-04-48-20-window.png
112761-2021-07-05-04-55-41-window.png


windows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ElevenYu-MSFT avatar image
1 Vote"
ElevenYu-MSFT answered omgMajk edited

Hi,

Please use SFC tool trying to check there are corrupted system files, we can type the command "sfc /scannow" in the CMD.

Reference:

Use the System File Checker tool to repair missing or corrupted system files

If the issue persists, please try to reinstall the Hyper-V role on this host to see if it works.

Thanks,


If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Actually, looking at my installed features Hyper-V is not enabled. But I have WSL2 (so some Hyper-V features are in place) and followed this guide: https://docs.microsoft.com/en-us/windows/wsl/install-win10 to install it which means that some form of virtualization is enabled but the feature Hyper-V itself in the feature list was not enabled at all. I enabled it and I also did a sfc /scannow and the only thing it could find that was wrong was some OneDrive icons (looking at what it repaired).

The problem persists.

0 Votes 0 ·
ElevenYu-MSFT avatar image
0 Votes"
ElevenYu-MSFT answered omgMajk commented

Hi,

If you do not enable Hyper V itself but some virtualization features were enabled.

Please try below commands to see if you can disable the virtualization features and if the issue could be resolved.

CMD
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor -All

Or Powershell
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor

If issue persists, will you consider uninstalling WSL?

Thanks,


If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Is there any progress or update?

Please kindly let us know if you have any further question.

1 Vote 1 ·

I am using WSL daily in my work routine, it is by far one of the most important features in windows for me. So uninstalling it entirely is out of the question, there is just no better way to work with linux and windows in a combination available on the market.

The progress I have made was that I completely removed Kali, WSL, Hyper-V, Nvidia drivers (with DDU tool) and sound drivers and network drivers. Then re-installed all drivers as latest version from the providers websites instead of my motherboards website. I.e. intel had upgraded network drivers that was not available on my ROG Strix B-550-F site. Then I installed Nvidia drivers from December 2020, since I heard they do not cause as much audio problems - no clue what's up with that.

I then re-enabled WSL and re-installed Kali and win-kex.

Sound is still dodgy, at times, especially in my USB headset where clicks will happen when sound goes on and off and can be disturbed by shutting down WSL from command line. There is still some issue, it's better but it's not good.

0 Votes 0 ·
omgMajk avatar image
0 Votes"
omgMajk answered omgMajk commented

I turned on amd cpu optimization in bios and re-installed the latest nvidia drivers to test. I'm not sure if it got worse or better yet, more testing needs to be done.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Experimented with downgrading some realtek drivers again, going to run LatencyMon over night to see what it picks up. With all programs off.

0 Votes 0 ·

It once again picked up on Nvidia drivers so I went into windows failsafe and removed them with DDU and then installed the same ones I had (dec 2020 version 457.51 game ready) but now the stutters are worse again whenever hyperv-v-vmswitch is doing it's thing every three minutes I get stutters on both youtube and spotify. Previously during this experiment during the time I removed and re-installed WSL I only had popping noises on youtube but spotify was fine, now it's back to where it was before I started this thread.

0 Votes 0 ·

Running latencymon for a couple of hours resulted in a bsod, I examined the dump-file and it was related to some watchdog and page fault. LatencyMon does a lot with pages so it's not too surprising. I did not get a good answer out of it.

0 Votes 0 ·
omgMajk avatar image
0 Votes"
omgMajk answered

Issue opened on Microsoft WSL github https://github.com/microsoft/WSL/issues/7178

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.