Need help setting up low latency Kernel in openSUSE Tumbleweed

Hello there.
I was thinking of experimenting more with openSUSE Tumbleweed with Pro Audio, Music Production and Live Mixing plus some more multimedia work in general. Since my workstation for music production is Windows purely and solely for music production and for everything else I use Linux so I thought of playing around on Linux a bit and see if I can learn a thing or two more and see how I find it. So far I can see a lot of potential especially with Pipewire simplifying things A LOT and it’s brilliant!

Anyway, I read that you really need a low latency kernel which to my surprise I realised that it’s not available on openSUSE by default and that one would need to compile it from source and what not. But I’m not very experienced and kind of afraid of screwing things up (not terribly as I can rely on BTRFS snapshots to rollback should I need to) but would rather ask you guys first for advice and help on how to do it. Could someone help me understand what I need to do please? Thank you very much!

You could start with listing kernel config options that are missing in SUSE kernel.

I am not so sure you need it for audio, did you try running without? Also, can you share where you got this information?

Seems to me you can use boot options, from here:

GRUB_CMDLINE_LINUX_DEFAULT="quiet threadirqs preempt=full"

1 Like

Sorry, I don’t know what that means or how do I do it.

I don’t remember where I read it exactly, I think it was on linuxmusicians forum once or some other page guide explaining professional productions on Linux saying that one needs the low latency when it comes to professional work.

Anyway, I did something else this morning that someone else was saying that since Kernel 5.12 I believe, you can do dynamic allocation so that

preempt=full should enable the low-latency mode in the kernel. So do I just edit the grub config file and update the grub with the command?

Thanks

Yes, just edit the grub boot line.

Also, I assume you are running no other demanding programs, if so the benefit is low.

No nothing else demanding and when I played around with Carla, and Calf Plugins even with my current kernel the DSP load was around 2-3% but obviously that’s not a representation of a multi-track project scenario. Also Cadence was flagging the kernel is just the default version not setup in realtime (low latency) mode. Ok, will give it a try. Thank you very much!

Kernel-rt is available for Leap 15.5, IDK about TW.

Post

zypper se -s kernel-rt

Possibly you don’t need RT kernel, because now Linux kernel uses dynamic preemption with “preempt=full” set by default for openSUSE.
And Linux is much better for music production comparing to Windows because of much smaller latencies.

https://wiki.archlinux.org/title/CPU_frequency_scaling

Not a kernel expert here, but I see from:

LT-B:~ # cat /boot/config-6.8.8-1-default |grep -E "PREEMPT |PREEMPT_|CONFIG_IRQ_FORCE"
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_PREEMPT_BUILD=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPT_DYNAMIC=y
CONFIG_PREEMPT_RCU=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
CONFIG_DRM_XE_PREEMPT_TIMEOUT=640000
CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX=10000000
CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN=1
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_PREEMPT_TRACER is not set
LT-B:~ # 

that the default for Tumbleweed already includes threadirqs but the preempt=full option is still needed since the default is preempt=voluntary
(happy to learn something if I’m proved wrong).

1 Like

Installer sets “preempt=full” kernel parameter by default for Leap, IDK about TW.

Yes, technically it may be. However the lack of software and compatibility with more audio interfaces still make it not very suitable. I’m glad that it is better than it used to be, at least with Bitwig we have native Linux support and Wine has gotten a lot more stable even thanks to the gaming world making the whole system a lot more robust than years ago. However, even that setup is still less convenient, more frustrating and time consuming than on Windows unfortunately, as much as I would love to be able to completely switch I don’t feel that we’re quite ready. Some VSTs may have completely missing GUI or misbehaving automations or incresed latency and/or DSP usage because of stuff that goes on in Wine’s backend or something. I work with Ableton Live and VST plugins (some of which have native Linux support (like u-he) and some (many more) who don’t (eg. XferRecords Serum, RevealSound Spire, Sylenth1, Valhalla DSP plugins, FabFilter, iZotope etc.)) plus Ableton Push 2.
I know it is up to developers/software companies to introduce native support with Linux and not up to the Linux community, but unfortunately being professional software not even Bitwig comes close to the power and versatility in terms of features of DAWs like Ableton Live, Cubase etc. I am thinking of considering trialing it with Wine as years ago when I last attempted it it wasn’t too shabby, only some issues here and there but for the most part it was usable. I wonder how more robust things have become after these years.

Anyway, I will post the result of that command later

To be clear I use openSUSE Tumbleweed and not Leap!

This is what it returns:

Loading repository data...
Reading installed packages...
No matching items found.

Ok, I have done that, but how do I check that the kernel is effectively running with lowlatency mode? As far as I can see nothing looks different after rebooting.

Run that application that you have for which you wanted to try the lowlatency mode as it’s performance was lousy :wink:

Seriously, much too often people think they need something while it is at most a good to have and often not needed at all.

Alright, because when I ran uname -a it still would show as Preempt Dynamic instead of Full.

Anyway, just like before when I open Cadence and start the Jack server it shows as Realtime enabled. But that to me given that it was showing before as well means that either opens use Tumbleweed already came with the necessary tweaks out of the box or perhaps it’s due to Pipewire enabling realtime audio for Jack since it falls in the pro audio category anyway. Either way, thank you very much for your help

dmesg |grep Preempt
1 Like

This is what I get when running it:

[    0.048014] Dynamic Preempt: full
[    0.103224] rcu: Preemptible hierarchical RCU implementation.

Looks like it is on full then. Very nice cheers :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.