r/linuxaudio • u/ExpensiveAd2268 • 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
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.
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.
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.
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.
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:
(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/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/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/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.
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/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/DevelRoth 1d ago
https://github.com/vcostin/dac-rate
it might help you.
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/readyflix 1d ago
https://nobaraproject.org/
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
Maybe try https://github.com/dguedry/vstenv
0
u/HexspaReloaded 1d ago
Try chatgpt local project