Jack: xruns and documentation

Friends

tl;dr Where can I get decent documentation for configuring Jack. QJackCtl is no use to me.

I am having an interesting time to get Jack to run without buffer xruns. I

Searching on the web is a bit fraught as there is a lot of confusion out there and a lot of conflicting information.

I am getting a lot of xruns, predictably, using yoshimi. The second time I stop/start/stop yoshimi I get thousands (between 1,000 and 2,000) xruns. Every time.

This cannot be right. I have eight gigabytes of ram on an rpi 4, and audio is slow.

So I need to take some action. But what?

If you get an xrun, that means the application didn’t make it in time to fill out the next audio buffer. If the buffer is too small, it’s more likely, as it has less time to complete its task, while the OS switches around giving processing time to each active process.

The application itself might be coded imperfectly, and do too much processing on its own on certain events, like ‘start’.

There might be some unexpected / unnecessary processing intensive work going on, like resampling from 44100 to 48000, under the hood somewhere.

You should try and get some insight on what sections of the process take the most time, and look for ways to reduce it, like changing its config settings to something lower quality, different rate, different sample size, etc… To determine the bottlenecks, there might be some config or compilation time switches to produce trace logs, or you may have to compile the program yourself with symbols and run it through a profiler, then inspect the results, etc…, it’s a very broad topic, you should be able to find info on the net, you might not even need to focus the search on audio applications.

Other than that, the developer or community of the software program you’re using might have suggestions on the best configuration for running it on a Raspberry Pi.

I know that Will Godfrey (the main yoshimi author/maintainer) uses it on RPi, and showcases it on music fairs etc. - so it should definitely be doable, even more so with a low latency card like Pisound is.

That said, I haven’t used stock PatchboxOS images in a while, and run into performance issues, including xruns, when I try to build my own Bullseye based OS with Pisound drivers and all that. Even for me as experienced packager (rpm based though) it’s pretty difficult to collect all the software pieces from diverse blokas repos and build a complete system from that…

I think a 64bit build of PatchboxOS is long overdue - I understand that it’s not a trivial task, especially now in these crisis time, but would be more than willing to help with that, if necessary/wanted.

I hope to make sense, and not offend anyone, just my 2 cents!

2 Likes