Question High WDM audio driver latency with Focusrite Audio Interface compared to Nvidia HDMI audio ?

AlexMysh

Prominent
Dec 31, 2022
9
0
510
Hi everyone,

I have a brand new Focusrite Scarlett 4i4 4th Generation USB Audio Interface.
This card is a professional audio interface that means it has ASIO windows drivers with <5ms audio latency(it works perfectly).
However it also has standard Windows audio drivers (consumer interface), such as Realtek, or Nvidia HDMI audio.

My great disappointment was that the Focusrite has 80ms greater audio latency than other standard consumer audio ( Nvidia High Definition Audio)

I used an online audio latency test https://nullvoxpopuli.github.io/latency-tester/
It is straightforward: you tap button while you hear the sound and thus roundtrip is measured.
I performed several measurements and I get these:

75ms if I use Realtek audio
141ms if I use HDMI (Nvidia High Definition Audio) converted by Samsung SE790C monitor to analogue audio
220ms if I use Focusrite audio interface

So question is - is there any way to reduce audio latency when using the Focusrite?
 

AlexMysh

Prominent
Dec 31, 2022
9
0
510
What does LatencyMon report?
It reports everything is OK:

_________________________________________________________________________________________________________
CONCLUSION
_________________________________________________________________________________________________________
Your system appears to be suitable for handling real-time audio and other tasks without dropouts.
LatencyMon has been analyzing your system for 0:01:13 (h:mm:ss) on all processors.


_________________________________________________________________________________________________________
SYSTEM INFORMATION
_________________________________________________________________________________________________________
Computer name: DESKTOP
OS version: Windows 11, 10.0, version 2009, build: 22631 (x64)
Hardware: ASUS TUF Gaming F15 FX507ZR_FX507ZR, ASUSTeK COMPUTER INC.
BIOS: FX507ZR.316
CPU: GenuineIntel 12th Gen Intel(R) Core(TM) i7-12700H
Logical processors: 20
Processor groups: 1
Processor group size: 20
RAM: 16002 MB total


_________________________________________________________________________________________________________
CPU SPEED
_________________________________________________________________________________________________________
Reported CPU speed (WMI): 230 MHz
Reported CPU speed (registry): 2688 MHz

Note: reported execution times may be calculated based on a fixed reported CPU speed. Disable variable speed settings like Intel Speed Step and AMD Cool N Quiet in the BIOS setup for more accurate results.


_________________________________________________________________________________________________________
MEASURED INTERRUPT TO USER PROCESS LATENCIES
_________________________________________________________________________________________________________
The interrupt to process latency reflects the measured interval that a usermode process needed to respond to a hardware request from the moment the interrupt service routine started execution. This includes the scheduling and execution of a DPC routine, the signaling of an event and the waking up of a usermode thread from an idle wait state in response to that event.

Highest measured interrupt to process latency (µs): 276.40
Average measured interrupt to process latency (µs): 9.789771

Highest measured interrupt to DPC latency (µs): 269.40
Average measured interrupt to DPC latency (µs): 3.161616


_________________________________________________________________________________________________________
REPORTED ISRs
_________________________________________________________________________________________________________
Interrupt service routines are routines installed by the OS and device drivers that execute in response to a hardware interrupt signal.

Highest ISR routine execution time (µs): 70.034226
Driver with highest ISR routine execution time: Wdf01000.sys - Kernel Mode Driver Framework Runtime, Microsoft Corporation

Highest reported total ISR routine time (%): 0.000502
Driver with highest ISR total time: Wdf01000.sys - Kernel Mode Driver Framework Runtime, Microsoft Corporation

Total time spent in ISRs (%) 0.000502

ISR count (execution time <250 µs): 672
ISR count (execution time 250-500 µs): 0
ISR count (execution time 500-1000 µs): 0
ISR count (execution time 1000-2000 µs): 0
ISR count (execution time 2000-4000 µs): 0
ISR count (execution time >=4000 µs): 0


_________________________________________________________________________________________________________
REPORTED DPCs
_________________________________________________________________________________________________________
DPC routines are part of the interrupt servicing dispatch mechanism and disable the possibility for a process to utilize the CPU while it is interrupted until the DPC has finished execution.

Highest DPC routine execution time (µs): 338.268601
Driver with highest DPC routine execution time: ntoskrnl.exe - NT Kernel & System, Microsoft Corporation

Highest reported total DPC routine time (%): 0.014176
Driver with highest DPC total execution time: ntoskrnl.exe - NT Kernel & System, Microsoft Corporation

Total time spent in DPCs (%) 0.030487

DPC count (execution time <250 µs): 27554
DPC count (execution time 250-500 µs): 0
DPC count (execution time 500-10000 µs): 8
DPC count (execution time 1000-2000 µs): 0
DPC count (execution time 2000-4000 µs): 0
DPC count (execution time >=4000 µs): 0


_________________________________________________________________________________________________________
REPORTED HARD PAGEFAULTS
_________________________________________________________________________________________________________
Hard pagefaults are events that get triggered by making use of virtual memory that is not resident in RAM but backed by a memory mapped file on disk. The process of resolving the hard pagefault requires reading in the memory from disk while the process is interrupted and blocked from execution.

NOTE: some processes were hit by hard pagefaults. If these were programs producing audio, they are likely to interrupt the audio stream resulting in dropouts, clicks and pops. Check the Processes tab to see which programs were hit.

Process with highest pagefault count: aswtoolssvc.exe

Total number of hard pagefaults 1706
Hard pagefault count of hardest hit process: 592
Number of processes hit: 38


_________________________________________________________________________________________________________
PER CPU DATA
_________________________________________________________________________________________________________
CPU 0 Interrupt cycle time (s): 2.515739
CPU 0 ISR highest execution time (µs): 70.034226
CPU 0 ISR total execution time (s): 0.004975
CPU 0 ISR count: 428
CPU 0 DPC highest execution time (µs): 258.340774
CPU 0 DPC total execution time (s): 0.071589
CPU 0 DPC count: 8974
_________________________________________________________________________________________________________
CPU 1 Interrupt cycle time (s): 1.836888
CPU 1 ISR highest execution time (µs): 0.0
CPU 1 ISR total execution time (s): 0.0
CPU 1 ISR count: 0
CPU 1 DPC highest execution time (µs): 0.0
CPU 1 DPC total execution time (s): 0.0
CPU 1 DPC count: 0
_________________________________________________________________________________________________________
CPU 2 Interrupt cycle time (s): 1.572507
CPU 2 ISR highest execution time (µs): 0.0
CPU 2 ISR total execution time (s): 0.0
CPU 2 ISR count: 0
CPU 2 DPC highest execution time (µs): 172.870536
CPU 2 DPC total execution time (s): 0.001855
CPU 2 DPC count: 182
_________________________________________________________________________________________________________
CPU 3 Interrupt cycle time (s): 1.501954
CPU 3 ISR highest execution time (µs): 0.0
CPU 3 ISR total execution time (s): 0.0
CPU 3 ISR count: 0
CPU 3 DPC highest execution time (µs): 0.0
CPU 3 DPC total execution time (s): 0.0
CPU 3 DPC count: 0
_________________________________________________________________________________________________________
CPU 4 Interrupt cycle time (s): 3.279864
CPU 4 ISR highest execution time (µs): 34.933036
CPU 4 ISR total execution time (s): 0.002368
CPU 4 ISR count: 244
CPU 4 DPC highest execution time (µs): 338.268601
CPU 4 DPC total execution time (s): 0.323904
CPU 4 DPC count: 13782
_________________________________________________________________________________________________________
CPU 5 Interrupt cycle time (s): 5.694333
CPU 5 ISR highest execution time (µs): 0.0
CPU 5 ISR total execution time (s): 0.0
CPU 5 ISR count: 0
CPU 5 DPC highest execution time (µs): 0.0
CPU 5 DPC total execution time (s): 0.0
CPU 5 DPC count: 0
_________________________________________________________________________________________________________
CPU 6 Interrupt cycle time (s): 3.050394
CPU 6 ISR highest execution time (µs): 0.0
CPU 6 ISR total execution time (s): 0.0
CPU 6 ISR count: 0
CPU 6 DPC highest execution time (µs): 232.357887
CPU 6 DPC total execution time (s): 0.025531
CPU 6 DPC count: 3297
_________________________________________________________________________________________________________
CPU 7 Interrupt cycle time (s): 3.244306
CPU 7 ISR highest execution time (µs): 0.0
CPU 7 ISR total execution time (s): 0.0
CPU 7 ISR count: 0
CPU 7 DPC highest execution time (µs): 233.261905
CPU 7 DPC total execution time (s): 0.011822
CPU 7 DPC count: 600
_________________________________________________________________________________________________________
CPU 8 Interrupt cycle time (s): 1.526121
CPU 8 ISR highest execution time (µs): 0.0
CPU 8 ISR total execution time (s): 0.0
CPU 8 ISR count: 0
CPU 8 DPC highest execution time (µs): 264.263393
CPU 8 DPC total execution time (s): 0.002015
CPU 8 DPC count: 134
_________________________________________________________________________________________________________
CPU 9 Interrupt cycle time (s): 1.545432
CPU 9 ISR highest execution time (µs): 0.0
CPU 9 ISR total execution time (s): 0.0
CPU 9 ISR count: 0
CPU 9 DPC highest execution time (µs): 0.0
CPU 9 DPC total execution time (s): 0.0
CPU 9 DPC count: 0
_________________________________________________________________________________________________________
CPU 10 Interrupt cycle time (s): 1.685627
CPU 10 ISR highest execution time (µs): 0.0
CPU 10 ISR total execution time (s): 0.0
CPU 10 ISR count: 0
CPU 10 DPC highest execution time (µs): 213.735863
CPU 10 DPC total execution time (s): 0.003818
CPU 10 DPC count: 222
_________________________________________________________________________________________________________
CPU 11 Interrupt cycle time (s): 1.66510
CPU 11 ISR highest execution time (µs): 0.0
CPU 11 ISR total execution time (s): 0.0
CPU 11 ISR count: 0
CPU 11 DPC highest execution time (µs): 169.940476
CPU 11 DPC total execution time (s): 0.001129
CPU 11 DPC count: 69
_________________________________________________________________________________________________________
CPU 12 Interrupt cycle time (s): 0.625530
CPU 12 ISR highest execution time (µs): 0.0
CPU 12 ISR total execution time (s): 0.0
CPU 12 ISR count: 0
CPU 12 DPC highest execution time (µs): 178.269345
CPU 12 DPC total execution time (s): 0.001250
CPU 12 DPC count: 100
_________________________________________________________________________________________________________
CPU 13 Interrupt cycle time (s): 0.493106
CPU 13 ISR highest execution time (µs): 0.0
CPU 13 ISR total execution time (s): 0.0
CPU 13 ISR count: 0
CPU 13 DPC highest execution time (µs): 112.368304
CPU 13 DPC total execution time (s): 0.000248
CPU 13 DPC count: 13
_________________________________________________________________________________________________________
CPU 14 Interrupt cycle time (s): 0.437061
CPU 14 ISR highest execution time (µs): 0.0
CPU 14 ISR total execution time (s): 0.0
CPU 14 ISR count: 0
CPU 14 DPC highest execution time (µs): 0.0
CPU 14 DPC total execution time (s): 0.0
CPU 14 DPC count: 0
_________________________________________________________________________________________________________
CPU 15 Interrupt cycle time (s): 0.388599
CPU 15 ISR highest execution time (µs): 0.0
CPU 15 ISR total execution time (s): 0.0
CPU 15 ISR count: 0
CPU 15 DPC highest execution time (µs): 0.0
CPU 15 DPC total execution time (s): 0.0
CPU 15 DPC count: 0
_________________________________________________________________________________________________________
CPU 16 Interrupt cycle time (s): 0.567757
CPU 16 ISR highest execution time (µs): 0.0
CPU 16 ISR total execution time (s): 0.0
CPU 16 ISR count: 0
CPU 16 DPC highest execution time (µs): 37.109375
CPU 16 DPC total execution time (s): 0.000277
CPU 16 DPC count: 29
_________________________________________________________________________________________________________
CPU 17 Interrupt cycle time (s): 0.473539
CPU 17 ISR highest execution time (µs): 0.0
CPU 17 ISR total execution time (s): 0.0
CPU 17 ISR count: 0
CPU 17 DPC highest execution time (µs): 0.0
CPU 17 DPC total execution time (s): 0.0
CPU 17 DPC count: 0
_________________________________________________________________________________________________________
CPU 18 Interrupt cycle time (s): 0.483453
CPU 18 ISR highest execution time (µs): 0.0
CPU 18 ISR total execution time (s): 0.0
CPU 18 ISR count: 0
CPU 18 DPC highest execution time (µs): 134.468750
CPU 18 DPC total execution time (s): 0.001197
CPU 18 DPC count: 114
_________________________________________________________________________________________________________
CPU 19 Interrupt cycle time (s): 0.458914
CPU 19 ISR highest execution time (µs): 0.0
CPU 19 ISR total execution time (s): 0.0
CPU 19 ISR count: 0
CPU 19 DPC highest execution time (µs): 147.992560
CPU 19 DPC total execution time (s): 0.000954
CPU 19 DPC count: 46
_________________________________________________________________________________________________________
 

ubuysa

Distinguished
What is interesting in there are the hard page faults - these are page faults that required a page to be fetched from the pagefile. You had 1706 hard page faults in 73 seconds, that's 23 hard page faults per second and that's a lot. How much RAM do you have installed?

It's also interesting that the process suffering the most from hard page faults was aswtoolssvc.exe; a component of Avast Security. Whilst there is no direct evidence that Avast is the root cause of your audio latency, servicing page faults is a priority for the OS and is time consuming, so it is possible that Avast is the root cause.

Would you uninstall Avast completely using the special removal tool? If the audio latency doesn't change then we can discount Avast as a cause - but if the latency improves then you have your culprit.
 

AlexMysh

Prominent
Dec 31, 2022
9
0
510
I have found a workaround for this problem:
I have connected audio jack of notebook to analogue inputs of Sound card, so i have the lowest latency possible in my system and no audible audio distortion and am able to control sound volume by frontal audio knob (however input is -18dB, but it is not an issue)
the cable is 5m length with 3.5 jack in and two mono 6.3 jacks out for ~ $12 price.

I can programmatically switch output for realtek (low- latency gaming) and Focusrite (pro music for ASIO interface) and still has sound out of pro audio monitors.

Not a software solution, but i doubt there is anything I can do to reduce Focusrite drivers latency so far
 

AlexMysh

Prominent
Dec 31, 2022
9
0
510
What is interesting in there are the hard page faults - these are page faults that required a page to be fetched from the pagefile. You had 1706 hard page faults in 73 seconds, that's 23 hard page faults per second and that's a lot. How much RAM do you have installed?

It's also interesting that the process suffering the most from hard page faults was aswtoolssvc.exe; a component of Avast Security. Whilst there is no direct evidence that Avast is the root cause of your audio latency, servicing page faults is a priority for the OS and is time consuming, so it is possible that Avast is the root cause.

Would you uninstall Avast completely using the special removal tool? If the audio latency doesn't change then we can discount Avast as a cause - but if the latency improves then you have your culprit.
I have tried turning off Avast, but no audible change happens