Page 1 of 1

Xruns with JACK

Posted: Mon Sep 27, 2021 9:11 am
by Matt73
Hello Lovely People,

Still battling on determinedly trying to end this audio nightmare in Linux. Thought I had ended it when I started using qjackctl. This ended the problem of Tracktion Waveform not consistently playing through my USB audio interface without horrible harsh distortion. When I now run qjackctl (with my USB audio interface selected) and choose JACK instead of ALSA in the audio settings in Tracktion Waveform, the audio is consistently smooth and clear.

However, I am getting xruns. It's a brand new laptop with plenty of processing power and the DAW is showing like a 3% CPU usage. This happens when I am just listetning to the song in the DAW. It's very subtle but I can hear it glitch and stutter slightly and the qjackctl interface is showing that I am getting xruns.

I deserve a medal for my patience and tenacity in persisting with Linux here as I tried the program out on my gf's macbook and it all ran smooth as silk. However, I want to use Linux. I don't like big tech. But what a bloody palava this all is.

I'm on Zorin OS core which is Ubuntu based because it runs the best on my laptop. I tried Ubuntu studio because maybe I thought the Zorin system wasn't sufficiently tweaked enough but I had the same problem.

How can I rid of these xruns?

Best Wishes

Matt

Re: Xruns with JACK

Posted: Mon Sep 27, 2021 9:47 am
by Matt73
Hello Again,

I fixed it! I turned off the wifi and it works. It plays all the way through with no xruns! Please God let this be the end of this. Jesus, the album's been held up by a month but I have triumphed and I'm still on Linux!

I bet Paul Weller doesn't have to put up with this!

Love to all

Matt

Re: Xruns with JACK

Posted: Mon Sep 27, 2021 10:02 am
by Toejam76
The usual suspects:
Buffer and periods ok in qjackctl for ALSA realtime? 48khz,24bit 128 periods/3 buffer here for Scarlett Solo 2nd gen
Network off or network scanning
USB auto-suspend off
UbuntuStudio has this "recommended tweaks" package also available with the UbuntuStudio Installer for other Ubuntus.
Realtimeconfigscan ok? https://github.com/raboof/realtimeconfigquickscan
CPU Governor set to Performance (only makes a difference under heavy load here)
Have you tried another USB port? My interface has to be alone on a USB 2 port.

Re: Xruns with JACK

Posted: Mon Sep 27, 2021 5:55 pm
by Matt73
Ok, I will implement all of what you have suggested. It's starting to come a bit clearer with Linux now but what a learning curve for the uninitiated. Thanks.

Matt

Re: Xruns with JACK

Posted: Mon Sep 27, 2021 7:15 pm
by Matt73
I looked into turning USB auto suspend off and used a GUI for it. However, a command seemed to show that it hadn't been turned off. I looked into it again today and there were instructions to modify a file. However this was for Ubuntu 14.... and I guess things may have changed since then. How would I turn off USB auto suspend in Zorin 16?

And with the realtime config check, am I supposed to enter those commands into the terminal (on the github page)? Now that I have finally got everything working right I am scared off messing it up by entering something I shouldn't into the terminal.

Best

Matt

Re: Xruns with JACK

Posted: Mon Sep 27, 2021 9:17 pm
by Toejam76
You need perl installed to start the script with "perl realTimeConfigQuickScan.pl" in a shell. It won't screw up anything and ignore the "Checking checking sysctl inotify max_user_watches... < 524288" entry.
I don't know where Zorin keeps the usb-autosuspend.conf for the device. On UbuntuStudio I didn't have to do that, but I don't use a laptop and if the device doesn't go idle after a while you probably don't have to do that. But the CPU mode Performance should be enabled when doing audio stuff.
I bet Paul Weller doesn't have to put up with this!
Not just him. It's a voluntary pain in the ass, but once it works it really works. Not even saying it's "better". It's a different beast with its own pros and cons.

Re: Xruns with JACK

Posted: Tue Sep 28, 2021 7:31 pm
by Matt73
Ok, I've installed Ubuntu Studio. I used the guide on 'Front page linux' to set it up. Chose the CPU performance option. Turned off wifi. Closed all other applications. Chose the interface in JACK. And still......STILL tons of xruns just playing audio back. Even the Lord Jesus himself would have lost patience by now. What on earth is going on? This system is supposed to set up for audio and still these problems right out of the box. It is beyond exasperating. I am hardly taxing the CPU at all. There shouldn't be any xruns whatsoever.

Re: Xruns with JACK

Posted: Tue Sep 28, 2021 7:57 pm
by GMaq
Hi,

Did I miss something, or did turning off the WiFi not fix the issue?

A 'system set up for Audio' doesn't automatically just work on hardware that has driver or IRQ issues of it's own... for example 5 people install AV Linux on 5 different laptops, 3 tell me it's the bomb and unbelievably fast and 2 tell me it's the worst POS they've ever used and I must be an idiot... it's the same system 'set up for Audio' running on all the computers so what is the difference..? The hardware!

I have 2 old laptops and 2 Desktops all running AV Linux and they all perform differently, on one of the laptops I get spurious Xruns aplenty with the WiFi enabled if I disable the WiFi driver it works 100%.

Every system is different and every system allocates the hardware IRQ resources differently, if you have your Audio device and your Wireless chipset riding on the same IRQ then you will have problems even if you give the Audio device IRQ priority, laptops designed to run Windows even laptops set up for gaming give NO guarantee of being great laptops to base a super low latency recording setup on, it is about so much more than CPU, RAM and Hard Drive type.

Have you tried Zorin or Ubuntu Studio or AV Linux on a different or older computer? Chances are you will see a marked difference..

Re: Xruns with JACK

Posted: Wed Sep 29, 2021 12:54 am
by sunrat
What buffer settings are you using for JACK? If they are too low for your hardware it will always have xruns.

Re: Xruns with JACK

Posted: Wed Sep 29, 2021 6:21 pm
by Matt73
I've tried all that. Setting the buffers ridiculously high. Having spent a month trying to resolve this, I am going to temporarily go back to Windows for my sanity. On Windows and Mac you just plug the interface in, select it in your DAW and that's it. It should work that way in Linux too. I gave JACK a go within Ubuntu Studio but I am getting these glitches. Maybe it's because this laptop is not suited to run Linux. I will speak to the Tracktion Waveform team and ask them if they know of the DAW working correctly in Linux with an interface and, if so, which interface and which setup. Maybe I need to get a laptop that is geared towards Linux. If I do and it works right, then I will report back.

Re: Xruns with JACK

Posted: Wed Sep 29, 2021 10:16 pm
by Toejam76
If it's new hardware there's maybe a BIOS update. Otherwise, I am afraid I have no idea.

Re: Xruns with JACK

Posted: Thu Oct 14, 2021 11:17 am
by Linux_Voivod
Useful topic this, through it I finally got rid of my Xruns. So thanks for everyone's contribution here. It had to do in my case with the ThreadIRQs.