VAC under/overflows due to changes in how Windows handles Timer resolution

USB headsets to digital audio workstation software...
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 9:40 am

Tony EI7BMB wrote:
ea3aqr wrote:
Tony EI7BMB wrote:I have tried going back to previous version of windows and although the process seemed to go ok the problem remains.


Windows 10 v. 1903?


Windows 10.0.18363 Build 18363


This is W10 v.1909.

I don't remember if V.1909 is also afected by this issue, for sure v.1903 (13362) isn't.
New call sign EA3CL
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby K1LSB » Wed May 05, 2021 9:43 am

Windows version 20H2 on an i7-6700K, no under/overflows running MOTU M4 ASIO thru Voicemeeter Potato with 0-0 Ring Buffers and 0-0 PortAudio. Prolly should count my blessings!

Mark
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 9:56 am

You are right of course , I am back to 1909 which was installed on 14/10/2019 but it seems the roll back to this did not revert fully as I still have the problem.

ea3aqr wrote:
This is W10 v.1909.

I don't remember if V.1909 is also afected by this issue, for sure v.1903 (13362) isn't.


Edit: I may have misspoken Re testing on 1909 shows the following correction

FireShot Capture 148 -  - .png
FireShot Capture 148 - - .png (13.84 KiB) Viewed 8132 times

Although the request is showing as outstanding a helpful person on the voicemeeter forum gave the following info

"It's normal for a timer request to be 'outstanding' - Imagine this scenario:

App 1 requests 1ms timer
App 2 requests 1ms timer
App 1 exits

What will occur is:

Step 1 will result in decreasing the timer period per App 1's request.
Step 2 will result in the timer not being altered as it is already in the desired state. The request is kept.
Step 3 will result in App 1's timer request being removed, thus allowing the timer to return to default state...
However, the request from App 2 is still outstanding, and now it takes effect.
Accordingly, no change is made to the timer.

Without this 'outstanding' request to change the timer config, step 3 would result in App 1's request being cleared, and the timer returning to normal, leaving App 2 with the wrong timer config."
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 1:16 pm

Hi Mark, I wonder if you know of any other programs running that might be setting the clock to the correct setting , 10000 I believe for Thetis , IE one that windows 10 recognizes the command like another audio program running in the background perhaps? I'm just trying to figure out why some are affected and not others


K1LSB wrote:Windows version 20H2 on an i7-6700K, no under/overflows running MOTU M4 ASIO thru Voicemeeter Potato with 0-0 Ring Buffers and 0-0 PortAudio. Prolly should count my blessings!

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

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby K1LSB » Wed May 05, 2021 2:14 pm

Tony,

I'm at work right now so I can't verify, but I don't think there's anything else running on my system that might be controlling audio.

I do know that Windows Sound Scheme is set to "No Sounds". Maybe that's relevant, I dunno..

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

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 2:21 pm

K1LSB wrote:Tony,

I'm at work right now so I can't verify, but I don't think there's anything else running on my system that might be controlling audio.

I do know that Windows Sound Scheme is set to "No Sounds". Maybe that's relevant, I dunno..

Mark


Tested with windows sounds deactivated and timer resolution not changing on request
New call sign EA3CL
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 2:41 pm

Tony EI7BMB wrote:Hi Mark, I wonder if you know of any other programs running that might be setting the clock to the correct setting , 10000 I believe for Thetis , IE one that windows 10 recognizes the command like another audio program running in the background perhaps? I'm just trying to figure out why some are affected and not others


K1LSB wrote:Windows version 20H2 on an i7-6700K, no under/overflows running MOTU M4 ASIO thru Voicemeeter Potato with 0-0 Ring Buffers and 0-0 PortAudio. Prolly should count my blessings!

Mark


Tony,

I think it is not a matter of installed software...

I have a second ssd for debuging this isue with just the default Windows 10 v1903 install, all needed drivers and Thetis.
It works rock solid as it used to do on my main OS. After updating the debug OS to v20H2 via Windows Update all is messed again. I've also installed a fresh W10 v20H2 to discard problems with the Windows update process itself but, unfortunately, the fresh W10 v20H2 also fails.

Rolling back to v1903 (via Windows update or installing a fresh OS) and all is working fine.

That is for sure a problem with the update.

Unfortunately I can no go further by myself and looks like that the developer team is not so much interested in this issue.

Also is a bit dissaponting the lack of cooperation from other forum members (just 2 Powercfg reports after 280 views).
Last edited by ea3aqr on Wed May 12, 2021 11:00 pm, edited 1 time in total.
New call sign EA3CL
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 3:21 pm

Yes more powercfg reports would be helpful especially from guys who have latest windows 10 and are not experiencing any problems. To be honest as this is all done by volunteers I'm not sure there is a developer team right now. Maybe Abhi from Apache labs could have someone investigate the issue.

Mark thanks for your reply.
W4WMT
Posts: 325
Joined: Sun Apr 09, 2017 10:12 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby W4WMT » Wed May 05, 2021 4:08 pm

Hi All,

Thetis' VAC1 & VAC2 use the PortAudio library to do all its IO to the sound hardware drivers. I subscribe to the PortAudio mail reflector and scan
or read all the messages that come across. I have seen zero chatter about this issue amongst the PA developers. FWIW.

73, Bryan W4WMT
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 4:14 pm

Look like finally I've solved the issue with some registry tweaks! :D

Give me some more time to test it properly and I will post the solution.

Tony, in a few minutes you'll have a PM!
New call sign EA3CL
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 4:17 pm

Thanks for the info Bryan, seems its not a widespread problem

W4WMT wrote:Hi All,

Thetis' VAC1 & VAC2 use the PortAudio library to do all its IO to the sound hardware drivers. I subscribe to the PortAudio mail reflector and scan
or read all the messages that come across. I have seen zero chatter about this issue amongst the PA developers. FWIW.

73, Bryan W4WMT
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 4:18 pm

Gracias mi amigo :)

ea3aqr wrote:Look like finally I've solved the issue with some registry tweaks! :D

Give me some more time to test it properly and I will post the solution.

Tony, in a few minutes you'll have a PM!
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 4:35 pm

Tony EI7BMB wrote:Gracias mi amigo :)

ea3aqr wrote:Look like finally I've solved the issue with some registry tweaks! :D

Give me some more time to test it properly and I will post the solution.

Tony, in a few minutes you'll have a PM!


Tony, check you PMs
New call sign EA3CL
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby w-u-2-o » Wed May 05, 2021 4:43 pm

In the FWIW department:

I've been playing with this for two days now, just to see what's what. I don't think the reports in powercfg have a lot of meaning, but that's just a gut feel. I get the same reports as everyone else.

One thing I did notice is that I was having some very slight ticks/pops on the audio. I changed from:

ASIO, 96KHz, Buffer 128, Portaudio both 0, Ringbuffer 5 and 8

to:

ASIO, 96KHz, Buffer 512, Portaudio both 0, Ringbuffer 0 and 0

And this made the audio buttery smooth. I have some "leakage" of under/overruns in VAC, but these are never audible.

These seem to be near equivalents in terms of latency, i.e. 1.3ms of buffer plus 5ms+ of ringbuffer vs. 5.2ms of buffer plus no ringbuffer.

Also, the weak link in the chain for me is Reaper DAW. If I use Voicemeeter alone I can go with the former setting and Ringbuffer at 2.

Finally, if there is really a culprit (perhaps only for Ryzen users) in 20H2 et al, then it probably has to do with blocking channelmaster.dll calls for IF processing and nothing at all to do with PortAudio, VAC and Windows audio stuff. Someone can prove this by seeing if they get pops/clicks/glitches on the ANAN headphone or speaker outputs, neither of which has anything at all to do with VAC or Windows audio stuff.
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 4:49 pm

w-u-2-o wrote:In the FWIW department:

I've been playing with this for two days now, just to see what's what. I don't think the reports in powercfg have a lot of meaning, but that's just a gut feel. I get the same reports as everyone else.

One thing I did notice is that I was having some very slight ticks/pops on the audio. I changed from:

ASIO, 96KHz, Buffer 128, Portaudio both 0, Ringbuffer 5 and 8

to:

ASIO, 96KHz, Buffer 512, Portaudio both 0, Ringbuffer 0 and 0

And this made the audio buttery smooth. I have some "leakage" of under/overruns in VAC, but these are never audible.

These seem to be near equivalents in terms of latency, i.e. 1.3ms of buffer plus 5ms+ of ringbuffer vs. 5.2ms of buffer plus no ringbuffer.

Also, the weak link in the chain for me is Reaper DAW. If I use Voicemeeter alone I can go with the former setting and Ringbuffer at 2.

Finally, if there is really a culprit (perhaps only for Ryzen users) in 20H2 et al, then it probably has to do with blocking channelmaster.dll calls for IF processing and nothing at all to do with PortAudio, VAC and Windows audio stuff. Someone can prove this by seeing if they get pops/clicks/glitches on the ANAN headphone or speaker outputs, neither of which has anything at all to do with VAC or Windows audio stuff.


After some registry tweaks my system is rock solid again at 3/4 ms IN/OUT.

I've sent those tweaks to Tony for testing. I will post the solution if it also works in his PC.

My powercfg report still shows a current timer resolution of 15.6ms, but no more under/overflows on VAC.
New call sign EA3CL
User avatar
rbduck
Posts: 327
Joined: Tue Dec 03, 2019 1:49 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby rbduck » Wed May 05, 2021 5:08 pm

ea3aqr wrote:After some registry tweaks my system is rock solid again at 3/4 ms IN/OUT.

I've sent those tweaks to Tony for testing. I will post the solution if it also works in his PC.

My powercfg report still shows a current timer resolution of 15.6ms, but no more under/overflows on VAC.


It would really be nice if you have the issue resolved with registry tweaks.

I read that suggested article about the changes in Windows 10. I understand what the writer is saying but at the end it seems all he could offer was speculation as to why they made the change. It was interesting reading.

Thank you for your diligence with this issue.
73
Ruben
NB4R
Apache-Labs Anan 7000DLE MKII Black -- Thetis 2.10.3.6 dev_2 -- Windows 11
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 5:13 pm

rbduck wrote:
ea3aqr wrote:After some registry tweaks my system is rock solid again at 3/4 ms IN/OUT.

I've sent those tweaks to Tony for testing. I will post the solution if it also works in his PC.

My powercfg report still shows a current timer resolution of 15.6ms, but no more under/overflows on VAC.


It would really be nice if you have the issue resolved with registry tweaks.

I read that suggested article about the changes in Windows 10. I understand what the writer is saying but at the end it seems all he could offer was speculation as to why they made the change. It was interesting reading.

Thank you for your diligence with this issue.


After +30 min runing Thetis it is working like a charm!. VAC set to 3/4 and radio behaves like on W10 v.1903
Waiting the results from Tony to post the solution.
New call sign EA3CL
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby K1LSB » Wed May 05, 2021 5:21 pm

What do you mean by "VAC set to 3/4"?
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby K1LSB » Wed May 05, 2021 5:28 pm

Scott,

FWIW my VAC settings are 256 buffers and 48K sample rate, ASIO (0/0 Ringbuffers and 0/0 PortAudio as noted earlier).

Just curious, may I ask why you decided on 96K sample rate?

TIA,

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

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 5:29 pm

K1LSB wrote:What do you mean by "VAC set to 3/4"?


RingBuffer set at 3ms IN and 4 ms OUT
New call sign EA3CL
K1LSB
Posts: 639
Joined: Wed Feb 05, 2020 5:25 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby K1LSB » Wed May 05, 2021 5:30 pm

Ah, I understand now, thanks.

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

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 5:46 pm

My VAC settings are:

Buffer size: 64
Sample rate: 96000
Ring Buffer IN: 3
Ring Buffer OUT: 4
Port Audio: both at 0
New call sign EA3CL
User avatar
Tony EI7BMB
Posts: 651
Joined: Sun Apr 09, 2017 2:31 pm
Location: Dublin
Contact:

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby Tony EI7BMB » Wed May 05, 2021 6:36 pm

I have implemented Jordi's (EA3AQR) fix and audio now looks very solid on Windows 20H2. Many thanks to Jordi for coming up with this solution.
User avatar
rbduck
Posts: 327
Joined: Tue Dec 03, 2019 1:49 pm

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby rbduck » Wed May 05, 2021 6:51 pm

Yes Indeed. I have to say that Jordi did it. So far am running the same timings that Jordi posted above with the exception I was only able to use 5 in and 5 out on the Ring Buffer. I am not complaining at all it' is much better than what it was. Thank you Jordi for your help.
73
Ruben
NB4R
Apache-Labs Anan 7000DLE MKII Black -- Thetis 2.10.3.6 dev_2 -- Windows 11
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 7:14 pm

Tony and Ruben, I'm very happy it has worked!

I'm going to take a break and relax enjoying a smoked scottish (I'm sorry Tony ;) ) single malt whisky after dinner.

It was a 30 days hard work for debuging this issue...

I'll open a new post (linked from this) with my solution.

I'm a happy camper! :D :D :D
New call sign EA3CL
ea3aqr
Posts: 270
Joined: Mon Mar 04, 2019 10:50 pm
Location: BCN

Re: VAC under/overflows due to changes in how Windows handles Timer resolution

Postby ea3aqr » Wed May 05, 2021 9:05 pm

New call sign EA3CL

Return to “Digital ("Virtual") Audio”