Inconsistent latency using jdelay

Hello. I am trying to successfully configure my Lexicon Omega USB interface to use with Ardour. Here’s some info about my system:

Ubuntu 10.10 Maverick Meerkat
AMD Athlon 64x2
2.6.33-29-realtime kernel from Alessio Igor Bogani (https://launchpad.net/~abogani/+archive/ppa/+packages)
2GB Ram
Ardour 2.8.11 (built from 7387)
jackdmp 1.9.6

I am using 256 Frames/Period and 3 Periods/Buffer at 48kHz sample rate.

This works fine for recording one track, but I’ve been having problems figuring out input latency in order to successfully sync overdubs.

Using jdelay gets me 1498.727 (give or take a few thousandths) immediately after server initialization. If I switch tasks however (open a web page, change windows, etc), I get an XRUN and the jdelay output changes. Here’s an example (in order to make it shorter I cut out long periods of repetition).

1498.727
1498.726
1498.727
1498.727
1498.728
1498.727
1498.727
1498.727
1498.727
1498.727
1498.727
1498.727
1498.726
16290.728 ?? Inv
16290.728 ??
52146.728 ?? Inv
1402.727
1402.727
1402.727
1402.728
1402.728
1402.728
1402.726
1402.727
etc…

…1402.727
1402.727
1402.727
1402.727
50994.726 ?? Inv
1258.728 ??
1258.727
1258.728
1258.727
1258.727
1258.726
etc…

…1258.727
1258.727
1258.728 ??
52930.727 ?? Inv
1162.728 ??
1162.727
1162.727
1162.727
1162.728
etc etc

I have currently input latency set to 1242 (1498 from jdelay minus 256 frames/period). But this evidently is not reliable, since it appears that the total latency varies.

In Ardour I notice this because when I overdub rhythmic music, the tracks are always out of sync. I’ve also tried recording the click through an analog patch cable from the monitor back to the input of my interface. The resulting audio track doesn’t line up with the click it’s sourced from (when I play back the recorded click track with the Ardour-supplied click activated, you can hear a distinctive flam). Any ideas?

Well I managed to stabilize (mostly) my latency by increasing the buffer size (now I’m at 512*4), but I still see latency drift over time if I leave jdelay running, even with no XRUN reports from qjackctl. It tends to stay stable for a while and then leap to a lower latency where it then remains again for a while. Any ideas? This is really frustrating.

You are confusing several different issues into one. You have a poorly-behaving system that causes xruns. You have some strange inexplicable variance in h/w i/o latency. You have issues with recording the click track. I personally don’t like trying to address these sort of issues in the forum - the communication cycle is too long. Next time you’re on IRC, please ask a question and then plan to stick around. Alternatively, others might offer you help here.

Ok thanks, I’m in IRC now.
I forgot to mention that I am using my Omega in Europe. I can’t find a suitable 220V to 9VAC power adapter so I have plugged the US 110V adapter into a fist-sized 220-110V converter. I don’t know if that could be a factor in the variable latency (but it seems unlikely to me, since I observe the latency changes generally only when I am switching tasks).