none
Nasty real-time audio problems (less than 10 ms in>out global latency) win10 pro 64 RRS feed

  • Question

  • Hello,

    I am trying to run Ableton Live 9.7 as DAW, on a core i7 win10 pro 64 bits laptop (i7 1.6 Ghz, 32 Gb mem, ssd disk), Dell Latitude) either with its internal realtek asio audio, or an external audio usb asio card (Komplete audio 6, Native instrument).

    I want to achieve less than 10ms latency from audio input to audio output, while having the DAW process the audio input from the ADC and send the processed digital audio to the output DAC.

    The < 10ms value is  important . It is a psychoacoustic landmark, as the brain does not perceive that the input sound has a delay with respect to the output sound when the delay separating them is smaller than 10ms.

    And as you have guessed already, I get latency issues and a load of audio clicks; my friends bug me by saying "of course, you will go nowhere on a win PC for real-time audio, just switch to a Mac" ..

    So I am fighting against adverse winds but keep the quest to extract the most juice out of my win-PC for audio.

    I have identified some nasty DPC latencies causing a first level of problem, and finally found a fairly simple countermeasure for that (see later).

    Now I am stuck with what appears to be a weird coupling between mouse motion (when simply hovering over some regions of the screen), causing massive flux of audio clicks, while DPC seems not involved.

    I am looking for help to solve that weird problem (apart from switching to a Mac ;-) )

    DETAILS :

    - I have applied some standard tricks found on the web to improve audio on a windows machine.

    Bios level : sleep blocked (no S3), NO speed test, NO C-state, NO turbo-boost.

    Deactivated drivers

    - webcam

    - «screen sound»

    - Bluetooth

    - smart card reader

    - Intel wireless gigabit

    - NFC

    - RealTek PCIE card reader

    Power plan :

    - Processor "minimal power 100%

    - "maximal power » 100%

    - active cooling,

    - usb sleep deactivated

    - sleep screen deactivated

    - Intel graphics: perf max,

    - PCI deactivated power saving

    Getting numbers for Latency values :

    For getting the offending max DPC’s ("Deferred Procedure Call")] ,

    I use thefreeware "LatencyMon » (resplendence dot com), , v6.51 .

    Also, if I use the Komplete audio, I have access to a tool either directly \Komplete Audio 6 Driver\nika6cpl.exe (V4.2.0 (R99), driver 4.2.0 firmware 50, or accessed via Ableton/audio/hardware details.

    This tool from Komplete displays

    (i) a counter of audio buffer under-runs encountered, and

    (ii) a time-dependant graphic chart plotting the max offending DPC’s vs. time

    In the description below, the internal Realtek audio is either deactivated, or activated and used.

    - On the Komplete audio 6, for using it with Ableton, I purposely set the buffer size to a small value (64), using 48Khz audio, 1ms USB buffer. (my goal is to achieve less than 10 ms in>out global latency), and also as a debugging way to put latency problem to pop out clearly.

    - Using an Ableton project that loads the processor to about 30-40% for audio, and using the above buffer size,

    I get both frequent audio clicks (approx 1 per 10 sec and sometimes up to 2/sec);

    - looking at the Komplete audio6 hardware monitor (accessed via Ableton), I can see some buffer underruns (1 every 10 seconds or so, or more), and many warning about DPC issues (> 1 ms DPC's), displayed with red bars on a graphics.

    - Then with LatencyMon (resplendance.com), I monitor latencies, and this tells me that acpi.sys is causing hogs (2.5 ms and very seldomly up to 3ms); Typically there is acpi.sys process running on processor 1, and causing hogs, and another acpi.sys running on processor1, and also causing hogs, while all other processes max DPC's are below 0.5 ms

    - Now using the motherboard Realtek asio audio: still using Ableton as DAW, I select for the Realtek audio Asio, and choose the minimum setting "2milliseconds", i.e. the lowest setting and use a 44 Khz data clock frequency.

    Ableton uses that info and selects a buffer size of 144, and specifies an input latency of 3.27ms, and an output latency of 4.35ms, and indicates an overall latency (in>out) of 7.62 ms. This is fine for me, as I am looking for an overall latency (in>out) of less than 10ms.

    Then I run the same tests as before, and get very frequent audio clicks. So using the Realtek audio does not change the situation.

    NOW TWEAKING PROCESSOR AFFINITIES:

    - Then I go to the Windows process monitor, and set the affinity of Ableton to avoid processor 0 and processor 1.

    - WHEN NOT MOVING THE MOUSE, with the Ableton project running (same conditions as above)I do NOT get any audio clicks anymore.

    - looking at the Komplete audio6 hardware monitor, I can see no buffer underruns (monitored over several minutes), and still many warning about DPC issues (> 1 ms DPC's), displayed with many red bars.

    - LatencyMon (resplendance.com), indicates that acpi.sys is causing hogs (about 2.5 ms on processor 0 and 1), situation essentially unchanged as observed before setting ableton afinities;

    - I reasoned that the Komplete driver is monitoring global latencies (worst over all processors, despite the fact that Ableton does not use procesors 0 and 1 anymore. What is a good indicator is thus only the buffer underrun counter, and this stays to 0.

    - I did the same test using the Realtek audio instead of the Komplete audio: I get no audio clicks either !

    but my joy was short lived, see below:

    WHEN NOW MOVING THE MOUSE

    - I had made above the important restriction "WHEN NOT MOVING THE MOUSE", and in that situation, setting processor affinities seems to solve the problem.

    - However, I have now identified that when moving the mouse, and in particular when hovering the bottom bar on the windows screen on my laptop(small icons showing other apps running concurrently with Ableton, in particular latencymon, process monitor, eventual opened folders, etc... : when one of those small icons on the screen bottom suddenly enlarges a bit simply because of mouse hovering:

    then I get an HORRENDEOUS FLUX OF AUDIO CLICKS.

    - looking at the Komplete audio6 hardware monitor, I can see many buffer underruns (order of about 200 underruns over 30 sec), and essentially unchanged warning about many DPC issues (> 1 ms DPC's), with  red bars.

    -I did the same test with the Realtek audio. I get the same behaviour, and even more extreme: hovering only over the ableton windows, I also get series of audio clicks (that I was NOT getting when using the Komplete audio card).

    - LatencyMon (resplendance.com), indicates an apparently unchanged situation (acpi.sys is causing hogs (about 2.5 ms ), affecting processors 0 and 1; with max DPC on the other processors essentially unchanged (less than 0.5 ms);

    SO THE MOUSE MOTION/DISPLAY CHANGE IS CAUSING EXTREMELY SEVERE SERIES OF AUDIO BUFFER UNDERRUNS ,

    (i) this bad result is obtained for either the Realtek audio, or the Komplete audio.

    (ii) surprisingly there is no apparent "bad DPC latency" events to blame on the processors that Ableton live is set to use.

    * * * *

    - SOME HELP:

    any suggestion would be wellcome: in the opinion of a knowledgeable contributor on technet, what might be the culprit :

    - is it a beahaviour known, that mouse/display change on win10 causes audio latencies ?

    Do you know any countermeasure against that, at the level of Windows (a solution apart from recommending increasing audio buffer size and chain-sawing the global audio latency)?

    - what is your idea at Technet of why DPC's seem not involved in those catastrophic buffer underruns ?

    - what should I try/ what additional tool should I use to spot the culprit process(es), and circumvent those ?

    Thanks for your help !!!!


    Friday, June 29, 2018 5:43 PM

Answers

All replies