How to solve latency problems and VAC under/overflows in Windows 10

USB headsets to digital audio workstation software...
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Thu May 13, 2021 12:11 pm

W2PA wrote:Maybe *average* data rates isn't the issue.

Chris,

You have to be right, it has to be something else. I'm not trying to fight anyone on this, clearly the change is helping a lot of people. I'd like to understand exactly why. But, that said, I thought it was important to kill off the myth that the default network throttling setting actually limits any sort of traffic to less than 100Mbit/s. It does not do that.

73,

Scott
User avatar
W2PA
Posts: 166
Joined: Sun Apr 09, 2017 6:34 pm
Location: LaGrangeville, NY
Contact:

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby W2PA » Thu May 13, 2021 12:17 pm

I believe that's true, Scott. But it's clearly due to side effects of whatever mechanism Win10 is using in its throttling activity.

I became convinced it was an operating system issue after eliminating nearly everything else. Also, as others observed, it became much worse after a Win10 update a few weeks ago (not sure which).

All I can figure is that whatever OS service is managing this will occasionally and briefly intervene in network traffic causing this kind of glitch.

It feels like I have a new rig! :D
73,
Chris, W2PA
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby ea3aqr » Thu May 13, 2021 2:13 pm

I'm going to edit my first post indicating just to try step #1 and go no further if issues are gone.
New call sign EA3CL
User avatar
W1JA
Posts: 93
Joined: Sun Apr 09, 2017 3:19 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby W1JA » Fri May 14, 2021 4:05 pm

Back in November 2020 I upgraded Thetis to 2.8.11. I noticed that when I turned RX2 on, I got lots of audio dropouts (analog audio from the front panel jack, not VAC audio) and red seq error indications. I first blamed it on 2.8.11 because that's when I first noticed the problem, but it turned out to be Windows' update from 1909 to 2004, which happened at about the same time. (My posts about this start here https://apache-labs.com/community/viewtopic.php?f=9&t=3557&start=180 at the bottom of the page.) I fixed the problem by going back to 1909, which has been glitch-free since.

I saw this thread and thought this might be the fix for my last-November problem. This morning I upgraded Windows from 1909 to 20H2. I turned RX2 on and immediately saw seq errors and heard audio dropouts/glitches (analog audio, not VAC) on RX2, occurring at least once per second.

I applied EA3AQR's Step 1 (the NetworkThrottlingIndex change to ffffffff). After rebooting I've been listening to RX2 audio and watching for seq error indications for over an hour. There have been no dropouts and no sequence errors.

So, I can say this change totally fixed an unusable situation.
Intel(R) Ethernet Connection (7) I219-V
Driver version: 12.18.9.11
Windows 10 Pro Version 20H2 (OS Build 19042.985)

Thank you very much Jordi EA3AQR!

73, John
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Fri May 14, 2021 5:19 pm

I have created a sticky/tacked topic in the Thetis sub-forum. It seemed most appropriate to put it there for greater visibility, rather than in the networking or audio sub-forums.

73,

Scott
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby ea3aqr » Sat May 15, 2021 7:28 am

Great!
New call sign EA3CL
User avatar
KA5KKT
Posts: 129
Joined: Thu Aug 06, 2020 6:51 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby KA5KKT » Sat May 15, 2021 2:41 pm

When I ordered my 7000 MkII I didn't realize how quickly matters would be over my head! I laugh...its really okay.

I've made the ffffffff registry change but am still getting over / underflows at varying degees of occurance. I've even had a complete shutoff of Thetis on an occasion or two. I use VAC1 for receive. I do that in order to utilize my computer and external amplifier sound system.

VAC1 Monitor.jpg
VAC1 Monitor.jpg (15.14 KiB) Viewed 9226 times


Can someone offer a few sentence explanation of the above and the significnace in Thetis operation? Hopefully it can be explained in a not too technical manner. :)
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Sun May 16, 2021 3:00 pm

A slow, occasional accumulation of under and overflows is not unusual. As long as they are not associated with audible artifacts (pops, clicks, etc.), it is nothing to worry about. If they are rapidly accumulating and you hear glitches then you need to start adjusting your settings, typically buffer size and buffer latency, to eliminate the problems. Usually this involves increasing the settings. You will have to experiment.

Also, make sure your entire setup is "48KHz clean". Go into any control panel involved with your sound devices, including and especially the Windows Sound control panel, and make certain all the devices you are using with Thetis are running at 48KHz, not that nasty 44.1KHz Windows default.
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Sun May 16, 2021 3:11 pm

I have been experimenting with this a lot over the last few days. Although my system is, in general, already very well behaved using the default Windows settings, I was able to detect a measurable decrease in audible glitches with Network Throttling turned off. It just took a long time because I don't get a lot of pops/clicks.

This also led me on a witch hunt for reducing glitches further. It takes a long time for me because it requires lengthy listening sessions where I have to remain perfectly still--I have a bit of arthritis in my neck and if I move at all my neck can make tiny little clicks that are easily mistaken for audio artifacts! :D

I've been using 96KHz for a long time in order to obtain shorter effective buffer sizes. However, since I no longer can use the shortest buffer size available (64) there was clearly no point in using 96KHz. In fact I was having to use a 256 buffer size because my DAW was unhappy with less at 96KHz. Changing back to a more conventional 48KHz has allowed me to drop to the minimum buffer size of 64 across all four major sound components: the Presonus interface, Voicemeeter, Reaper DAW, and Thetis. I was also able to drop buffer latency down to 2+2. This represents a 2ms improvement in latency over where I was with 96KHz and with fewer glitches.

Next I will try to detect if there is any difference between that setup and moving to a buffer size of 128.

73,

Scott
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby ea3aqr » Sun May 16, 2021 9:20 pm

Scott,

Could be possible to modify the next Thetis version (when released) to automatically apply registry tweaks on installatation?
New call sign EA3CL
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby Joe » Sun May 16, 2021 11:29 pm

I just worry that an update in between Thetis installations would possibly change the registry. I listed a batch file that will overwrite the registry and in my case made batch files for restart and shutdown with the registry changes, that way when a restart or shutdown after a windows update you are assured that the Network Throttling Index stays put. The batch file lines are listed under the Thetis heading here, if need I can show the lines for restart and shutdown.

73’s
Joe
WD5Y
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Mon May 17, 2021 12:32 am

Having an app make registry changes just seems wrong. I don't think you'll ever see this built into a Thetis.

There are other ways to automate this, including appropriate .bat or .reg files.
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby Joe » Mon May 17, 2021 12:52 am

The batch files I am speaking of is only two main lines. One allows a restart after a windows update whenever that occurs and the next batch file is one for the pc shutdown, both batch files perform the registry setting to disable the “Network Throttling Index” before restarting or shutting down, that way when you start back up your registry is correct. I will post the lines later if interested.

Joe
WD5Y
Joe
Posts: 190
Joined: Tue Aug 22, 2017 5:58 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby Joe » Mon May 17, 2021 1:14 am

I have a screenshot of my desktop with the shortcuts to the Restart / Shutdown batch files. I had to copy the batch files to the Notepads attached as to show the lines needed in the batch files. If you use shortcuts on the desktop like I did be sure and set the shortcuts for administrative rights in the properties setup for the shortcuts.

73's
Joe
WD5Y
Attachments
Network_Throttling_Index_Disable@Shutdown.txt
(202 Bytes) Downloaded 201 times
Network_Throttling_Disable@Restart.txt
(202 Bytes) Downloaded 191 times
Screenshot (20).png
Screenshot (20).png (1.27 MiB) Viewed 9159 times
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby K1LSB » Mon May 17, 2021 2:03 am

Scott,

I want to share an idea I'm investigating. It has to do with tweaking the values in the boxes underneath the "Force" options in the VAC window.

While playing with buffer sizes and pushing the envelope for minimum latencies, I was curious whether setting an optimal value in the boxes under "Force" (whatever that optimal value may be) might reduce the rate of underflows/overflows.

So just using trial and error, I think maybe I'm observing that adjusting the noted values to be roughly equal to the displayed values shown at the bottom of the opposite column (see pic) seems to significantly reduce the rate of underflows/overflows.

Again, I'm really pushing the extents of what I can do, look at my buffer settings (and that's on a relatively ancient 6700K).

Just wanted to put that bug in your ear.

Mark

Capture.PNG
Capture.PNG (221.37 KiB) Viewed 9153 times
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby ea3aqr » Mon May 17, 2021 7:57 am

w-u-2-o wrote:Having an app make registry changes just seems wrong. I don't think you'll ever see this built into a Thetis.

There are other ways to automate this, including appropriate .bat or .reg files.


I know there are other ways to do that, but, what about all the Anan owners who never read this forum?
It was just a proposal to wide spread the benefits of the tweak.
New call sign EA3CL
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Mon May 17, 2021 11:41 am

Mark,

My understanding is that those adjustments only work when Force is turned on. They are basically a manual method of making the adjustment and were used for testing. They should probably be removed from the UI, and I would expect no effect when allowing the resampler to run normally. You can prove this by setting them to some crazy value like 2.0 or 3.0.

73,

Scott
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby K1LSB » Mon May 17, 2021 12:40 pm

Thanks Scott, I'll check that out this evening (stuck at the work-20 all day).

Mark
w9mdb
Posts: 446
Joined: Sun Apr 09, 2017 5:53 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w9mdb » Mon May 17, 2021 1:41 pm

Seems can't make the Force number > 1.02 or < 0.98.
And I'm not seeing any effect on using FT8 -- used to be those boxes would cause drifting.

So seems Scott is right that they aren't used anymore.

Mike W9MDB
Mike W9MDB
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Mon May 17, 2021 2:20 pm

Mike,

They can be used, and their use has not changed at any time during the development of the resampler. They are to manually adjust the resampling rate when the Force box is checked.

v/r

Scott
User avatar
W2PA
Posts: 166
Joined: Sun Apr 09, 2017 6:34 pm
Location: LaGrangeville, NY
Contact:

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby W2PA » Mon May 17, 2021 6:40 pm

ea3aqr wrote:
w-u-2-o wrote:Having an app make registry changes just seems wrong. I don't think you'll ever see this built into a Thetis.

There are other ways to automate this, including appropriate .bat or .reg files.


I know there are other ways to do that, but, what about all the Anan owners who never read this forum?
It was just a proposal to wide spread the benefits of the tweak.


Just to chime in with my two cents on this...
I tend to agree with Scott that it seems an application shouldn't change global registry settings, although it's probably commonplace for applications to add new entries.

So I don't really see a great way to handle this except to make reference to it in the various online documents and here on the forum. The new highly visible sticky entry by Scott might suffice, only if people are directed to the forum. It seems to me that for users of OpenHPSDR and Thetis it's common knowledge that you're operating at the "bleeding edge", that advanced capability is often accompanied by glitches, and therefore it's a good idea to keep track of the community information.

The batch file or some other method that automates this registry change would make this easy for those not familiar with the Windows registry, or queasy about touching it. So perhaps packaging it with the Thetis releases (in the Git repo) along with instructions for its use, would be a good thing to do. And after all, not everyone is having this problem.
73,
Chris, W2PA
User avatar
KA5KKT
Posts: 129
Joined: Thu Aug 06, 2020 6:51 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby KA5KKT » Mon May 17, 2021 7:17 pm

Despite making the registry changes I'm continuing to have dropouts. I use VAC for RX audio. Sometimes there are blips in RX audio. Sometimes there are temporary disconnects to the hardware and sometimes the software shuts off completely. Restarting Thetis resolves the situation at times. Other times a complete power Off/On cycle for the hardware seems necessary.

Thoughts..?
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby w-u-2-o » Mon May 17, 2021 9:16 pm

KA5KKT wrote:Despite making the registry changes I'm continuing to have dropouts. I use VAC for RX audio. Sometimes there are blips in RX audio. Sometimes there are temporary disconnects to the hardware and sometimes the software shuts off completely. Restarting Thetis resolves the situation at times. Other times a complete power Off/On cycle for the hardware seems necessary.

Thoughts..?

My bet is on sub-optimal firmware for your hardware. This is quite a bit of thread drift. I recommend you start a new topic and when we figure it out we'll move the topic to the right sub-forum.
User avatar
I2NOY
Posts: 89
Joined: Thu Mar 25, 2021 10:44 am
Location: Milano - Italy

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby I2NOY » Tue Jun 01, 2021 9:52 am

Hi, I am trying different levels of buffer size but in my system, when I close Thetis, next time I run it, the default 2048 is appearing.
Same on the checkbox of enabling VAC only when in a digital mode.
It is only on me, or other people noted this behavior?
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby ea3aqr » Tue Jun 01, 2021 10:05 am

I2NOY wrote:Hi, I am trying different levels of buffer size but in my system, when I close Thetis, next time I run it, the default 2048 is appearing.
Same on the checkbox of enabling VAC only when in a digital mode.
It is only on me, or other people noted this behavior?


Are you saving your transmit profile after changes?
New call sign EA3CL
User avatar
I2NOY
Posts: 89
Joined: Thu Mar 25, 2021 10:44 am
Location: Milano - Italy

Re: How to solve latency problems and VAC under/overflows in Windows 10

Postby I2NOY » Tue Jun 08, 2021 8:54 am

No at first.
Now I learned that I have to save TX profile to memorize changes.
Many thanks. ;)

Return to “Digital ("Virtual") Audio”