Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 04-11-2021, 07:57 AM   #1
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default Linux (Manjaro) - Realtime Audio Configurations

[WORK IN PROGRESS]

I started this research being basically an Ubuntu user (Xubuntu, Ubuntu Studio, Mint, you name it). The fact is that, after an initial period of several months, I switched to a combination of Manjaro, Yabridge as a Windows VST bridge, and a fork of Wine called Wine TKG (https://github.com/Frogging-Family/w...g-git/releases), all of which has allowed me to use, for example, Kontakt and other heavy stuff in Linux in a similar way to Windows (with an expected but not too big and absolutely negotiable dose of overhead). I give this as an example of a task which takes realtime audio in Linux to its limits.

Robbert-vdh (the developer of Yabridge) has given me an absolutely priceless feedback. As he has kindly pointed out to me during my transition, some of the main bottlenecks regarding such an intensive task as bridging Windows plugins in Linux lay both in the kernel used by Ubuntu and many other distros, together with some inherent lacks in the Wine department, solved by Wine TKG, Wine-Nspa and possibly other forks. I'm talking here about bridging Windows plugins, but take into account that this also affects realtime audio in general. And what's even more bizarre is that, at least in Manjaro, most of the suggested audio tweaks that dozens of threads/sites recommend here and there, in fact have the potential to even hurt the performance if applied carelessly, all at once and without a proper knowledge of the implication of the procedures, as I could test out myself in my newbie condition.

So, for now, consider this list as a work in progress which nevertheless has given me, up to now, excellent results in terms of realtime performance with Linux Manjaro. And please, bear in mind that you mileage might vary dramatically, so I cannot be responsible for any damage that might arise in your setup from the application of any of these procedures. This is only an account of my experience so far, as a newbie, which coincides with other users but might differ greatly from your own experience. So, backup your system before trying any of this, a give each procedure its chance one by one, with great care.

From time to time I will be testing other tweaks mentioned in this page : https://wiki.archlinux.org/index.php/Professional_audio and will include them, one by one, as long as I see any noticeable improvement or have any first-hand, qualified reference regarding their advantages.

THE PROCEDURES (provisory list):


1 - Add your user to the audio group

sudo gpasswd -a user group

(Replace "user" by your username and "group" by audio).


You should check that your user has realtime privileges...

In the terminal, type :

sudo nano /etc/security/limits.conf

And if you don't see any "audio" line in the code, add the following before the end of file :

Code:
#<domain>      <type>  <item>         <value>

#audio group

@audio           -       rtprio          95
@audio           -       memlock         unlimited 

# End of file
Ctrl+X gets you out of the nano editor (choose "Y" to save the changes. Next time you restart you'll have realtime privileges...


This, of course, is one of the ways to achieve this. As noted by Robbert-vdh, you can also install the realtime-privileges pack from the Manjaro official repository and add your user to the realtime group, which I still haven't done myself. Hence, I am not able to provide the alternative procedure in detail, yet.


2 - Set the CPU governor to performance

[EDIT] The following procedure hasn't given me a 100% reliable solution in my machines. Hence I downloaded an app from Manjaro's package manager called cpupower-gui which allows me to set, with great detail and in a visual manner, the speed and governor of each CPU core. Up to this date (April 11th), it still has a bug where it won't load a custom profile on log in -if you don't want to set the desired profile each time -, but anyway it's a great little tool that allows you to check easily the real CPU speed of your machine. Other people use TLP, a similar but more complex app, to achieve similar things.

I'll leave the - supposedly - basic procedure, just in case you want to try it out. I suggest downloading cpupower-gui, anyway, and checking out that the desired result is really achieved :



Download with the Add/Remove software a tool called cpupower

Then, in /etc/default/cpupower, do the following :

Uncomment

#governor='ondemand'

and change it to

governor='performance'

Then, in the terminal

sudo systemctl enable --now cpupower


3- Install Wine-TKG (with just a double-click in the downloaded file) and enable this variable in /home/user/.profile for Wine TKG to perform its magic :

export WINEFSYNC=1


That's all in my case, for now. In the case of USB audio cards, for example, it can probably prevent some problems to disable USB autosuspend in the OS (I did it with an app called laptop-mode-tools, and TLP does it, too), but I can't speak reliably and first-hand about that issue. Manjaro, in my experience at least, seems to need very few tweaks to perform great.


Note : this was posted in another thread which began as Ubuntu-focused, but to avoid confusion due to a lot of replies that are not related to the current content of my initial post, I move it here for the sake of clarity and just changed the title of the other one to ask for removal...

Last edited by Soli Deo Gloria; 04-20-2021 at 07:52 AM.
Soli Deo Gloria is offline   Reply With Quote
Old 04-15-2021, 06:39 AM   #2
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 48
Default

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...
Matt Mayfield is offline   Reply With Quote
Old 04-15-2021, 09:08 AM   #3
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

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...
Soli Deo Gloria is offline   Reply With Quote
Old 04-17-2021, 11:38 AM   #4
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

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).
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-17-2021, 12:03 PM   #5
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by JamesPeters View Post
So now I'm running wine-staging and Yabridge.
Who are you and what have you done with James Peters?
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 04-17-2021, 12:29 PM   #6
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

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.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-17-2021, 01:25 PM   #7
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by JamesPeters View Post
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.
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.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 04-17-2021, 02:31 PM   #8
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

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.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-17-2021, 03:57 PM   #9
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 57
Default

Quote:
Originally Posted by JamesPeters View Post
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.
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!
robbert-vdh is offline   Reply With Quote
Old 04-17-2021, 06:00 PM   #10
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

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.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-17-2021, 08:27 PM   #11
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by JamesPeters View Post
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).

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...
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 03:46 AM   #12
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 57
Default

Quote:
Originally Posted by JamesPeters View Post
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.
Yeah you would mostly notice it in plugins that rely a lot on the Windows synchronization objects (and that will thus likely use some internal multithreading). Kontakt is a prime example of a plugin where this makes a night and day difference. Normally Wine has to emulate those synchronization primitives inside of wineserver because some of those Windows functions (like WaitForMultipleObjectsEx) don't have Linux equivalents. To get rid of that overhead people have come up with esync (which uses eventfd, but it can be a bit buggy), fsync (which adds the missing functions to futexes), and now people are also working on fastsync (which is esync but better) and ntsync (which should be the holy grail and it uses a virtual device in /dev/ that implements the entire Windows synchronization model).
robbert-vdh is offline   Reply With Quote
Old 04-18-2021, 05:36 AM   #13
osxmidi
Human being with feelings
 
Join Date: Feb 2014
Posts: 609
Default

Quote:
Originally Posted by JamesPeters View Post
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.
That might be due to hardware https://medium.com/the-innovation/ry...l-d7d95794b794

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.
osxmidi is offline   Reply With Quote
Old 04-18-2021, 06:50 AM   #14
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by robbert-vdh View Post
To get rid of that overhead people have come up with esync (which uses eventfd, but it can be a bit buggy), fsync (which adds the missing functions to futexes), and now people are also working on fastsync (which is esync but better) and ntsync (which should be the holy grail and it uses a virtual device in /dev/ that implements the entire Windows synchronization model).
Interesting info! Thanks! And regarding the "holy grail", will it be added to a certain Staging mod or something like that?
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 06:51 AM   #15
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by osxmidi View Post
That might be due to hardware https://medium.com/the-innovation/ry...l-d7d95794b794

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.
I've always put matched pairs of memory in every computer I've built (and I've built a lot of them) specifically to get dual channel linear mode going.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 04-18-2021, 07:02 AM   #16
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 57
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Interesting info! Thanks! And regarding the "holy grail", will it be added to a certain Staging mod or something like that?
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.
robbert-vdh is offline   Reply With Quote
Old 04-18-2021, 07:16 AM   #17
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

Quote:
Originally Posted by osxmidi View Post
That might be due to hardware https://medium.com/the-innovation/ry...l-d7d95794b794

Single memory stick, maybe.
I'm using a Ryzen 7 3700X with a dual-channel memory kit (2 sticks). Like Glen, I've taken the dual-channel approach for as long as I can reliably remember.

Quote:
Originally Posted by robbert-vdh View Post
Kontakt is a prime example of a plugin where this makes a night and day difference.
Ah. I'm not using anything like that.

Quote:
Originally Posted by robbert-vdh View Post
and now people are also working on fastsync (which is esync but better) and ntsync (which should be the holy grail and it uses a virtual device in /dev/ that implements the entire Windows synchronization model).
It would be hilarious to have Linux perform as well as Windows when using Windows DAW software.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-18-2021, 07:39 AM   #18
robbert-vdh
Human being with feelings
 
Join Date: Nov 2020
Posts: 57
Default

Quote:
Originally Posted by JamesPeters View Post
It would be hilarious to have Linux perform as well as Windows when using Windows DAW software.
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).
robbert-vdh is offline   Reply With Quote
Old 04-18-2021, 07:47 AM   #19
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

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.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-18-2021, 07:55 AM   #20
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by robbert-vdh View Post
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.
Well, that will be the ultimate realtime audio enhancement in Linux, it seems. It will probably leave aside Wine-TKG and the like when it's definitely in Wine's code, although I guess it will take quite some time for it to happen. For now, TKG is doing great!
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 07:58 AM   #21
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
Well, that will be the ultimate realtime audio enhancement in Linux, it seems.
It's one of them, for sure.

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.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Old 04-18-2021, 08:07 AM   #22
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by JamesPeters View Post
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.
Yes, I'm noticing a surprinsingly good level of performance with Kontakt and some heavy libraries (the Upright pianos from Cinesamples, to name one). With just these tweaks I mention in this thread, I'm already having a better performance than I ever had with Windows, which is plain crazy (!).

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...
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 08:11 AM   #23
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by JamesPeters View Post
It's one of them, for sure.

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.
I think this is a matter of OS suppled USB Class Compliance drivers vs. a manufacturer's proprietary ASIO driver for Windows, which will use all the tricks to bypass OS stuff and try to live in the lowest rings the OS will allow.

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.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 04-18-2021, 08:34 AM   #24
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
...With just these tweaks I mention in this thread, I'm already having a better performance than I ever had with Windows, which is plain crazy (!).
I noticed a performance increase as soon as I switched to Linux from Windows 7, and that was a Windows setup which I'd customized for performance as much as I could. So the fact that Windows VST take a bit more CPU in Linux hardly means anything to me.

Quote:
Originally Posted by Soli Deo Gloria View Post
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.
It's tempting to try a lot of OS tweaks all at once to "just get them all done". It's easy to make a mistake when doing that, especially if you're not familiar with the OS when you're doing it. (And when some of the recommended tweaks were meant for previous Linux kernels, and/or don't apply unless you use Jack with standalone synths connecting to/from other audio applications.) That's been the biggest challenge for me so far, trying to figure out if I need to do anything different and if so what those differences should be. I test things one at a time and document as I go along.

Linux in general has been quite reliable for me, as long as I don't break it myself.

Quote:
Originally Posted by Glennbo View Post
...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.
I might be assuming too much, but I wouldn't be surprised if ALSA ends up being capable of performance to that degree.
__________________
Using REAPER for Linux on Manjaro 21.0.4

Last edited by JamesPeters; 04-18-2021 at 11:56 AM.
JamesPeters is offline   Reply With Quote
Old 04-18-2021, 11:07 AM   #25
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by JamesPeters View Post
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.

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:
Originally Posted by Glennbo View Post
I think this is a matter of OS suppled USB Class Compliance drivers vs. a manufacturer's proprietary ASIO driver for Windows, which will use all the tricks to bypass OS stuff and try to live in the lowest rings the OS will allow.
Totally, and as James says, seeing what I see in terms of Windows compatibility on Linux, I wouldn't be surprised if, at some point, we reach a comparable level with ALSA...



Quote:
Originally Posted by JamesPeters View Post
I noticed a performance increase as soon as I switched to Linux from Windows 7, and that was a Windows setup which I'd customized for performance as much as I could. So the fact that Windows VST take a bit more CPU in Linux hardly means anything to me.
We're on the same ship, except that it took me almost a whole year to surpass Windows performance...


Quote:
Originally Posted by JamesPeters View Post
It's tempting to try a lot of OS tweaks all at once to "just get them all done". It's easy to make a mistake when doing that, especially if you're not familiar with the OS when you're doing it. (And when some of the recommended tweaks were meant for previous Linux kernels, and/or don't apply unless you use Jack with standalone synths connecting to/from other audio applications.) That's been the biggest challenge for me so far, trying to figure out if I need to do anything different and if so what those differences should be. I test things one at a time and document as I go along.

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.
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 01:33 PM   #26
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
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.
One item to note about latency. Playing a midi keyboard through REAPER to a virtual instrument only has half the latency because it's not doing an A/D conversion. Since the incoming data from midi is digital, only the D/A conversion happens.

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.
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 04-18-2021 at 01:46 PM.
Glennbo is offline   Reply With Quote
Old 04-18-2021, 05:00 PM   #27
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

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?
Soli Deo Gloria is offline   Reply With Quote
Old 04-18-2021, 05:32 PM   #28
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 5,919
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
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).
I believe the second number is the playback side, so a VSTi would be playing back triple buffered.

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:
So, the roundtrip latency should be 4.2 ms (1.4 x 3) + hidden latency? Did I understand correctly?
That's pretty much it and the hidden latency could be about the same size as the reported latency that REAPER displays. You are probably hitting just a little over 8ms round trip, but the only way to know for sure is to measure it with a loopback cable. I have REAPER set to use reported latency and to add another 265 samples to it, in the manual offset for recording settings.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 04-18-2021, 09:05 PM   #29
osxmidi
Human being with feelings
 
Join Date: Feb 2014
Posts: 609
Default

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.
osxmidi is offline   Reply With Quote
Old 04-20-2021, 07:27 AM   #30
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by Glennbo View Post
I believe the second number is the playback side, so a VSTi would be playing back triple buffered....

That's pretty much it and the hidden latency could be about the same size as the reported latency that REAPER displays. You are probably hitting just a little over 8ms round trip, but the only way to know for sure is to measure it with a loopback cable...

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:
Originally Posted by osxmidi View Post
JWine, in it's current state isn't that bad performance wise, but maybe some changes can help with performance in the future.
Thank you too for your insights, Osxmidi! It's clear to me (after almost a year of experience, which is probably too little but enough to have tested a number of things) that the real problem with Wine comes when you use multithreaded things like Kontakt, which can deliver dramatic hiccups even with not too stressful passages. I don't doubt that in some time (and maybe, sooner than we expect) things will improve even beyond what these tweaks now afford...



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.
Soli Deo Gloria is offline   Reply With Quote
Old 04-20-2021, 07:58 AM   #31
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

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.
Soli Deo Gloria is offline   Reply With Quote
Old 04-28-2021, 12:13 AM   #32
Bjorn.LaSanche
Human being with feelings
 
Bjorn.LaSanche's Avatar
 
Join Date: Dec 2018
Location: Texas
Posts: 118
Default

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.
__________________
Don’t rush me. I’m moving as fast as I want to.
Bjorn.LaSanche is offline   Reply With Quote
Old 04-28-2021, 10:13 PM   #33
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

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.
Soli Deo Gloria is offline   Reply With Quote
Old 04-28-2021, 11:56 PM   #34
wastee
Human being with feelings
 
Join Date: Mar 2015
Posts: 42
Default

Quote:
Originally Posted by Bjorn.LaSanche View Post
Speaking of Manjaro, does anyone know if this distro will work under a VM?
Linux distro should be easy install on any VM, such as virtualbox/vmware/kvm, etc..


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.
wastee is offline   Reply With Quote
Old 04-29-2021, 05:14 AM   #35
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

Quote:
Originally Posted by wastee View Post
Except some distro like ubuntu studio.
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).
Soli Deo Gloria is offline   Reply With Quote
Old 04-29-2021, 12:26 PM   #36
pax-eterna
Human being with feelings
 
Join Date: Jun 2018
Posts: 175
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
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...
what other WINE packages did you also install (viz WINE-Mono;WINE-Gecko etc etc)?
pax-eterna is offline   Reply With Quote
Old 04-29-2021, 07:42 PM   #37
Soli Deo Gloria
Human being with feelings
 
Soli Deo Gloria's Avatar
 
Join Date: Oct 2013
Location: Buenos Aires, Argentina
Posts: 1,121
Default

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...
Soli Deo Gloria is offline   Reply With Quote
Old 04-29-2021, 08:47 PM   #38
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,575
Default

Quote:
Originally Posted by Soli Deo Gloria View Post
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.
Same here.

Installing Wine and Yabridge was simpler than I expected and barely required any configuration.
__________________
Using REAPER for Linux on Manjaro 21.0.4
JamesPeters is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.