02-02-2022, 01:08 AM | #1 |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
Managing latency - Ubuntu 20.4
Hello
I am really trying to understand how to trouble shoot record / return latency issues. The set up I have is as follows: HP Elitebook 1040 16Gigs RAM, 512GB SSD Behringer UMC204HD Ubuntu 20.4 When I open Reaper, I get at least a 1 second delay from the time I microphone record time to the moment i hear return. This means that the recorded elements are late in the timeline etc. (It also blocks the audio from other apps that are open like firefox) I have tried the latency pref in automatic and that does not correct it (probably because the sound card is using the core audio and therefore is not recognised). I have pushed and pulled the manual latency prefs and don't get any changes at all. I have tried Pulse Audio, that makes things worse and am currently using Alsa. There is a great mystery to me as the management of sample rates in Linux. It seems rather complicated to me and I don't know if this has an impact. Yet when I use Audacity with Alsa in with the same config. I have no latency at all and I just use the Audacity default prefs. I don't pretend to understand Linux audio, so any Reaper troubleshooting advice would be most welcome. Thank you |
02-02-2022, 02:44 AM | #2 |
Human being with feelings
Join Date: Mar 2007
Location: London UK
Posts: 3,378
|
Have you set up a real time Kernel, done the obvious set up things with power management?
probably best to use ALSA as the audio driver and set your buffer to 64 samples. You should have no issues then. M
__________________
https://www.marcuscliffe.com/ |
02-02-2022, 09:58 AM | #3 |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
Thanks for replying. What do you mean for a "real time kernel"?
Thanks |
02-02-2022, 10:17 AM | #4 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Another thing that can make a BIG difference is to edit the file, /etc/security/limits.conf and add these two lines, replacing USER with your user name. @USER - rtprio 98 @USER - memlock unlimited After adding those two lines you will need to either log out and back in or reboot for the changes to take effect. What those lines do is give you permissions to run apps at 98% real time priority, and unlimited access to memory. |
|
02-02-2022, 09:06 PM | #5 |
Human being with feelings
Join Date: Nov 2011
Posts: 971
|
In addition to what has been mentioned above, The latest kernel has usb latency improvements that you won’t get from Ubuntu 20.04. You may have better results with Manjaro.
|
02-03-2022, 12:25 AM | #6 |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
Thank you all for your suggestions.
I presume that is the kernel low latency install: sudo apt install linux-lowlatency-hwe-20.04 -y |
02-03-2022, 12:28 AM | #7 | |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
Quote:
Many, many thanks for all your suggestions. |
|
02-03-2022, 07:58 AM | #8 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
max locked memory (kbytes, -l) unlimited real-time priority (-r) 98 |
|
02-03-2022, 02:29 PM | #9 |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
unlimit - a
confirms what you wrote. This info should be shared. It has definitely helped my performance. Many thanks |
02-03-2022, 03:14 PM | #10 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Glad your system is starting to perform. That info has been posted in multiple threads, but finding it might take a minute.
|
02-07-2022, 11:08 AM | #11 |
Human being with feelings
Join Date: Feb 2022
Location: Netherlands
Posts: 2
|
Tried the Ubuntu Studio distribution already?
It is geared towards multimedia production and has a low-latency kernel by default. |
02-07-2022, 03:22 PM | #12 |
Human being with feelings
Join Date: Oct 2021
Posts: 14
|
|
02-07-2022, 05:03 PM | #13 | |
Human being with feelings
Join Date: Jan 2022
Location: Kalamazoo, MI
Posts: 285
|
UbuntuStudio....
Quote:
Just last night, I installed Ubuntu 21.10 on a spare partition, used the Ubuntu Studio Installer to install the lowlatency kernel, and ran some tests. I got my input latency down to 1.3 ms from 5. Very nice. Then I rebooted into my primary partition and installed the faster kernel with the same results. https://ubuntustudio.org/ubuntu-studio-installer/
__________________
Audio Post Engineer: JennAudio.com Adjunct Faculty: Columbia College Chicago - Retired! |
|
02-08-2022, 02:44 AM | #14 |
Human being with feelings
Join Date: Mar 2007
Location: London UK
Posts: 3,378
|
what would people say are the pro's and cons of Ubuntu Studio over Manjaro?
From my brief foray into Linux on manjarao(arch) most of the plugins/programs that have a native linix version seem to be debian packages so that would give a newcomer like me an easier tine installing things. M
__________________
https://www.marcuscliffe.com/ |
02-08-2022, 06:37 AM | #15 | |
Human being with feelings
Join Date: Jun 2021
Posts: 1,093
|
Quote:
|
|
02-08-2022, 07:58 AM | #16 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
IMHO Xubuntu is the 'Buntu flavor for audio if you aren't doing Manjaro. Xubuntu is Ubuntu without the flashy CPU consuming desktop. It uses the very light but still configurable XFCE desktop.
I used Xubuntu for almost three years and switched to Manjaro because I built a new Ryzen 3700X with PCIe 4.0 sockets for NVMe M.2 drives, and Manjaro is more updated than any of the 'Buntu flavors. I was concerned that the kernel in Xubuntu might not know how to deal with my new hardware properly, so I switched. With Xubuntu I only needed to install the low latency kernel, and set the two lines in limits.conf for realtime priority and unlimited memory. The only difference with Manjaro is it installs stock with the low latency kernel, but limits.conf still needs a tweak. |
02-08-2022, 09:14 AM | #17 |
Human being with feelings
Join Date: Feb 2017
Posts: 4,823
|
Sorry for butting in.
I too have been experimenting with Linux recently, with the aim of ditching windows for audio production. i've been using ubuntu studio (20.0.4?) and finding it very confusing to get audio configured & working properly. Do you think manjaro will be any easier for me? I don't really understand ALSA / Jack etc. and i use a variety of PCI & firewire interfaces which i have difficulties trying to select / enable in Reaper. |
02-08-2022, 09:30 AM | #18 | ||
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Quote:
When you select ALSA in REAPER, you also need to select input and output devices, by clicking the down arrows on the selection lists of the audio configuration panel. |
||
02-08-2022, 09:53 AM | #19 | |
Human being with feelings
Join Date: Feb 2017
Posts: 4,823
|
Quote:
I was having trouble distinguishing what's what in the input / output lists -just lots of non-descriptive names etc. but nothing i shouldn't be able to iron out. i am just fumbling around at the moment - i will make a decision soon about which distro / machine / interface combo to work with more seriously. Despite me getting very confused by the routing & mixing apps, initial tests seem to show that Echo & RME interfaces work OK. I'm sure i can optimise them & lower the latency when i work out what i'm doing. |
|
02-08-2022, 10:09 AM | #20 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
|
|
02-08-2022, 10:30 AM | #21 |
Human being with feelings
Join Date: Feb 2017
Posts: 4,823
|
Thanks, yeah i know that. I know my way around Windows & audio stuff pretty well through many years of hands-on experience but my general computer skills aren't very good.
I know i'll have some serious learning to do to get where i want to be on Linux, it's just that i'm very lazy and if there is a distro that is much "easier" than others i'd be interested. |
02-08-2022, 03:41 PM | #22 | |
Human being with feelings
Join Date: Nov 2011
Posts: 971
|
Quote:
AV Linux -- http://www.bandshed.net/avlinux/ AV Linux is more of an "appliance" installation. You use what it includes and don't worry about configurations or modifications. It's a great way to start learning what's available on Linux Ubuntu/Ubuntu Studio --Ubuntu Studio or Ubuntu with Ubuntu studio components--all components for Ubuntu Studio, including the low latency kernel can all be installed through your favorit regular Ubuntu flavor, so you can choose the Desktop Environment you prefer, and won't need the added software bloat of Ubuntu Studio if you don't want it. Arch Based Distro -- You can use what you want here, but Manjaro is probably the easiest. You do have to do some configuring, but you benefit from access to the Arch User Repository, which contains just about everything the Linux world has to offer. Last edited by audiojunkie; 02-08-2022 at 03:51 PM. |
|
02-08-2022, 06:26 PM | #23 |
Human being with feelings
Join Date: Feb 2017
Posts: 4,823
|
cheers. i'm downloading manjaro and i'll give that a spin at some stage to see how it compares to ubuntu.
To be honest i probably don't need much more than Reaper and a few plugins at the moment, it's all just about dipping my toe in rather than making a full-blown switch of OS. |
02-08-2022, 06:26 PM | #24 | |
Human being with feelings
Join Date: Mar 2017
Posts: 859
|
Quote:
Tread lightly! The previous suggestion is a straight arrow. In the long run, having all three of those at once, by way of external drives, will let you set up systems based on specific needs/desires that you might uncover. Take your time, it passes fast enough without our help! Make sure your toe can reach the record button! Cheers
__________________
Songs I've made with linux and Reaper, a qwerty forehead danger zone: https://www.youtube.com/watch?v=NtlO...RvGI8-_TqqZ7ij https://franklincheney.bandcamp.com/ |
|
11-07-2022, 03:32 PM | #25 |
Human being with feelings
Join Date: Feb 2018
Posts: 1
|
I also have a latency issue in reaper.
When I play Synth, I can hear the sound around 0,2 seconds after the key hit. I changed the driver in Reaper from Pulse to ALSA. But after that I could not hear anything. As a MIDI Input I chose my connected M-Audio Keyboard. Strange. Do you know what could create this problem? |
11-07-2022, 10:59 PM | #26 |
Human being with feelings
Join Date: Nov 2020
Location: Alps
Posts: 28
|
Try installing the midisport-firmware package if not already installed. It's not needed for all M-Audio models but it's worth a punt.
|
11-08-2022, 03:00 AM | #27 |
Human being with feelings
Join Date: Aug 2022
Posts: 717
|
I see many recommending Ubuntu Studio or Manjaro here, but I'd share my own experience. I've tried them all, and stuck with Fedora (Silverblue but regular Workstation works great, probably even better for audio).
The thing is, Fedora includes PipeWire by default which MASSIVELY improves low-latency audio and stability. Never had any real issues with it (except when putting my computer to sleep and waking it up, it sometimes requires a restart of PipeWire's service to avoid cracks, but that's it). I don't even use an RT (real-time) kernel, yet I get 3 to 6 ms latencies with no issues. Overall, for my use case, Fedora has been the best distro. If you are unwilling to try Fedora what I recommend is you install PipeWire for your system, and attest to the awesomeness. |
Thread Tools | |
Display Modes | |
|
|