04-11-2021, 07:57 AM | #1 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Linux (Manjaro) - Realtime Audio Configurations (Deprecated)
Deprecated...
For further discussion, just go to this thread : https://forum.cockos.com/showthread.php?t=255313 Last edited by Soli Deo Gloria; 05-06-2022 at 07:09 AM. |
04-15-2021, 06:39 AM | #2 |
Human being with feelings
Join Date: Aug 2016
Posts: 62
|
Thanks for testing & posting!
I have also seen how outdated information continues making the rounds long after the software has changed in ways that makes that information irrelevant or counterproductive. Zombie conventional wisdom...
__________________
https://www.linkedin.com/learning/di...io-foundations |
04-15-2021, 09:08 AM | #3 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
You're welcome!
While I'm doing great with this setup for now, I don't rule out updating the first post of this thread with further discoveries. On each setup things can change dramatically, so if someone wants to shed further light on the issue, I'll be glad to include the knowledge in the thread and use it myself. For now, this is the best I could find (mainly with the aid of Robbert, the dev from Yabridge, and other sources) in terms of audio optimizing in Manjaro, at least. I suspect it could be similar with other distros, in spite of the plethora of doubtful advices here and there. I'm glad it was of help... |
04-17-2021, 11:38 AM | #4 |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
So now I'm running wine-staging and Yabridge.
I'm curious what performance difference you noticed with wine-tkg using the "export WINEFSYNC=1" option. Or if you noticed a difference (if you did any comparison). |
04-17-2021, 12:03 PM | #5 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Who are you and what have you done with James Peters?
|
04-17-2021, 12:29 PM | #6 |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Lol. It's mostly for a couple drum plugins I got. Anyway I don't notice a difference in performance using wine-tkg and that specific option I mentioned above, with Yabridge. It seems the same as using wine-staging.
|
04-17-2021, 01:25 PM | #7 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
I never messed with wine-tkg, but switched to winehq-stable 6.0 after winehq-staging 6.3 broke all of my plugins, and I notice zero difference between them performance wise. I can play super tight buzz rolls on my V-Drums and Superior Drummer 2 tracks it and keeps up without ever feeling laggy or like there is a performance issue.
|
04-17-2021, 02:31 PM | #8 |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
I doubt you'd notice a difference in latency so much as CPU performance for the plugin being better/worse, and compatibility issues (some plugins not working, GUI issues, etc.)
I'm sticking with Yabridge for now. It uses less CPU than LinVST (10% in general but up to 50% for one plugin I tried), and it works with the latest wine-staging. I also had a GUI that made the mouse pointer disappear until I reloaded the plugin, but that doesn't happen in Yabridge. |
04-17-2021, 03:57 PM | #9 |
Human being with feelings
Join Date: Nov 2020
Posts: 275
|
Did you check if it was enabled correctly? It's a bit difficult to verify that it's setup up properly for REAPER launched from the GUI (because that requires WINEFSYNC=1 to be set in your login shell's profile when you log in), but in a terminal if you first run `wineserver -k` to kill all Wine processes and then launch REAPER, you should be seeing a line containing either `fsync: up and running.`, or a similar line mentioning futex2. This of course only works when your kernel also supports either the fsync or the futex2 patches!
|
04-17-2021, 06:00 PM | #10 |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
I tried that with wine-tkg again (swapping them is easy enough) and I was able to see "fsync: up and running" in Terminal when loading Windows VST plugins in Reaper.
For the plugins I'm running, I don't notice a difference in CPU between wine-tkg (6.5) and wine-staging (6.5) using Yabridge 3.1.0. One of the plugins, used with a live input, drives my realtime CPU to 25%, so even if it were a few % different I'd notice with a number that significant. That's unusually high CPU for a plugin but I think it has something to do with the fact it's a VSTi that has all samples bundled (possibly as FLAC instead of WAV) in the one DLL file which is 1GB. A similar plugin by the same company which has samples external to the DLL (as WAV files) takes only about 10% of my realtime CPU when played live. |
04-17-2021, 08:27 PM | #11 | |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Before Wine-tkg, I used Wine-NSPA and with it, once Robbert helped me to understand its variable exporting, I remember I noticed a clear improvement with some heavy instruments/projects (Staging was still on version 5.x, if I remember correctly). Wine-tkg performs similarly and it's much faster to install, so it's my go-to now. Regarding the technical differences with Staging, I'm sure Robbert will be able to provide some insight. Probably the most noticeable differences arise when you push the system to its limits... |
|
04-18-2021, 03:46 AM | #12 | |
Human being with feelings
Join Date: Nov 2020
Posts: 275
|
Quote:
|
|
04-18-2021, 05:36 AM | #13 | |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Quote:
Single memory stick, maybe. LinVst uses shared memory (so do various other apps) and multiple memory sticks drop the cpu use due to interleaving and bandwidth. Game players tend to use multiple memory sticks. There are advantages and disadvantages to using shared memory. Google has submitted some shared memory IPC speedups to Linux, apparently they are pretty effective. Last edited by osxmidi; 04-18-2021 at 05:50 AM. |
|
04-18-2021, 06:50 AM | #14 | |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
|
|
04-18-2021, 06:51 AM | #15 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
|
|
04-18-2021, 07:02 AM | #16 |
Human being with feelings
Join Date: Nov 2020
Posts: 275
|
It will probably live in Wine Staging for a bit and then make its way to Wine proper eventually. Esync was what kicked all of these developments off and that's been in Wine Staging for a number of years now, but they'll typically only merge code into Wine when they're 100% sure that this is the correct solution and esync wasn't that. And ntsync will be that solution since it's a tailor made Linux kernel module to handle synchronization in Wine.
|
04-18-2021, 07:16 AM | #17 | ||
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Quote:
Quote:
It would be hilarious to have Linux perform as well as Windows when using Windows DAW software. |
||
04-18-2021, 07:39 AM | #18 |
Human being with feelings
Join Date: Nov 2020
Posts: 275
|
There will likely always be some overhead, but the push for Wine-based gaming by Valve really changed the Wine landscape for the better over the last couple of years (although if the application doesn't do too many things that would involve wineserver, it might actually even be faster when run through Wine on Linux).
|
04-18-2021, 07:47 AM | #19 |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Gamers: keeping Linux moving forward.
Performance with Windows VST plugins in Yabridge is already pretty good, enough that I'm not concerned about the difference from using Windows. The one extreme example of a VSTi using 25% realtime CPU that I mentioned: it performs similarly in Windows anyway when the latency for audio device is set as low as I was using in ALSA (and I use the plugin "live"). I can even cut that realtime CPU in half by increasing my latency a bit. The "normal" CPU use, when not played "live", is also pretty close to what the plugin uses in Windows. |
04-18-2021, 07:55 AM | #20 | |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
|
|
04-18-2021, 07:58 AM | #21 | |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Quote:
Next: getting the ALSA latency as low as some of the best Windows ASIO drivers. Currently ALSA incurs a bit more latency. If you do a test to measure your actual round-trip latency you'll find there's a portion not being reported by Reaper, which is a bit larger than what some good ASIO drivers incur. The latency is still good, more than good enough for me, but some people want extremely low latency. |
|
04-18-2021, 08:07 AM | #22 | |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
There is the Arch professional audio page which has a lot of further tweaks recommended. I had a bad experience in Manjaro with some of them when I began with this OS some months ago, but now I'm considering that it could have been due to some gross mistakes on my part. In any case, I'll be testing one by one again, from time to time, and including each one in this thread when I see that it effectively adds some improvements with heavy loads/realtime/low latency use-cases. For now, with just the tweaks mentioned above, Manjaro has made me really forget about Windows for audio production... |
|
04-18-2021, 08:11 AM | #23 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Currently, none of the manufacturers are making proprietary Linux drivers for their audio hardware. If in Windows we were to compare USB Class Compliance to Linux USB Class Compliance we would see identical performance. On my Behringer UMC1820 I was able to play projects in Windows using the proprietary ASIO driver at 32 samples latency without pops or clicks, but using the USB Class Compliant driver in Linux 64 is the lowest I can run the same hardware. |
|
04-18-2021, 08:34 AM | #24 | ||
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Quote:
Quote:
Linux in general has been quite reliable for me, as long as I don't break it myself. I might be assuming too much, but I wouldn't be surprised if ALSA ends up being capable of performance to that degree. Last edited by JamesPeters; 04-18-2021 at 11:56 AM. |
||
04-18-2021, 11:07 AM | #25 | ||||
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Well, I'm playing keyboards and recording at 64 samples now, and I'm delighted! I could almost never rely on that block size on a heavily customized Win 7... From what you say, there must be some latency overhead that I don't really notice or care about. I am rather tolerant with the latency issue, anyway. I've read here and there that some people desperately needs 32 to play, which I couldn't care less about. If necessary, I've played with 256 and it's doable all the way. Quote:
Quote:
Quote:
Yes, I realize that. At any moment, I'll edit the first post here to reflect these temporary conclusions and present the whole thread as a work in progress... Last edited by Soli Deo Gloria; 04-18-2021 at 01:02 PM. |
||||
04-18-2021, 01:33 PM | #26 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
OTOH, when I plug a guitar into my UMC1820 to play through REAPER into Guitar Rig, both halves are used so there is first the A/D conversion, then digital data passes through Guitar Rig and REAPER sends it back out to go through the D/A conversion. That's why you see two sets of latency numbers in REAPER, like mine read 1.3/2.6ms in REAPER, but those numbers are the hardware reported latency, and there is more hidden latency that can only be measured with a loopback cable. My Behringer UMC1820 has a real full round trip latency of 7.9ms because there is another 4.0ms of hidden latency. Still, playing a guitar through Guitar Rig with less than 8ms latency feels pretty tight on my system. One additional piece of info: The periods are the number of buffers, where the default is 2 for double buffering the output. Setting 3 periods like I run, triple buffers the 64 sample block size I have selected, which achieves a 192 sample window. As long as I keep the PDC latency of all plugins I put on a track below 192, I won't expect to hear any pops or clicks, because they add up to less than the total window size with triple buffering. Last edited by Glennbo; 04-18-2021 at 01:46 PM. |
|
04-18-2021, 05:00 PM | #27 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, this is quite useful, Glennbo; thanks so much for the info! So, with 64 samples in the block size and 3 periods, using only Vst/Vsti plugins, I see 1.4/2.9 ms reported. Only the first half is used, isn it? (1.4 ms). So, the roundtrip latency should be 4.2 ms (1.4 x 3) + hidden latency? Did I understand correctly?
|
04-18-2021, 05:32 PM | #28 | ||
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
The first and second numbers match on my system if I set it for 2 periods, which leads me to believe the first value is hard wired to be double buffered. If I change it to 8 periods, the first number remains 1.3ms, but the second one goes up to 9.3ms from the normal 2.6ms I see with 3 periods. Quote:
|
||
04-18-2021, 09:05 PM | #29 |
Human being with feelings
Join Date: Feb 2014
Posts: 620
|
Jut some notes from my testing, ymmv.
With a plugin like Valhalla Delay, I can run it at 64 samples 3 periods on a i3 with the built in intel (or whatever) sound hardware at 48000 with rt setup for Manjaro or other distros. At 2 periods the built in sound hardware gives up and it's just silent. I've got a fpu intensive amp sim that I use for testing and it gets around 30% cpu use on a Core Duo and around 8% cpu use on an i3 and around 2% on an i7 with 64 samples 3 periods on built in sound hardware. If I switch to my old M-audio cards or my Focusrite usb then it can do better. That's using Linux Reaper and LinVst with anticipate fx processing turned off. Ardour seems to be a lot different for some reason, with higher cpu use which may or may not be accurate, I don't know, it's still good. Waveform seems not too bad once it's quirks are worked out. Bitwig, I've only used the demo, it's very java based I think, but I'm not a Bitwig expert. Renoise is like the old Amiga trackers and seems ok. Wine, in it's current state isn't that bad performance wise, but maybe some changes can help with performance in the future. Also, kernel IPC changes that might be going into the kernel in the future. Wine has a basic d2d1 dll which doesn't work very well and an increasing number of newer plugins (especially vst3 plugins) are using d2d1 (and/or other d3d components) which is one of the reasons that I'm not that interested in vst3 until Wine improves in those areas. Games (Steam) are pushing d3d changes in Wine but not d2d1 changes from what I've been able to pick up (I'm not a Wine internals expert), so d2d1 remains broken. Last edited by osxmidi; 04-18-2021 at 10:05 PM. |
04-20-2021, 07:27 AM | #30 | ||
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Quote:
Thanks again, Glennbo! It's quite useful to know what those numbers represent... Regarding the hidden latency, I think I can safely rely for now in my playing perception. The actual feel of my current setup (both in terms of keyboard playing and processing delay of miced voices) is perfectly fine for my taste, so, I won't worry at all about the hidden latency. Quote:
Another of the ultimate improvements in Linux Audio (and maybe the most trascendental one) will probably come when all of this is easily integrated in all/most distros as an easy, fool-proof addon. Last edited by Soli Deo Gloria; 04-20-2021 at 08:01 AM. |
||
04-20-2021, 07:58 AM | #31 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Note : I have just edited the first post in order to emphasize its provisory status, and to make clear (hopefully) that this is posted from a newbie's point of view (without any claim of deep knowledge in the matter), and only with aim of sharing a concise list of steps that have helped me to achieve comfortably all of my composing/performing/editing duties in the Linux version of Reaper with the inclusion of heavy Windows Vsti stuff.
|
04-28-2021, 12:13 AM | #32 |
Banned
Join Date: Dec 2018
Location: Texas
Posts: 138
|
Speaking of Manjaro, does anyone know if this distro will work under a VM? I normally run OpenSUSE, but its a big huge pain in the butt to get working for a DAW. I read about Manjaro here, and while I have not installed it yet as I wanted to see about running it on a VM to test drive. I know its an Arch dirivitive and was essentially told nope, but I was asking the question on the Manjaro forum and being honest that I was only at the time looking to test drive it in a VM. My post disappeared and lost my account to the forum. They dont seem to be a friendly lot. At least compared to the OpenSUSE people.
|
04-28-2021, 10:13 PM | #33 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, I don't know, really... I never used Linux in a VM, but anyway I wouldn't be able to think of a specific reason why it wouldn't work in such a context. I can't speak for Manjaro's community, but the OS itself is quite friendly, indeed, and it needed just the few tweaks outlined above to perform great with realtime audio, at least in my own personal experience.
|
04-28-2021, 11:56 PM | #34 | |
Human being with feelings
Join Date: Mar 2015
Location: Mainland China
Posts: 157
|
Quote:
If you need a better audio system(no default), most distro will need user do some configure by themself . Except some distro like ubuntu studio. |
|
04-29-2021, 05:14 AM | #35 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, I've used Ubuntu Studio for months and I can tell you for sure that its out of the box performance is far from great... Nothing to do with what I have just achieved with Manjaro and these few tweaks outlined above... (and I mean, night and day difference).
|
04-29-2021, 12:26 PM | #36 | |
Human being with feelings
Join Date: Jun 2018
Posts: 850
|
Quote:
|
|
04-29-2021, 07:42 PM | #37 |
Human being with feelings
Join Date: Oct 2013
Location: Argentina
Posts: 1,303
|
Well, the first time you run any Wine (at least Staging and TKG, I must say), if Mono and Gecko are not installed they will be downloaded and installed automatically. That's my experience, at least. I haven't installed much more than that and Winetricks, above all for the Native Access sh*t...
|
04-29-2021, 08:47 PM | #38 | |
Human being with feelings
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
|
Quote:
Installing Wine and Yabridge was simpler than I expected and barely required any configuration. |
|
Thread Tools | |
Display Modes | |
|
|