[SOLVED] Once i've installed the/a lowlatency kernel, what more setup is there to do?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

[SOLVED] Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Hi guys, recording into Audacity from JACK, at 48khz, 256 samples, 3 periods with a Focusrite Scarlett Solo 3rd Gen, even though xruns appears to be a very low number (maybe 1 or 2 a minute), I get pretty rhythmic droupouts in the signal.

So I installed the low-latency kernel (confimed with `cat /proc/version`
Linux version 4.18.0-25-lowlatency (buildd@lcy01-amd64-025) (gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1~18.10.1)) #26-Ubuntu SMP PREEMPT Mon Jun 24 10:17:48 UTC 2019
)

But there is no difference at all to the dropouts.

Is there anything else I need to do, any tweaks or configs that need to happen?

Thanks
Last edited by arifd on Thu Dec 31, 2020 10:26 am, edited 1 time in total.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by LAM »

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Thank you, that was interesting, the only one missing was the threadirqs, which I enabled and it now reports everything good.

However, this is still what it sounds like: https://filebin.net/9jzkswf55wsm8q3b

May be interesting to note that my same system, running under live boot of AV Linux MX Edition will run at 128 samples, 3 buffers with no clicks and very few, if any xruns.

I want to run Lubuntu though :(
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by LAM »

What saved me from xruns was the CPU set on performance.
Said that at least now you know your problem is not an hardware one.
You could try to replicate the AVLinux configurations (system-wide and jack-specific) on your current system.

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

I guess I could try an rt kernel, even though Ubuntu Studio advises against it.

Is there anywhere I can go to find the information about what's behind AV Linux?

From what I have deduced, it looks like nothing more than an RT kernel + KXStudio stuff.

Gonna download Ubuntu studio now, see what kind of performance that gives me.

(The switch to low-lantency kernel, has seemed to introduce weird stuff into my system, such as random moments of lag/unresponsiveness, wifi dropping out periodically, etc)
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by LAM »

arifd wrote: Tue Dec 29, 2020 4:47 pm Gonna download Ubuntu studio now, see what kind of performance that gives me.

(The switch to low-lantency kernel, has seemed to introduce weird stuff into my system, such as random moments of lag, wifi dropping out pe)
The RT kernel would give more or less the same "weird stuff" you experienced with low-latency, at least it did for me.
Wifi enabled is a common known cause of dropouts or xruns.

You can try to copy the AVLinux configurations somewhere and see if you can apply them to your system, i know, it's a long work, or just try to contact @GMaq.

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Ugh. Well Ubuntu Studio was a sluggish and buggy experience.

Gonna look into the RT kernel now,

But when you say
copy the AVLinux configurations
, how does one go about doing that exactly?

Thanks!
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by LAM »

A good starting point is to copy the file checked by the realtimequickscan, then jackd, pulseaudio and whatever AVLinux modified from vanilla MX Linux, like reverse engineering of the @GMaq work. :D

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Well I just really need the kernel, everything else is covered by KXStudio.

I've tried following the instructions to install the AV Linux kernel: http://www.bandshed.net/av-linux-kernel-repository/

I can add the key, but not the repository.

I've tried installing Liquorix... I can add the repository, but then I get
E: Unable to locate package linux-image-liquorix-amd64
E: Unable to locate package linux-headers-liquorix-amd64
after trying to actually apt install them.

I'm gonna now try again in a fresh, updated 20.04 LTS Lubuntu. See if I can get anywhere with that.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by LAM »

Sometimes the kernel can make a difference but in my experience different configurations/fixes/software are the real game changers. If you look on the forum is full of posts of people experiencing your same kind of problems. Then most of the time the solution is something simple like a different setting in the software or a different system configuration that makes the difference.

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Well you're right, I was surprised that for some reason the repetitive dropouts I sent a recording of earlier, dissappeared when I recorded into Ardour instead of Audacity (although there was still the dropouts associated with xruns).

(GNU/Linux is as frustrating as it is fun!)

I'll have a play around, thanks for your support!
JamesPeters
Established Member
Posts: 188
Joined: Fri Jun 29, 2018 6:35 pm
Has thanked: 8 times
Been thanked: 15 times

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by JamesPeters »

You probably want to turn off USB autosuspend. I use the same interface and it was fairly aggressively "going to sleep", which wasn't a problem with Pulse at "average latencies" (normal everyday computer stuff) but was problematic with ALSA and Jack at low latency.

Here's a post in which I describe what I do to set up the distro for DAW use.

viewtopic.php?p=126833#p126833

It's not a lot, really.
arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Thanks James for your input. I never suspected this could be an issue and I still don't but it's good to know about :) thank you.

So I just installed a fresh Lubuntu 20.04.1 LTS, and with 0 tweaks, with realtimeconfigquickscan reporting 6 not goods, running JACK into Audacity, installed via cadence in the KXstudios repository, at 128/3/48khz I get half the DSP load (No pulseaudio bridge however [edit: okay, just bridged, CPU is same as before]) at maybe 10 xruns a min, with the occasional audible glitch. But this is a great start I think!
arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Well, just to report that since updating to Lubuntu 20.04.1 I was able to add the AVLinux Kernel repository, and combine the shiny AVLinux RT kernel with the KXStudio repos. Now enjoying 0 xruns at 128/3/48khz :) And I suspect without PulseAudio it could probably go happily much lower too!
arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: [SOLVED] Once i've installed the/a lowlatency kernel, what more setup is there to do?

Post by arifd »

Hi @JamesPeters I'm looking to "add 'usbcore.autosuspend=-1' to /etc/default/grub but not sure where/how exactly to add it. Thanks
Post Reply