Prev Previous Post   Next Post Next
Old 08-23-2018, 09:29 AM   #1
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,785
Default REAPER for Linux Documentation

REAPER for Linux builds are considered experimental/unsupported versions - use at your own risk!

Supports
  • Hardware: i686, x86_64 & ARMv7 (Raspberry Pi 3).
  • Audio: ALSA, JACK & Pulseaudio, FFADO support by JACK.
  • MIDI: RAW ALSA and JACK.
  • Plugins: The builtin plugins & Linux VST 2/3 (DSSI, LADSPA & LV2 are not yet supported).

Download from reaper.fm

Dependencies
  • libstdc++.so.5
  • gtk+ v3 or optionally v2 (see note below)
  • desktop-file-utils
  • xdg-utils
  • alsa
  • jack (optional)
  • pulseaudio (optional)
  • vlc (optional)
  • ffmpeg (optional)

Note: REAPER depends on gtk+ v3 by default, but gtk+ v2 can be targeted by compiling libSwell, see instructions.

Installation

The REAPER tarball contains the install-reaper.sh script to install either into the user's home, or system wide. It can add desktop support for either install type, and creates an uninstall script to facilitate removal.

It is also possible to run REAPER directly from the extracted files, a so called portable install. Create an empty reaper.ini file or copy the already existing ~/.config/REAPER/reaper.ini to the directory containing the reaper files.

Archlinux has an AUR buildscript that downloads REAPER and creates a package.

REAPER's Configuration Files

By default REAPER uses ~/.config/REAPER for its configuration files. To support portable installs it first searches for the config files in the directory where the executable is located, and then ~/.config/REAPER.

User Extensions

Either download a binary runtime lib, or build it from source. Install the *.so file into ~/.config/REAPER/UserPlugins or in the case of a portable install into REAPER/UserPlugins.

SWELL Themes

SWELL is a toolkit implementing a minimal but reasonable subset of the win32 API, which allows targeting Linux, OS/X and Windows from a single codebase. Since SWELL doesn't use OS system calls on Linux to display controls like the menubar and dialog boxes, it is possible to theme their appearance.

The theme definition is contained in a file called libSwell.colotheme. To override the default definition, copy libSwell.colortheme to ~/.config/REAPER/libSwell-user.colortheme, and if you use a portable install, to REAPER/libSwell-user.colortheme.

Using Unsupported Plugins

Plugins in formats not supported by REAPER might work with third party solutions.

Linux System Configuration

None is required for REAPER to run, but there are a few consideration for achieving low latency audio without dropouts.

Linux low latency audio is based on POSIX real time threads. A thread of a higher priority will preempt threads of lower priority and will run until it is finished. The idea is to ensure that nothing else preempts the audio processing, by setting the priority of the threads in the following order (from highest to lowest priority).
  1. The soundcard interrupt.
  2. REAPER's audio callback thread.
  3. Hardware interrupts.
  4. REAPER's audio worker threads.
  5. The rest of the threads running on the system.

The Kernel

The kernel can be built to schedule threads in different ways. The relevant ones for low latency audio are capable of preempting a running thread to run another one. If the kernel isn't configured for this, REAPER can still run but will need bigger buffers. The suitable kernels are commonly referred to as lowlatency and realtime.

A lowlatency kernel can preempt threads. The realtime kernel in addition makes the kernel itself more preemptable, so it can achieve a lower kernel scheduling latency. This is the time it takes the kernel to start running a thread, a lower scheduling latency means less possible audio dropouts at low latency settings and high system load. Given a deadline of 1.45ms, if it takes the kernel 2ms to schedule the audio processing threads, there is a dropout.

The only relevant difference is that the realtime kernel can achieve a lower scheduling latency than the lowlatency kernel.

To see what type of kernel is running, use the command uname -a. If the output contains PREEMPT RT it is realtime, if PREEMPT it is lowlatency, and if none of the above it is a kernel that isn't suited for lowlatency audio.

There can be many causes for a high scheduling latency, Some worth mentioning (in no particular order) are: a misconfigured kernel, badly made hardware/drivers, SMIs, NMIs, faulty hardware timers, CPU power management, etc.

User Privileges

As Linux is a multiuser OS there are 2 relevant privileges normally denied the user, as a malicious user could use them to attack the system.
  • rtprio - allow the user to run realtime threads.
  • memlock - allow the user to lock memory in RAM, preventing it from being discarded or swapped out.

To be able to schedule realtime threads, the user, or a group the user belongs to needs to be given rtprio privileges at login. A recommended max value is 98. Do not set it to 99, as there are kernel house keeping threads using it.

Having code or data being discarded or swapped out could result in dropouts as REAPER would have have to wait for it to be reloaded. Enabling memlock avoids this possibility, but could result in the system hanging if the system runs out of free RAM. It is possible to specify a specific value, ensuring that applications can't starve the system, but as this is system specific a good default is unlimited.

Some distributions might do this by installing a package, another by manually editing a file, and some might have it already setup. Consult your distro support or the REAPER forum for more information.

To check what capabilities the logged in user has, run ulimit -a.

Thread priorities

The realtime kernel exports the hardware interrupt handlers to run as threads in user space, as does the lowlatency kernel when configured to or when booted with the threadirqs boot flag. This allows the user to manipulate the priority of the interrupt handlers.

By default the hardware interrupt handlers will run at priority 50, with some kernel house keeping threads at 99 and software timers at 1.

A recommended setting for the thread handling the soundcard or the usb hub interrupt is 95.

The rtirq script can be used to set the soundcard's interrupt priority.

Low Latency Checklist
  1. Install a lowlatency or realtime kernel if not already installed.
  2. The lowlatency kernel might need the threadirqs boot flag.
  3. Give the user rtprio and memlock privileges.
  4. Set the priority of soundcard's interrupt handler to 95.

Useful Links

Todo (possibly)
  • Audio prefs.
  • Recommended REAPER prefs.
  • Performance page options (right click).
  • Alt-click is intercepted by the WM, change to Logo-click.
  • HiDPI themes.
  • Use Windows VST(i).
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)

Last edited by Jack Winter; 01-06-2019 at 03:18 PM.
Jack Winter is offline  
 

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:39 PM.


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