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

Reply
 
Thread Tools Display Modes
Old 10-30-2020, 08:29 AM   #1
saresu.bass
Human being with feelings
 
saresu.bass's Avatar
 
Join Date: Feb 2011
Location: Japan
Posts: 568
Default [reducing latency to as minimum as possible?] Help please

Hi folks, I'd like to ask for some help pls. This is my first time trying Reaper in Linux and I'm pretty newbie.

I'm running the latest linux-lowlatency kernel. I got an old Guitar Rig Session I/O interface and an old core duo laptop running Linux Mint 19.3 Xfce.

I'm opening Reaper directly from its executable file from the folder reaper_linux_i686.

Everything looks neat but, the latency is just huge... Is there a way to reduce latency to the minimum possible?

Only way I can get audio/monitoring in reaper is through Pulse audio.


from inxi:


System:
Host: White Kernel: 5.4.0-52-lowlatency i686 bits: 32 compiler: gcc
v: 7.5.0 Desktop: Xfce 4.14.1 Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Machine:
Type: Laptop System: FUJITSU product: FMVMGC70P v: N/A serial: <filter>
Mobo: FUJITSU model: FJNB1E6 serial: <filter> BIOS: FUJITSU // Phoenix
v: Version 1.31 date: 09/09/2009
Battery:
ID-1: CMB1 charge: 43.1 Wh condition: 43.1/62.6 Wh (69%)
model: Fujitsu CP345706-02 status: Full
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M510 charge: 55%
status: Discharging
CPU:
Topology: Dual Core model: Intel Core2 Duo P8400 bits: 64 type: MCP
arch: Penryn rev: 6 L2 cache: 3072 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 9044
Speed: 2261 MHz min/max: N/A Core speeds (MHz): 1: 2261 2: 2261
Graphics:
Device-1: Intel Mobile 4 Series Integrated Graphics
vendor: Fujitsu Limited. driver: i915 v: kernel bus ID: 00:02.0
Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa
resolution: 1280x800~60Hz
OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express (CTG)
v: 2.1 Mesa 20.0.8 direct render: Yes
Audio:
Device-1: Intel 82801I HD Audio vendor: Fujitsu Limited.
driver: snd_hda_intel v: kernel bus ID: 00:1b.0
Sound Server: ALSA v: k5.4.0-52-lowlatency
Network:
Device-1: Marvell 88E8055 PCI-E Gigabit Ethernet vendor: Fujitsu Limited.
driver: sky2 v: 1.30 port: 2000 bus ID: 08:00.0
IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
Local Storage: total: 111.79 GiB used: 18.56 GiB (16.6%)
ID-1: /dev/sda vendor: Toshiba model: MK1246GSX size: 111.79 GiB
Partition:
ID-1: / size: 109.53 GiB used: 18.56 GiB (16.9%) fs: ext4 dev: /dev/sda1
Sensors:
System Temperatures: cpu: 53.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 179 Uptime: 15m Memory: 3.81 GiB used: 1.23 GiB (32.2%)
Init: systemd runlevel: 5 Compilers: gcc: 7.5.0 Shell: bash v: 4.4.20
inxi: 3.0.32

Thank you
saresu.bass is offline   Reply With Quote
Old 10-30-2020, 08:45 AM   #2
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,097
Default

Check the posts from Jack Winter in this thread.

https://forum.cockos.com/showthread.php?t=210218

He helped me a couple years ago to get the latency on my system as low as I was able to achieve in Windows. I quit using REAPER in Windows completely after that and haven't looked back.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 10-30-2020, 02:15 PM   #3
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
Default

You won't get very low latency with Pulse Audio. You want to use ALSA in Reaper. If the device can't use ALSA for some reason (but can work in Pulse Audio), that's odd. Pulse Audio "sits on top of" ALSA. So I'd expect you can use the audio device with ALSA in Reaper.

If ALSA is giving you problems but Pulse isn't, it might be that the USB port (that your audio device is using) is going into autosuspend. Since it's a laptop, that's what I'd assume anyway (especially since it happens to most of my USB ports on my desktop). You want to disable that so that the audio device won't try to "go to sleep" which can cause problems in general, and not just for low latency audio. Some audio devices are ok with that for Pulse (as long as you don't use ALSA itself), so I suspect this might be the case with your audio device. I use "TLP" (and edit tlp.conf) to change that setting, and some others (although those other settings aren't as important), for high performance use of the PC. The other important setting: the CPU frequency governor set to "performance", so it doesn't throttle down. Doing these changes will make the laptop consume more power, but that's par for the course when it comes to using a DAW with low latency performance. (You'd be doing the same thing in Windows by switching to a "high performance" power profile in the control panel, but Linux distros have no such "power profile" settings in a "control panel".) TLP should be available in the main repo. Then you have to find tlp.conf and edit it with sudo.

It seems you already set your CPU frequency governor to "performance", based on that info dump. So I guess you found another way. There are usually multiple ways of accomplishing something like this in Linux.

Besides doing that and using a low latency kernel, that's about all I need to have a system that works very well for low latency audio performance and even at high CPU use with lots of plugins. I do basically nothing else, none of the other things mentioned on any site that explains how to get better performance for audio in Linux. I might have to do other changes if I wanted to run Jack and some standalone synths (not plugins) and run them all together. But for Reaper itself (and plugins that run within it), very little is necessary to make it run great in Linux.

Unrelated: I'm a bit confused as to why you'd install 32-bit Mint and 32-bit Reaper if the processor can handle 64 bit processing.

Last edited by JamesPeters; 10-30-2020 at 02:22 PM.
JamesPeters is offline   Reply With Quote
Old 11-01-2020, 08:00 AM   #4
saresu.bass
Human being with feelings
 
saresu.bass's Avatar
 
Join Date: Feb 2011
Location: Japan
Posts: 568
Default

Quote:
Originally Posted by Glennbo View Post
Check the posts from Jack Winter in this thread.

https://forum.cockos.com/showthread.php?t=210218

He helped me a couple years ago to get the latency on my system as low as I was able to achieve in Windows. I quit using REAPER in Windows completely after that and haven't looked back.
Hi there!

Yes, I've been reading your post already prior to post here. I'm not sure that applies to my case, also, I dont quite know how to configure things using the terminal.
saresu.bass is offline   Reply With Quote
Old 11-01-2020, 08:23 AM   #5
saresu.bass
Human being with feelings
 
saresu.bass's Avatar
 
Join Date: Feb 2011
Location: Japan
Posts: 568
Default

Thank you for your long reply my friend!

Quote:
Originally Posted by JamesPeters View Post
You won't get very low latency with Pulse Audio. You want to use ALSA in Reaper. If the device can't use ALSA for some reason (but can work in Pulse Audio), that's odd. Pulse Audio "sits on top of" ALSA. So I'd expect you can use the audio device with ALSA in Reaper.
Yes, thats what I thought, it's odd.
I select the INPUT and OUTPUT DEVICE drop down menu (as in my case: "hw:SessionIO ; snd-usb-caiaq - Session I/O) but then when I hit play it shows the "error opening devices" message: (ALSA: error setting input device format bits)



Quote:
Originally Posted by JamesPeters View Post
If ALSA is giving you problems but Pulse isn't, it might be that the USB port (that your audio device is using) is going into autosuspend. Since it's a laptop, that's what I'd assume anyway (especially since it happens to most of my USB ports on my desktop). You want to disable that so that the audio device won't try to "go to sleep" which can cause problems in general, and not just for low latency audio. Some audio devices are ok with that for Pulse (as long as you don't use ALSA itself), so I suspect this might be the case with your audio device.
How do I disable autosuspend?

Quote:
Originally Posted by JamesPeters View Post
I use "TLP" (and edit tlp.conf) to change that setting, and some others (although those other settings aren't as important), for high performance use of the PC.
I'm sorry, I dont know what you're saying here and/or how to do that as well. What's TLP? and how do you change the setting?


Quote:
Originally Posted by JamesPeters View Post
The other important setting: the CPU frequency governor set to "performance", so it doesn't throttle down. Doing these changes will make the laptop consume more power, but that's par for the course when it comes to using a DAW with low latency performance. (You'd be doing the same thing in Windows by switching to a "high performance" power profile in the control panel, but Linux distros have no such "power profile" settings in a "control panel".) TLP should be available in the main repo. Then you have to find tlp.conf and edit it with sudo.

It seems you already set your CPU frequency governor to "performance", based on that info dump. So I guess you found another way. There are usually multiple ways of accomplishing something like this in Linux.
Ow, that's great, at least one less headache.

Quote:
Originally Posted by JamesPeters View Post
Besides doing that and using a low latency kernel, that's about all I need to have a system that works very well for low latency audio performance and even at high CPU use with lots of plugins. I do basically nothing else, none of the other things mentioned on any site that explains how to get better performance for audio in Linux. I might have to do other changes if I wanted to run Jack and some standalone synths (not plugins) and run them all together. But for Reaper itself (and plugins that run within it), very little is necessary to make it run great in Linux.
I do all the demanding heavy mixing work in Reaper with my main machine running Win10.

I'd just love to have this old laptop running Reaper only to record audio and possibly some light synth here and there when I'm outside.

Quote:
Originally Posted by JamesPeters View Post
Unrelated: I'm a bit confused as to why you'd install 32-bit Mint and 32-bit Reaper if the processor can handle 64 bit processing.
Cuz this laptop's maximum RAM is 4Gb. Don't we only go 64 bit when the machine has more than 4Gb? Did I get it wrong??
saresu.bass is offline   Reply With Quote
Old 11-01-2020, 08:50 AM   #6
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,097
Default

Quote:
Originally Posted by saresu.bass View Post
I select the INPUT and OUTPUT DEVICE drop down menu (as in my case: "hw:SessionIO ; snd-usb-caiaq - Session I/O) but then when I hit play it shows the "error opening devices" message: (ALSA: error setting input device format bits)
The error sounds like maybe you have selected 32 bit for your audio device and maybe it can only do 24 bit.

Another thing, be sure that Pulse audio isn't latching onto your USB audio. You can do that by going into the Pulse mixer, and on the configuration tab, un-select your USB audio, leaving only the onboard audio from the laptop for system sounds or playing U-Toob videos.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 11-01-2020, 12:13 PM   #7
JamesPeters
Human being with feelings
 
Join Date: Aug 2011
Location: Near a big lake
Posts: 3,943
Default

Quote:
Originally Posted by saresu.bass View Post
...when I hit play it shows the "error opening devices" message: (ALSA: error setting input device format bits)
Perhaps you selected 32 bits as the bit depth, but the device isn't capable of 32 bits? (As an example.) Check that setting on the same Reaper audio preferences page.

Quote:
Originally Posted by saresu.bass View Post
How do I disable autosuspend?
I do it by using TLP, editing tlp.conf at the appropriate line (USB_AUTOSUSPEND=0).

Quote:
Originally Posted by saresu.bass View Post
I'm sorry, I dont know what you're saying here and/or how to do that as well. What's TLP? and how do you change the setting?
You could just search for TLP. It's installed by default in Manjaro, and it's in the Ubuntu repo as well (from what I read anyway), so it should be available to Mint. You can add it the way you add other packages in your distro (command line apt command, Synaptic, etc.)

When you find tlp.conf and open it, there are instructions for each setting. One thing you might not be aware of though: every line starting with "#" is a "comment" line, which is ignored by the program because it's just considered plain descriptive text for the end user. A lot of these features will be "commented out" by default, so to enable them you'll have to remove the "#" at the start of the particular line you want to enable. (Then change whatever parameter you need, for instance "something=0" becomes "something=1", or "another_thing=254" to "another_thing=255".) It's worth looking through the whole file to get an idea of all the things you can adjust, but you'll probably only end up changing those couple things I mentioned. I disable power management for my drives, PCIe, onboard audio device etc. since it's a desktop and I want everything available all the time at maximum performance if I need it. You'd probably only be concerned about USB autosuspend and CPU performance governor.

So I guess this is the first thing you want to change:
TLP_ENABLE=1

Then this:
USB_AUTOSUSPEND=0

And these:
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=performance

Of course if you only plan to use the laptop for the DAW when the AC power is connected, leave the bottom line there as "CPU_SCALING_GOVERNOR_ON_BAT=powersave".

Quote:
Originally Posted by saresu.bass View Post
Cuz this laptop's maximum RAM is 4Gb. Don't we only go 64 bit when the machine has more than 4Gb? Did I get it wrong??
One reason for using 64-bit systems is so that you can access more than 4 GB of RAM, but there are other reasons. Nowadays things are written for 64-bit by default, and 32-bit is being phased out. That's the main reason I'd use 64-bit OS and programs even with 4 GB of RAM. Unless all the programs you could conceivably want to use are 32-bit, I'd just use 64-bit. This includes things such as Linux VST plugins that are being released only as 64-bit. Your processor is a 64-bit processor, and its performance won't suffer running 64-bit OS and software. It may run better, actually.

As for what Glen said in the last post: depending on how you use the computer, I might disagree. I use my USB audio device for everything and it poses no problem. It's true that I won't be able to get audio from my USB device from my browser (Youtube etc.) when I'm using Reaper with ALSA, but I don't mind that. When Reaper is loaded, I don't expect to hear audio from other sources.

If you do plan to use Reaper with ALSA for the USB audio device, and also play audio from other sources, then I do agree with Glen. Letting the "multimedia" sources play from your other device is the best way to do things. Every other method is a compromise or might cause some configuration headaches (routing everything through Jack isn't bad though, but I can't help recommending just using Reaper with ALSA and keeping multimedia stuff separate).
JamesPeters is offline   Reply With Quote
Old 12-23-2020, 03:38 AM   #8
saresu.bass
Human being with feelings
 
saresu.bass's Avatar
 
Join Date: Feb 2011
Location: Japan
Posts: 568
Default

Quote:
Originally Posted by Glennbo View Post
The error sounds like maybe you have selected 32 bit for your audio device and maybe it can only do 24 bit.

Another thing, be sure that Pulse audio isn't latching onto your USB audio. You can do that by going into the Pulse mixer, and on the configuration tab, un-select your USB audio, leaving only the onboard audio from the laptop for system sounds or playing U-Toob videos.
Quote:
Originally Posted by JamesPeters View Post
Perhaps you selected 32 bits as the bit depth, but the device isn't capable of 32 bits? (As an example.) Check that setting on the same Reaper audio preferences page.



I do it by using TLP, editing tlp.conf at the appropriate line (USB_AUTOSUSPEND=0).



You could just search for TLP. It's installed by default in Manjaro, and it's in the Ubuntu repo as well (from what I read anyway), so it should be available to Mint. You can add it the way you add other packages in your distro (command line apt command, Synaptic, etc.)

When you find tlp.conf and open it, there are instructions for each setting. One thing you might not be aware of though: every line starting with "#" is a "comment" line, which is ignored by the program because it's just considered plain descriptive text for the end user. A lot of these features will be "commented out" by default, so to enable them you'll have to remove the "#" at the start of the particular line you want to enable. (Then change whatever parameter you need, for instance "something=0" becomes "something=1", or "another_thing=254" to "another_thing=255".) It's worth looking through the whole file to get an idea of all the things you can adjust, but you'll probably only end up changing those couple things I mentioned. I disable power management for my drives, PCIe, onboard audio device etc. since it's a desktop and I want everything available all the time at maximum performance if I need it. You'd probably only be concerned about USB autosuspend and CPU performance governor.

So I guess this is the first thing you want to change:
TLP_ENABLE=1

Then this:
USB_AUTOSUSPEND=0

And these:
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=performance

Of course if you only plan to use the laptop for the DAW when the AC power is connected, leave the bottom line there as "CPU_SCALING_GOVERNOR_ON_BAT=powersave".



One reason for using 64-bit systems is so that you can access more than 4 GB of RAM, but there are other reasons. Nowadays things are written for 64-bit by default, and 32-bit is being phased out. That's the main reason I'd use 64-bit OS and programs even with 4 GB of RAM. Unless all the programs you could conceivably want to use are 32-bit, I'd just use 64-bit. This includes things such as Linux VST plugins that are being released only as 64-bit. Your processor is a 64-bit processor, and its performance won't suffer running 64-bit OS and software. It may run better, actually.

As for what Glen said in the last post: depending on how you use the computer, I might disagree. I use my USB audio device for everything and it poses no problem. It's true that I won't be able to get audio from my USB device from my browser (Youtube etc.) when I'm using Reaper with ALSA, but I don't mind that. When Reaper is loaded, I don't expect to hear audio from other sources.

If you do plan to use Reaper with ALSA for the USB audio device, and also play audio from other sources, then I do agree with Glen. Letting the "multimedia" sources play from your other device is the best way to do things. Every other method is a compromise or might cause some configuration headaches (routing everything through Jack isn't bad though, but I can't help recommending just using Reaper with ALSA and keeping multimedia stuff separate).
Very very late response, I'm sorry friends. Haven't been able to take care of this.
Couldnt make it work no matter what. I realised that setting this up in Linux is beyond my capacity so I'll call it quits.

Thank you very much for trying to help!

Stay safe there. Peace y'all.
saresu.bass 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 12:35 AM.


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