Has anyone seen this strange X-run behavior before?


I’m a long time GNU/Linux user (early 2000) and I just started to try to make music. I discovered Ardour and I really like it.

The problem I face is that when opening a session with many tracks in it and one track uses linuxsampler as the source, I then immediately get X-runs, which continue through out the entire session. I’ve tried to fiddle around with the settings in Jack but I constantly get X-runs. The CPU is about 70% idle according to top.

If I disconnect and reconnect from Jack within Ardour, the same thing happens.

The only solution I’ve found is to disable all tracks, then activate them one by one, then I get no X-runs what so ever and the session plays just fine. Or I could simply remove linuxsampler and replace it with a synth plugin (but that doesn’t give the sound I’m after in this case).

If I disconnect from jack and reconnect with all tracks enabled, the X-runs appear again.

I’ve created a screen recording of it here.

If I try to activate several tracks at once, I also get X-runs. The only solution I’ve found is as I mentioned above, to activate them one by one manually.

Even if I disable the track with linuxsampler as the audio source, but have all other tracks active, I still get the same result with X-runs when connecting to Jack.

It seems like something happens when Ardour connects to many tracks at the same time to Jack and have one track containing linuxsampler as the source (can it be some timing issue when multiple threads are getting mixed up or something, missing semaphores? I’m guessing widely here…).

I’m using Ubuntu Studio 19.04 on a laptop with 16GB RAM and this CPU: Intel® Core™ i7-8550U CPU @ 1.80GHz

I get this behaviour on both the built in sound card, as well as my external Behringer UMC202HD sound card.

Is this a problem in Ardour that get confused somehow when multiple tracks gets added to Jack simultaneously or is it solely a linuxsampler problem?

Has anyone seen this before?

Thanks for an awesome product!

I’m using the following packages of Ardour and linuxsampler

ardour 5.12.0-1kxstudio2v5
linuxsampler 2.1.0-1kxstudio1v5

running kernel
Linux gurkmediatop 5.0.0-23-lowlatency #24-Ubuntu SMP PREEMPT Mon Jul 29 16:17:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I would get more xruns just by using a2jmidid, … the solution for me was to use “-c s” (System timer rather than hpet timer), but you would have to start jackd outside ardour.

Assuming you mant the jackd option (not a2jmidid), that is only relevant to debug x-runs. jack’s clocksource only use is to show x-run duration.

I suppose that as soon as you get an x-run it will matter, and may actually cause more x-runs in turn, but I doubt that it is relevant at all for the case at hand.

It’s an odd issue that you describe, but I’m not really surprised much. Linuxsampler is in many ways idiosyncratic. Mainly because the sample-player runs out of process and only communicates with a plugin-stub.

Can you also reproduce this with other synth plugins? If you need a .sfz player, perhaps try recent Carla 2.0

I mainly use ZynSubAddFX wich works just fine. But again, so does linuxsampler when activating one track at the time…

I’ll check out Carla.

I could imagine that this is a threading issue. Ardour processes many Tracks in parallel while communication with the linuxsampler-server is serial, and perhaps even locking for rendering.

Maybe try to change Ardour to be single-threaded – Preferences > Global > DSP Utilization: use 1 processor and/or experiment with the setting.

i7-8550U CPU @ 1.80GHz

really only 1.8 GHz? That’s not a lot.

I have suspected something like that as well without knowing how Ardour works under the shell.

I guess that running on a single core will max out that core and I’ll get X-runs anyway.

Yeah that was a laptop I had laying around. And I think the performance is pretty decent when knowing the laptop weights in around 1.2kg and is very portable.


A quick update.

I just started a new session with only midi tracks and linuxsampler as the audio source. This new session work just fine without any X-runs…