r/linuxaudio • • 1d ago

Can't get linux audio performance even remotely close to Windows

For the last month or so, ive been trying without success to replicate atleast comparable conditions on my Arch linux setup as I've had on windows.

I've tried JACK2, pipewire-jack**,** even just going straight through ALSA, with various configs for each but nothing I do seems to get me anywhere close to the performance I could get on windows.

I've gone and compared the latencies, figuring out that 4096 samples on Linux is the same as 2048 on windows. Then using 128 samples on windows, I was able to run about 100 instances of the TONE3000 plugin at the same time, however with 256 samples on linux (with its native linux version) i can barely run 3. any more and i get horrible constant xruns. I can't even use a NDSP plugin (via yabridge) at a latency i would deem acceptable without constant xruns.

My setup:

OS: Arch linux

Interface: Focusrite Solo 3rd gen via USB

DAW: Reaper (native linux build, tried windows build via wine too)

CPU: Ryzen 5 5600G

Plugins:

Neural DSP Fortin Nameless (windows native VST, on linux via yabridge)

TONE3000 - native versions on both windows and linux

Ive also gone through all I could find, on various forums, Arch's pro audio page, ive gone through the rtcqs checklist and done everything apart from spectre meltdown mitigations.

I'm completely lost as to why this is happening, willing to try anything

5 Upvotes

42 comments sorted by

10

u/mandale321 1d ago

This is weird, i'm able to run twenty three billion instances of the TONE3000 plugin on the exact same configuration using linux.

More seriously though, appart than your claim of running 100 instances of the TONE3000 plugins seems really fishy, your config should be able to run some instances at the buffer sizes you report.

3

u/ExpensiveAd2268 1d ago

the tone3000 instances were just a way for me to benchmark the difference, only high-load plugin i could think of where i have a native version for both windows and linux lol

7

u/la_tajada 1d ago

You will need this: https://wiki.archlinux.org/title/Professional_audio

And an app https://github.com/gaheldev/Millisecond (install the flatpak) that can help you test all the parameters and use the wiki to correct them. If you have all green check marks, you should get better performance than you did on Windows.

1

u/ExpensiveAd2268 1d ago

Ive gone through this page numerous times, looking in detail into everything. The app you suggest seems to just be a GUI frontend for rtcqs, through whos recommendations ive gone through and enabled all of. I think it helped a little bit, but still nowhere near what id expect

9

u/Robin_Cherry 1d ago

Did you set your cpu governor to performance, install and enable threadirqs in your grub config, install and configure rtirqs, and assign irq priorities to your audio card, sound server, etc. Also, if you are using jack does the output when it's starting up confirm that it is running in realtime mode with memory unlocked?

Those are the big ones that sometimes get missed.

1

u/ExpensiveAd2268 1d ago

As these are all things that rtcqs flags up, ive gone through these. Im using the rt kernel but didnt notice any difference. I havent looked super deep into rtirq, just did some basic stuff as recommended online on forum posts.

From what i can tell, REAPER confirms its running in RT mode

1

u/Robin_Cherry 1d ago

Are you using jack? If so does the terminal output mention anything about whether it is successfully running in realtime mode and has unlocked the memory when it starts?

2

u/rileyrgham 1d ago

It really shouldn't be necessary to mess with grub configs in 2026? Assuming he has one even. I dumped grub for systemd-boot a while back on Debian/arch/win 11 multi boot machines.

4

u/Robin_Cherry 1d ago

Oh.

To my point though, one would still need threadirqs enabled, right? How is this done on a systemd-boot machine?

-1

u/la_tajada 1d ago

In a configuration file...

3

u/God_Hand_9764 1d ago

Assuming pipewire-jack, please share your pipewire and wire plumber config files. We can review it.

Its good if you say you've done the rtcqs checklist, because thats huge.

I'm sure we can find what's wrong.

1

u/ExpensiveAd2268 1d ago

Thanks, ive gone through and deleted all configs to revert to defaults and reinstalled the packages, but that hasnt changed anything unfortunately

3

u/flowkclab 1d ago

I had a similar problem on my Arch setup and a friend the same on Ubuntu. After trying a lot (a lot) of things, it turns out that the CPU defaults to "powersave" mode on our systems which really hurts the audio thread, at least on our Intel CPUs (can't speak for others).

Try running this command as root:

cpupower frequency-set -g performance

(you may have to install the "cpupower" package)

I'm not guaranteeing that this will fix your specific problem, but when I do this "it works on my machine" - DSP CPU% meter in my DAW (Bitwig) goes down instantly and dramatically and no more XRUNs even at lower buffer sizes.

If you want to know the current setting run "cpupower frequency-info".

(I am not too sure of the "proper" way to make the change permanent across reboots. I already had a script I created that runs every time I boot, so I just threw the command in there.)

1

u/ExpensiveAd2268 1d ago

Hey, thanks for the reply. Unfortunately this is something ive already done a while ago as its part of the rtcqs checklist, but to no avail

1

u/GreatBigPig 1d ago

This is why I do not create music anymore. In Windows it was so damn easy. I used ASIO equipment and just enjoyed creating with apps like Reaper.

Linux is such a hassle.

Many suggest jumping through hoops.

-Realtime kernels and scheduling

-JACK, Carla, ALS, Pipewire

-Mess with GRUB (GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=1,2 irqaffinity=0"), etc.

I realise that choice is great, and not everyone has to use a single solution, but where is the limit?

All this f$#*&ing around to make music?

Don't even get me started with VST's. What a headache.

1

u/ExpensiveAd2268 1d ago

rt kernel was easy enough to install and enable. Jack, ALSA and pipewire is kind of a mess (super confusing since theres pipewire-jack, which works as hardware < ALSA < pipewire < JACK, and pipewire-jack-client where now its hardware < ALSA < JACK < pipewire i believe?) but im willing to learn it as in general my linux experience otherwise has been great. grub is grub, it works and i dont really feel like changing it for now, and VSTs have been a bit of a pain but using a git version of yabridge and newer version of wine i actually got them working flawlessly. Its sad that it is the way it is

1

u/RatherNott 1d ago

How are you increasing the number of VSTs on reaper? 

If you are simply increasing the number of active VSTs all in a single track with the FX window, it will put all of those VSTs on a single CPU thread and xrun.

If you have a single VST in a single track, then copy and paste that track itself a bunch of times so you have hundreds of armed tracks with the same vst, it will evenly spread them across all cores and won't xrun.

1

u/ExpensiveAd2268 1d ago

Ive done this by copy pasting tracks just playing various audio files

1

u/RatherNott 1d ago

Hm, how are you adjusting your pipewire config? An easy way to do so is with Cable.

https://github.com/magillos/Cable

1

u/Mr_Lumbergh Debian+KDE and Reaper 1d ago

Are you using an RT kernel set with audio processes getting priority?

I’m getting much better performance on Linux.

1

u/ExpensiveAd2268 1d ago

i am indeed on the RT kernel, with the following cmdline args:

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 splash nvme_core.default_ps_max_latency_us=0 threadirqs"

my rtirq.conf contains:

RTIRQ_NAME_LIST="xhci_hcd rtc snd usb i8042"

which i believe is ok?

I'm getting better performance in super simple projects, but once i load in some heavier FX like amp sims everything just comes crashing down

2

u/red38dit 1d ago

Is Arch or maybe CachyOS?

4

u/150c_vapour 1d ago

Install an AI harness and have it troubleshoot. This is the kind of shit they are very good at.

1

u/maxm 1d ago

Yep. My fireface uc is old and dont have drivers. Claude found unofficial drivers, and installed them. They were buggy and crackled. Claude rewrite the drivers. Much better. Then there were clicks every 20ish second. Claude fixed that too.

So now it is running. I let claude do all of my configurations now

1

u/Life_Interest_9967 1d ago

I've been having issues with REAPER randomly dropping out on some projects with native Linux plugins (powerdeumkit, Air windows, and tone3000 mostly) can't replicate in other DAWs. Maybe try it in bitwig

1

u/Life_Interest_9967 1d ago

This on arch. No issues in Ubuntu studio, same projects

1

u/Purple-Ad-3152 1d ago

Step 1: Install Ubuntu Studio 26.04 (full, or minimal + audio packages)

Step 2: Set your audio interface's profile to Pro Audio (task pane, speaker icon)

Step 3: Set buffer size (quantum) to 128 and sample rate to 48kHz (task pane, PW icon)

Step 4: Set Battery & Performance profile to Performance (task pane, battery icon)

That's it. All the best opimizations. With these instructions I can run NAM + 9 other realtime plugins together with 16 buffer, resulting in stable true roundtrip latency of 4.1ms using Scarlett 18i20.

Do that. Then, if you want, switch to other distribution. They all can achieve pretty much the same. But this is guarateed simplest route to high performance audio.

1

u/gahel_music 22h ago

It might be that pipewire is using rtkit to get it's realtime priority and that rtkit is not configured for real time audio. You should look into that if you didn't already, it's not checked by rtcqs or millisecond.

1

u/Cyclotramp 17h ago

How is your audio when you just use reapers’ stock plugins? It sounds like you’ve set it all up correctly, it’s making me wonder if you are dealing with plugins that are not working nicely with reaper. I’ll try the tone3000 plug-in later, I’ve been using neural-amp-modeler-lv2 on arch and have no problems at all.

1

u/Dukhlovi 12h ago

For me the alsa drivers work best. That is the deepest layer. all the rest is build on top of that and overhead. No configuration files needed. I don't have an rt kernel. I tried that before and it did not do anything for me either. So for me the most simple solution is the best. The only drawback is I cant watch/listen to youtube or use other applications while i am using Reaper. But that I shouldnt do anyway.

1

u/brujonica 1d ago

I have the same experience. Linux audio stack is messy as hell.

1

u/MeisterBounty 1d ago

I run cachy os, a ryzen 7600 cpu with a Motu interface and 128 samples no problem with multiple heavy vsts and have a roundtrip of about 7ms. Be sure to configure your pipewire with pro audio profile. I use “cable” for that. Then I start Reaper with a pipewire-jack wrapper and it just works. I have even renamed all the I/O within reaper to properly represent all the analog and digital I/O of the interface.

0

u/2QNTLN 1d ago

2

u/ExpensiveAd2268 1d ago

The problem isnt with VSTs, but audio performance in general. I get all the same problems even using native linux plugins like TONE3000

1

u/2QNTLN 1d ago

Ah i see.

1

u/prophet_margin 21h ago

Is all your system audio (beeps, browsers, etc) running through the Focusrite too?

0

u/HexspaReloaded 1d ago

Try chatgpt local project