INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WDM driver clicks and pops issue  (Read 3763 times)

jjazdk

  • World Citizen
  • ***
  • Posts: 140
WDM driver clicks and pops issue
« on: June 06, 2018, 04:12:19 pm »

Hi All,

I am having issues with the WDM driver, and the issue has been persistent through different Windows versions, different hardware and MC version 22/23/24.

The WDM driver always has dropouts, though the amount varies. Sometimes I have a pop/click/dropout every few minutes, other times they happen every few seconds. But I never have a totally transparent link. It hasn't been much of an issue as I have all my music on a server, and thus did not use the WDM driver much, but.. Streaming services makes it a necessity to get it to work now.

I have of course toyed around with various buffer settings, without being able to get a clean stream through the WDM driver.

The computer is dedicated as a media center and runs Windows 10 without a ton of other software.
HW specs are:
AMD FX-6350
16GB RAM
SSD drive
RX-480 8GB

Let me know what information to provide about my system.

I have made a recording of the issue, which can be downloaded here (52MB stereo WAV file) : www.jjaz.dk/privat/sounds/WDM-issue.wav
Logged
Working on my 12 channel JRiver entertainment center :-)

jjazdk

  • World Citizen
  • ***
  • Posts: 140
Re: WDM driver clicks and pops issue
« Reply #1 on: June 08, 2018, 02:00:09 am »

Hi Guys,

I really need help with this issue, isn't there someone who can guide me?
Logged
Working on my 12 channel JRiver entertainment center :-)

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: WDM driver clicks and pops issue
« Reply #2 on: June 08, 2018, 02:14:18 am »

It is hard to know what to advise without knowing what might cause the issue. You might check dpc latency perhaps to see if that gives any clues.
Logged

jjazdk

  • World Citizen
  • ***
  • Posts: 140
Re: WDM driver clicks and pops issue
« Reply #3 on: June 08, 2018, 02:29:58 am »

It is hard to know what to advise without knowing what might cause the issue. You might check dpc latency perhaps to see if that gives any clues.

Thanks a lot for the answer. DPC latency was a new term to me, I will have to read up on how to check that. Is there a preferred tool for checking DPC latency?

What puzzles me is that the WDM driver has never worked flawlessly for me, on numerous Windows versions, MC versions and even on different hardware, although others report that it works perfect.
Logged
Working on my 12 channel JRiver entertainment center :-)

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7810
  • Autumn shade...
Re: WDM driver clicks and pops issue
« Reply #4 on: June 08, 2018, 02:36:36 am »

For Windows 10, I'd use LatencyMon.

http://www.resplendence.com/latencymon
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4231
Re: WDM driver clicks and pops issue
« Reply #5 on: June 08, 2018, 02:42:36 am »

What puzzles me is that the WDM driver has never worked flawlessly for me, on numerous Windows versions, MC versions and even on different hardware, although others report that it works perfect.
I use the same one as Awesome Donkey, I think that's the only one that works on Win10 and is actively maintained.

The problem is there is no way to see where the problem lies. I would have thought it will invariably be causes by some buffer or another overflowing but it's impossible (AFAIK) to trace this flow so it's hard to pinpoint the problem. Ultimately it's a sign that your system can't do real time processing so looking for things that affect that (e.g. badly behaving drivers) is the way to go.

This means one way to go is to strip the OS back to a clean install with absolutely minimal added hardware then test, if no crackles then repeat the test as you add one piece back at a time til it starts going wrong.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: WDM driver clicks and pops issue
« Reply #6 on: June 08, 2018, 08:19:52 am »

One thing I have found which helps narrow down devices causing problems with DPC latency is the Windows Performance Toolkit, available as part of the Windows ADK.
 
With it installed you can use the Windows Performance Recorder to record a trace for analysis (note: this can produce several GB of data in a short amount of time so you don't want to run it for long; 30-120s is usually sufficient) and then analyze that with the Windows Performance Analyzer.
 
There, you can display a graph of "DPC/ISR Duration by Module" and isolate which drivers may be causing it.
Unfortunately, if it's pointing to a general USB or similar driver, you have to use a process of elimination to figure out which device may be causing high DPC latency.
 
I've found this to be more useful than LatencyMon, as that was often pointing to the wrong device as causing problems for DPC latency. When I actually dove into it using WPA, that device was far down on the list of things causing problems.

In my case, the biggest issue was actually a SATA add-in card that I was using to add a pair of optical drives to the system.
storahci.sys was spiking to 350µs every second or two when idle, and is now ~5µs when idle.
At some point I'll probably see if swapping things around and moving them to a motherboard port rather than the add-in card helps, but for now I just disabled those SATA ports as I only use the drives once or twice a month anyway, and it takes 30 seconds to change.
 
I also found that having my DAC in "always on" mode rather than "power saving" mode added a constant amount of DPC latency to the USB driver, which got even higher when audio was being played.
Changing it to "power saving" mode essentially removed an offset, as it turns out the DPC latency during playback was being added on top of it.
I do only use my DAC in Media Center though, and not as the default system device. In MC, I can use the 1/4 second startup delay option to avoid losing any audio. In Windows as the default device, power saving mode meant losing the first 1/4 second after it had been idle for a minute or two.
 
As much as I would prefer to stick with the OS default drivers, using Samsung's driver for my NVMe SSD rather than Microsoft's generic driver also helped reduce DPC latency.

Ensuring that USB2 devices are connected to USB2 ports, and not USB3 ports may also matter for some devices.
 
It is still not 100% perfect, as I typically use the WDM driver for web videos, and the NVIDIA driver tends to cause big DPC latency spikes when enabling/disabling hardware acceleration, but it's much improved from how it was before.
Logged

jjazdk

  • World Citizen
  • ***
  • Posts: 140
Re: WDM driver clicks and pops issue
« Reply #7 on: June 10, 2018, 02:08:11 pm »

I use the same one as Awesome Donkey, I think that's the only one that works on Win10 and is actively maintained.

The problem is there is no way to see where the problem lies. I would have thought it will invariably be causes by some buffer or another overflowing but it's impossible (AFAIK) to trace this flow so it's hard to pinpoint the problem. Ultimately it's a sign that your system can't do real time processing so looking for things that affect that (e.g. badly behaving drivers) is the way to go.

This means one way to go is to strip the OS back to a clean install with absolutely minimal added hardware then test, if no crackles then repeat the test as you add one piece back at a time til it starts going wrong.

I have installed LatencyMon and have it running. The strange thing is that right now, I have no crackles (actually there has been one glitch in the last 15 minutes), which has never happened before. And I haven't done anything else than installing and running LatencyMon.

So right now, I have a mediacenter which:
Has been running for several days (it is only rebooted when Windows forces an automatic update)
Mines ethereum on a RX480
Has an open TeamViewer connection (as I was lazy, and used TeamViewer to install LatencyMon and test the system)
Streams Marian Hill via Spotify through WDM to MC

I have seen one instance of the "Highest measured interrupt to process latency" spike above 870us, and that was a 1462us spike.
But that particular spike did not result in an audible drop out. The conclusion text changed when that 1462us spike came, from stating that my system was okay for real-time audio, to the "seems to be having difficulty" conclusion

My report is here, if that is one any help.
_______________________________________________________________________________ __________________________
CONCLUSION
_______________________________________________________________________________ __________________________
Your system seems to be having difficulty handling real-time audio and other tasks. You may experience drop outs, clicks or pops due to buffer underruns. One problem may be related to power management, disable CPU throttling settings in Control Panel and BIOS setup. Check for BIOS updates.
LatencyMon has been analyzing your system for  0:23:08  (h:mm:ss) on all processors.


_______________________________________________________________________________ __________________________
SYSTEM INFORMATION
_______________________________________________________________________________ __________________________
Computer name:                                        LIVING
OS version:                                           Windows 10 , 10.0, build: 17134 (x64)
Hardware:                                             ASRock, 990FX Killer
CPU:                                                  AuthenticAMD AMD FX(tm)-6350 Six-Core Processor
Logical processors:                                   6
Processor groups:                                     1
RAM:                                                  16340 MB total


_______________________________________________________________________________ __________________________
CPU SPEED
_______________________________________________________________________________ __________________________
Reported CPU speed:                                   3892 MHz
Measured CPU speed:                                   18 MHz (approx.)

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.

WARNING: the CPU speed that was measured is only a fraction of the CPU speed reported. Your CPUs may be throttled back due to variable speed settings and thermal issues. It is suggested that you run a utility which reports your actual CPU frequency and temperature.



_______________________________________________________________________________ __________________________
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):   1462.266852
Average measured interrupt to process latency (µs):   9.483437

Highest measured interrupt to DPC latency (µs):       804.711213
Average measured interrupt to DPC latency (µs):       4.173456


_______________________________________________________________________________ __________________________
 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):              78.456578
Driver with highest ISR routine execution time:       storport.sys - Microsoft Storage Port Driver, Microsoft Corporation

Highest reported total ISR routine time (%):          0.015805
Driver with highest ISR total time:                   USBPORT.SYS - USB 1.1 & 2.0 Port Driver, Microsoft Corporation

Total time spent in ISRs (%)                          0.032744

ISR count (execution time <250 µs):                   605550
ISR count (execution time 250-500 µs):                0
ISR count (execution time 500-999 µs):                0
ISR count (execution time 1000-1999 µs):              0
ISR count (execution time 2000-3999 µ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):              798.910843
Driver with highest DPC routine execution time:       ndis.sys - Network Driver Interface Specification (NDIS), Microsoft Corporation

Highest reported total DPC routine time (%):          0.324510
Driver with highest DPC total execution time:         USBPORT.SYS - USB 1.1 & 2.0 Port Driver, Microsoft Corporation

Total time spent in DPCs (%)                          1.064280

DPC count (execution time <250 µs):                   7115364
DPC count (execution time 250-500 µs):                0
DPC count (execution time 500-999 µs):                4799
DPC count (execution time 1000-1999 µs):              0
DPC count (execution time 2000-3999 µ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.


Process with highest pagefault count:                 none

Total number of hard pagefaults                       0
Hard pagefault count of hardest hit process:          0
Highest hard pagefault resolution time (µs):          0.0
Total time spent in hard pagefaults (%):              0.0
Number of processes hit:                              0


_______________________________________________________________________________ __________________________
 PER CPU DATA
_______________________________________________________________________________ __________________________
CPU 0 Interrupt cycle time (s):                       120.343615
CPU 0 ISR highest execution time (µs):                77.988695
CPU 0 ISR total execution time (s):                   2.006694
CPU 0 ISR count:                                      483267
CPU 0 DPC highest execution time (µs):                798.910843
CPU 0 DPC total execution time (s):                   78.904225
CPU 0 DPC count:                                      6316624
_______________________________________________________________________________ __________________________
CPU 1 Interrupt cycle time (s):                       29.842506
CPU 1 ISR highest execution time (µs):                78.456578
CPU 1 ISR total execution time (s):                   0.720282
CPU 1 ISR count:                                      122283
CPU 1 DPC highest execution time (µs):                249.733042
CPU 1 DPC total execution time (s):                   7.143960
CPU 1 DPC count:                                      512905
_______________________________________________________________________________ __________________________
CPU 2 Interrupt cycle time (s):                       16.599390
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):                400.920349
CPU 2 DPC total execution time (s):                   0.693750
CPU 2 DPC count:                                      83203
_______________________________________________________________________________ __________________________
CPU 3 Interrupt cycle time (s):                       16.663094
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):                232.693731
CPU 3 DPC total execution time (s):                   0.439575
CPU 3 DPC count:                                      57181
_______________________________________________________________________________ __________________________
CPU 4 Interrupt cycle time (s):                       16.227447
CPU 4 ISR highest execution time (µs):                0.0
CPU 4 ISR total execution time (s):                   0.0
CPU 4 ISR count:                                      0
CPU 4 DPC highest execution time (µs):                233.808582
CPU 4 DPC total execution time (s):                   0.701616
CPU 4 DPC count:                                      76791
_______________________________________________________________________________ __________________________
CPU 5 Interrupt cycle time (s):                       16.246218
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):                232.158016
CPU 5 DPC total execution time (s):                   0.752143
CPU 5 DPC count:                                      73459
_______________________________________________________________________________ __________________________
Logged
Working on my 12 channel JRiver entertainment center :-)

herbvan

  • Member
  • *
  • Posts: 1
Re: WDM driver clicks and pops issue
« Reply #8 on: June 13, 2018, 08:25:41 am »

I had pops/clicks also after turning on Volume Leveling in -->Tools-->Options-->Audio-->DSP.  Once I turned that off, the popping went away.

Logged
Pages: [1]   Go Up