jack_iodelay gives varying results

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Matt73
Established Member
Posts: 57
Joined: Fri Aug 27, 2021 5:07 am
Has thanked: 8 times
Been thanked: 6 times

jack_iodelay gives varying results

Post by Matt73 »

Hello Good People,

Begging for help yet again as I stubbornly persist with the Linux nightmare hoping to see some light. I'm an artist and not a natural nerd so I have chosen a hard road but my hatred of big tech keep sme on linux . Plus I like to finally work things out. I'm stubborn like that. Anyway, the latency compensation feature in the my DAW gives wildly different readings depending on whether the system has been rebooted or if JACK has been restarted. I mean it varies wildly. Sometimes it even gives a minus reading. How is that possible? And sometimes it gives 1ms and sometime 11.9ms and everything in between. Why does it wildly fluctuate like that?

I also did an experiment with jack_iodelay and that gave different readings too! One time it gave a reading of 26 and another time it gave like a 7 digit number for the same parameter.

Losing my mind here. Please God someone help me.

Best

Matt

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: jack_iodelay gives varying results

Post by j_e_f_f_g »

Have you tuned (ie, adjusted various system settings) your computer for the lowest possible audio latency? Or are you just using some generic linux distro not specifically setup for low latency audio recording?

Also, badly designed drivers/hardware tend to be a frequent cause of timing fluctuations. For example, NVidia video cards are too often a source of audio performance degradation on Linux.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Matt73
Established Member
Posts: 57
Joined: Fri Aug 27, 2021 5:07 am
Has thanked: 8 times
Been thanked: 6 times

Re: jack_iodelay gives varying results

Post by Matt73 »

Hello,

I am using Ubuntu Studio with the low latency kernel. And I'm using a Focusrite 2i2 which by all acounts works well with Linux. I am using a Dell Laptop which came with Ubuntu pre-installed so I am assuming that the hardware is good. In any event, I have worked out that I can manually adjust the latency compensation at the beginning of each recording session so that whatever JACK thinks the latency is, my tracks still align after having done some testing.

Thanks for trying to help. These forums are invaluable because nobody in the local computer service shops has a clue about Linux.

Best

Matt

WforWoollyMammoth
Established Member
Posts: 118
Joined: Thu Oct 24, 2019 4:32 pm
Has thanked: 3 times
Been thanked: 16 times

Re: jack_iodelay gives varying results

Post by WforWoollyMammoth »

With USB cards the latency fluctuates all the time. The fluctuation should be within several milliseconds and that is normal for USB audio. This is also the case on Windows, but the information's often not available in "as honest terms" on that platform as is the case when using the jack_iodelay program on Linux (there should be a similar measurement tool available on Reaper though, I think).

However with Linux there is often some extra overhead introduced into the latency figures depending on what kernel you use (basically, usb audio latency on Linux has been fairly bad for years, despite what type of nonsense you might have read about it on the Internet posted by users that don't know what they are talking about, and only recently have the problems been attempted to be fixed). I think the seven figure latency numbers, however, are either an error or are produced by the incoming signal being too loud for your card to handle. I've gotten those big numbers too sometimes and have just done changes to my setup and everything's been back to normal.

I can't tell why in your case there has been so much fluctuation present. Maybe you've been running your system on different JACK buffer sizes when doing the tests? Typing "jack_bufsize" into the terminal before using jack_iodelay (or jack_delay) will give you some information.

Matt73
Established Member
Posts: 57
Joined: Fri Aug 27, 2021 5:07 am
Has thanked: 8 times
Been thanked: 6 times

Re: jack_iodelay gives varying results

Post by Matt73 »

Hello Sir,

Very interesting. It's nice to get a clearer understanding of what is going on. Maybe the 7 figure number was an error in jack_iodelay. In the DAW the latency compensation is usually around 1 to 2 milliseconds (at least that is what it gives).

I have noticed that if I do get a wild reading when doing the latency compensation test in the DAW, restarting JACK puts it right again.

However, the latency detection in the DAW is a few milliseconds off. The fix I have found is just looping the output from track and recording it onto a second track and manually tweaking the latency for a few minutes until the tracks line up perfectly. I then know that for that session, the overdubs I am doing line up right with the drum beat.

So, I've found a workaround and learned something new about Linux. The help from this kind community is absolutely invaluable.

Thanks very much

Matt

Post Reply