Live mixing with Linux - State of the art 2018

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Live mixing with Linux - State of the art 2018

Post by khz »

My suggestion:
  1. firmware-9.6.0-amd64-netinst.iso - https://cdimage.debian.org/cdimage/unof ... 64/iso-cd/
  2. Window manager - XFCE
  3. For the "non-free" entries after installation in the "/etc/apt/sources.list" add the 2 entries so that "main contrib non-free" is entered.
  4. Code: Select all

    apt-get install intel-microcode firmware-linux-nonfree linux-image-rt-amd64 alsa-firmware-loaders
    or (Backports https://wiki.debian.org/Backports) https://packages.debian.org/stretch-bac ... e-rt-amd64 or (Repository https://wiki.debian.org/DebianRepository) https://liquorix.net/.
    Possibly still "jackd2" (Then the "shm" entry.) and "rtirq-init".
  5. limits.conf > Must have! >> https://wiki.linuxaudio.org
  6. Possibly still https://wiki.linuxaudio.org/wiki/system ... #quickscan
viewtopic.php?p=92293#p92293

KDE is not a slim WM. KXstudio is from 2014? Also KXstudio you should look what makes sense for you and check/adapt according to these criteria individually.
But if Windows is better for you, take that. That's the nice thing that there are still several operating systems.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
Nuri
Established Member
Posts: 32
Joined: Mon Oct 29, 2018 10:27 am

Re: Live mixing with Linux - State of the art 2018

Post by Nuri »

@Michael Willis
I come figuratively from France but I leave in Germany for 15 years now. So... English speaking is literally not my first skill :P


@JamesPeters
Before I made the tests I really had searched for the best Linux distro. My conclusion was AVLinux and KXStudio are the best for me.
I tested both OS on another PC, weeks before I had any suitable hardware to make the "real" tests (RME HDSPe, high-end intel CPU...).
I though they are the best OSes because:
- they come preconfigured, everything should work out-of-the-box
- they come with RT or LowLatency kernels
- they are lightweight enough, with still convenient and powerful desktop environments
- they are popular and maintained (KXStudio :roll: ...)
- they are based on Debian and Ubuntu

Both AVLinux and KXStudio already have a CPU governor set at "performance".
Everything is already tweaked for best audio performance, so I don't know why my tests are so disappointing :(

I had already checked the DragonFly reverb. It sounds nice and it's relative easy to configure but the ReaVerb plugin was easier for me.


@Drumfix
The Reaper project is attached to this post.
I'm using Jack because... err... because everybody uses Jack for audio in Linux :wink: :oops:
But I can not set reaper to use ALSA. I made the following config:
Input channels:32 Input device: hw:HDSPMxf184c1 ; HDSPM - RME RayDAT_f184c1
Output channels:32 Output device: hw:HDSPMxf184c1 ; HDSPM - RME RayDAT_f184c1
Samplerate: 48000
Blocksize: 32
Bit depth: 24
Period: 2
RT priority: 40 (suggested setting for RT use)
and then get this message from Reaper:
There was an error opening the audio hardware:

ALSA: error setting input device period count
I tried other period counts but it solves nothing.


@khz
Thank you, but I do not want to begin the never-ending Linux tweaking in systems which are supposed to "do the job out-of-the-box".
Since 2011, I'm struggling every 2 years with audio in Linux and then, as I'm tired of the never-ending tweaking, I go back to Windows.
Every 2 years... Much has improved in the last years, specifically USB support, Reaper and Bitwig port, Linux VST's... But in my case, the combination of hardware and software seems not to work efficiently.

The performance of Windows 10 with the RME HDSPe RayDAT is the proof that no RT or even low latency kernels are needed to achieve very good results. I can not understand anymore the run after the fastest RT kernel in the Linux world. This is not the key!

But... Let's try Windows 10 on Wednesday and "see" if we will hear glitches or not at 32 samples / 48kHz. :wink:
Attachments
MK7-Live.RPP.zip
(15.07 KiB) Downloaded 78 times
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Live mixing with Linux - State of the art 2018

Post by merlyn »

Nuri, thanks for posting all this. It's a case study in setting up a live mixing system.

What occurs to me is that rather than a comparison between Linux and Windows, the comparison is between a new operating system and an old one. For a fair test we'd have to look at KX compared to Windows from 2014.

I suspect your cpu scaling governor isn't set to performance. If you use Cadence to set it, it can switch back to 'ondemand' of its own accord. The workaround is to right click on the cpu icon in KX's taskbar and put the frequency up to the max. Cadence will now say 'userspace', and it will stay like that. I didn't find a way to permanently set that, so I did it on every boot.

If Windows works better for you, use it.

My experience is that Linux now has excellent audio capabilities, but you have to use the latest stuff, and there isn't an easy way to set that up at the moment.
User avatar
Nuri
Established Member
Posts: 32
Joined: Mon Oct 29, 2018 10:27 am

Re: Live mixing with Linux - State of the art 2018

Post by Nuri »

Yesterday was Wednesday!

We did some real tests with real audio, real speakers, rear rehearsal...
Yesterday, only with Windows 10.

At 32 samples, there was a lot of pops, clicks and glitches... while Reaper reports 0 xruns :x .
At 64 samples, there was still pops, clicks and glitches. Not so much, but much enough so that the system is not live playable.
At 128 samples, everything runs fine but latency becomes noticeable.
I'm frustrated :evil:
Those tests have shown that all the xruns reported by AVLinux and KXStudio should be also present in Windows (since I hear them).
Windows is lying! :cry:

On Windows 10, Reaper NEVER reports one xrun. NEVER!
Something is wrong since I'm hearing that the audio stream is not healthy at 32 and 64 samples buffer size.

Next tests and tweaking on Sunday. Still with Windows 10.
If the system can not manage 64 samples, I will give Linux one more chance (oh no... the Linux tweaks orgy...) and I will try some advices posted by khz.
On the Reaper forum, I will try to figure out why I can not set Reaper to use ALSA.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Live mixing with Linux - State of the art 2018

Post by lilith »

Are any plugins involved? How many tracks are you recording at the same time?
JamesPeters
Established Member
Posts: 188
Joined: Fri Jun 29, 2018 6:35 pm
Has thanked: 8 times
Been thanked: 15 times

Re: Live mixing with Linux - State of the art 2018

Post by JamesPeters »

Khz said something interesting. What is the kernel that KXstudio uses? If it's older, you may want to try a newer kernel, even if it means switching distros. (I know I'm using a recent kernel.)
User avatar
Nuri
Established Member
Posts: 32
Joined: Mon Oct 29, 2018 10:27 am

Re: Live mixing with Linux - State of the art 2018

Post by Nuri »

@ lilith
look at one of my past post on this thread. I've attached the Reaper project used for tests.
About 50 plugins are involved, all Reaper's built-ins.
I'm not interested in recording. No track will be recorded!
I'm interested in playing live with DAW computing of effects, automation, volume, pan... without perceptible latency. Like a DJ or an electronic artist would do, but, in my case, with "classical rock instruments": drums, bass, 2 guitars, vocals.
Recording is not a problem since we don't need extreme low latency to record.
We need extreme low latency to PLAY LIVE over the computer.

@ JamesPeters
I won't stick with KXStudio.
I have first installed Windows 10 and left it so that I can dual boot it with any Linux distro later.
Then, I have installed AV Linux but I got to much xrun and decided not to begin to tweak the system.
Over it, I have installed KXStudio but I got the same results (lot of xruns).
Then I went to Windows 10 back and the "dry runs" tests have shown 0 xrun.
Then yesterday (real tests with real audio and speakers) I heard that Win10 produces a lot of dropouts and glitches, while Reaper's performance meter shows 0 xrun...

I think I will next week reinstall AV Linux over KXStudio and check the system config and also make REAL tests with it.
AV is much more up-to-date and provides XFCE (for me, better than the KDE4 of KX).
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Live mixing with Linux - State of the art 2018

Post by merlyn »

I found that the more I messed with AVLinux the worse it got. It's called AV Linux. It doesn't have Rosegarden, a MIDI sequencer, but does have two video editors, for example.

It may be worth considering the concept of an 'appliance'. AVL has been described as an appliance elsewhere. You install it, boot it, use it, just like hardware. In practice it's a bit more complicated than that :)

In your case the appliance approach would involve setting up a system that only does live mixing, nothing else, no web browser, no updates.

I've had good results with Arch Linux, but that is not is something that would be easy to do by Sunday. More of a longer term project.

To get state of the art Linux audio you're likely going to have to learn more Linux. :D
JamesPeters
Established Member
Posts: 188
Joined: Fri Jun 29, 2018 6:35 pm
Has thanked: 8 times
Been thanked: 15 times

Re: Live mixing with Linux - State of the art 2018

Post by JamesPeters »

I read what you said about the glitches that also happened in Windows, but are not reported as Xruns. This points to something other than Linux. I looked up what your audio device is, and your AD/DA. Perhaps the nature of the connection between those 2 units is the issue. It could have something to do with selecting an appropriate setting for proper word clock synchronization. Also the ADA8200 sample rate needs to be matched by the RME and Reaper (the ADA8200 works at 44.1 Khz or 48 Khz only). And whichever device is set as master or slave can be important. I guess also the RME might have a problem...you did buy a used one, so that's another factor. Anyway it makes sense to focus on how you connect your devices and whatever their settings are. The operating system doesn't seem to make much difference right now. After you ensure that the devices are connected properly and are using the proper settings, after that you can decide exactly how you want your operating system to be configured.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Live mixing with Linux - State of the art 2018

Post by khz »

Can you minimize the 50 plugins by (sub) groups?
You should keep in mind that routing alone causes latencies, the more plugins the more the computer has to calculate in real time. So my tip the less plugins the better.
xruns under Linux does not mean "pops, clicks and glitches"! With your soundcard this is to be excluded.
Debian stable would be quite easy to realize for a LAW. But you can transfer my tips viewtopic.php?p=99890#p99890 / GNU/Linux Debian installing >> Linux Audio Workstation LAW to any distribution.
You learn generally about LAW.
Test different settings and remember: less is more.
[X] Yes@Reaper_forum
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Live mixing with Linux - State of the art 2018

Post by lilith »

I wonder if it isn't just normal. I mean 32 samples is pretty small ... :?
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Live mixing with Linux - State of the art 2018

Post by merlyn »

Theoretically it would be possible to calculate what a given system is capable of.

There are two relevant numbers : the number of calcuations per second that the processor can do, and the number of calculations per second that the processor is being asked to do by the audio software. So any system, no matter how powerful and optimised, will hit a limit in the number of tracks, busses and plugins it can render in real time. It would be good for Nuri if he had some idea of what is a reasonable 'Audio Based Computational Demand' or ABCD :) to expect his system to cope with.

There is a thread involving defining 'what the processor is being asked to do' here.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Live mixing with Linux - State of the art 2018

Post by khz »

Nuri wrote:

Code: Select all

ALSA: error setting input device period count
I can't help you with that - other users maybe? - but an attempt would be to visit the IRC channel of ALSA and ask there. http://www.alsa-project.org/main/index.php/Irc
It may take some time until someone answers.
If you get a solution for your problem there please post it here and in the Reaper forum. Good luck!
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
JamesPeters
Established Member
Posts: 188
Joined: Fri Jun 29, 2018 6:35 pm
Has thanked: 8 times
Been thanked: 15 times

Re: Live mixing with Linux - State of the art 2018

Post by JamesPeters »

I just downloaded your RPP. Try the project with that "zero crossing maximizer" removed (both instances). They have very high PDC, for one. (22,000+ samples) Also running two of them in the project, and expecting latency compensation, might be a bit troublesome.

You also shouldn't need pre-comp on your kick. Disable that and ReaComp's PDC will return to 0.

Maybe consider not using lookahead on your gates, too, if possible. That will remove the PDC from the gates.

Avoiding PDC is something I do whenever possible, since it can cause some glitches when muting/unmuting tracks or disabling/enabling plugins. When PDC is very high, it can make things a bit weird sometimes too.

I couldn't properly test your project since I don't have the WAV files (the audio system is active but the plugins wouldn't be fully processing audio), it takes around 30% of my CPU and around 7% of my RT CPU. (My system is listed in my signature.) So maybe that can give you some indication of what to expect, when comparing our CPUs (at cpu.userbenchmark.com for instance).

(edit) I just read that you used a block size of 32 samples (and 2 blocks) for the audio device. Have you tried using a block size of at least 64 samples (and 2+ blocks)?
User avatar
Nuri
Established Member
Posts: 32
Joined: Mon Oct 29, 2018 10:27 am

Re: Live mixing with Linux - State of the art 2018

Post by Nuri »

:D
Thank you all for your interest in my project!

I think I will use a new strategy.
Beginning from zero!

At the moment, my problem is that I don't really know how to set the buffer size so that all members of the band say "it's ok to play with this setting, I can't notice latency".
So, what setting should be good? 32, 64 or even 128 samples buffer size?
According to the blog of CrocoDuck, a roundtrip latency of about 5-7ms should be good when it comes to in-ear monitoring.
The Kemper and Line 6 Helix produce about 1ms latency.
The Behringer ADA8200 produces 1ms latency.
Configuring Reaper at 48kHz, 128 samples, 24bit and 2 period brings 2.6/2.6ms. It's means 5,2ms (in and out).
The roundtrip latency is also about 1+1+5,2 = 7,2ms.
So... The biggest buffer size allowed should be 128 samples.

@ JamesPeter
You're advices are made of gold 8) , because:
1.
I can remember that I've connected the RME RayDAT on a big 16x PCIe slot of the mainboard (normally intended for graphic cards, is it?).
The board connector of the RayDAT is really small and would also fit into a PCIe 1x slot.
I will try that PCIe 1x slot. Good idea!
2.
The second ADA8200 (on ADAT ports 3 and 4) was not all the time synced. Sometimes the RME driver software in Win10 displayed a short "lock" status (shorter that 1 second) instead of the "sync" status. It was regularly switching from "sync" to "lock".
I will check that and maybe buy a new RayDAT. Or maybe was a TosLink cable not good?
The RayDAT was set as sync master.

Then, I will try to set up the software, probably from a vanilla Debian Stretch. I'm usually an Ubuntu user, so Debian is the distro I better know. I feel a bit lost on Fedora, Arch, Suse, etc. :roll:
Avoiding PDC is something I do whenever possible, since it can cause some glitches when muting/unmuting tracks or disabling/enabling plugins. When PDC is very high, it can make things a bit weird sometimes too.
I'm only for 2 days aware of the PDC shown in the Reaper's performance meter. I will try to avoid any PDC producing plugins.

@ merlyn
To get state of the art Linux audio you're likely going to have to learn more Linux. :D
True, sadly... A lot of time before anything works... :?

@ khz
So my tip the less plugins the better.
I will try with the same project and removing all plugins to see what happens.
Can you minimize the 50 plugins by (sub) groups?
Maybe.. But the Reaper project I set up is something realistic, tuned for our real needs, including the routing.
If you get a solution for your problem there please post it here and in the Reaper forum. Good luck!
Maybe in the coming weeks if the system (Win10 or Linux) doesn't become better.



@ lilith
I wonder if it isn't just normal. I mean 32 samples is pretty small ... :?
Some reported some success at these settings! And not only on linuxmusicians.com :wink:
Post Reply