How to run Reaper in Wine on Linux

From CockosWiki

Revision as of 03:50, 12 June 2011 by JackWinter (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

There is no native linux port of Reaper so far, but luckily it can be made to run quite well under Wine in Linux, as can the vast majority of VST and VSTI plugins (excluding some with copy protection). The major drawbacks being higher cpu usage, higher latency, and a slightly sluggish gui. The sad truth is that it runs much better in windows, but on a modern multicore system it is more than workable on Linux. This page attempts to explain what extra software is needed and how to tweak Reaper, Wine and Linux for best results. This is intended as general information and does not cover distribution specific issues. Use the forums or irc channels pertaining to your chosen distribution for such information.

Needed software

JACK

JACK is a keystone component for low latency audio on linux. From a windows perspective it can be viewed as a combination of ASIO and rewire, in as much as it allows the apps to connect to the sound card for low latency operation, and that it can connect different programs together and synchronize their transport. It also has support for distributing audio processing over a network (lan/wan). JACK exists in two implementations called JACK1 and JACK2, they are parallel implementations of the same API and are ABI compatible. JACK2 was intended to replace JACK1 thus the naming, but for various reasons this has not happened, and JACK1 is still the reference implementation. Be aware that JACK2 in it's default configuration (asynchronous mode) doubles the output latency. See: http://jackaudio.org/ and JACK faq/ for more details. Typically this will be available in your distro as a binary package and you just need to install it with your package manager.

You might also want to install QJackCtl, a gui to control the JACK server. Somewhat analogous to the windows ASIO control panel. See: http://qjackctl.sourceforge.net/. It is also typically installed through your package manager.

Wine

Wine let's you run Windows software on Linux (and other operating systems). It's not really an emulator in the sense of VirtualBox or VMWare, rather it's a collection of runtime libraries and other support software, setting up a windows environment and mapping windows functionality to the native equivalents on the host operating system. It has the potential to be just as fast and in some cases even faster than native windows. See: http://www.winehq.org/ for more details. It is also typically installed from the package manager of your distribution, but if you want to add the wine-rt functionality you might have to build it yourself.

WineASIO

WineASIO is an ASIO driver for wine that connects to the JACK server, effectively turning your ASIO aware windows program into a JACK client. So far it's only available for 32bit Wine, thus limiting you to running the 32bit version of Reaper in wine. Unfortunately you might end up having to build this yourself, as it needs a header file (asio.h) from Steinberg's ASIO SDK, which Steinberg prohibits 3:rd parties from distributing. This is also the reason that there is no 64bit WineASIO yet, as the header needs to be rewritten due to differences in the meaning of data sizes between Windows and Linux on 64bit systems. See: http://sourceforge.net/projects/wineasio/ and for the ASIO SDK: http://www.steinberg.net/en/company/developer.html, you will have to create an account, login and download the SDK to get the asio.h file needed. Some distributions might have a binary package for WineASIO saving you this step. If so just install using the package manager.

Wine-rt

The Wine-RT patch allows programs that use Windows' concept of thread priority to gain similar functionality under Linux. It maps windows priority levels to linux scheduling policies. You will most likely need this if you want to run Reaper at low latency under Wine. Unfortunately this has not been included in the standard Wine source code and it's unlikely that it will be included any time soon thus this is one component you might have to build yourself. If your distro has already patched it's wine, then you can install it with the usual package manager. See: http://dl.dropbox.com/u/879835/wine-rt-101107.patch

Reaper preferences

  • Preferences->Buffering->Use native events for syncronizing: Due to the way wine works there is a lot of overhead in using IPC (Inter Process Communication). Reaper uses one such mechanism to syncronise it's threads, namely Native Events. Best results can most likely be achieved by unchecking Preferences->Buffering->Use native events for syncronizing. This will have the drawback (on SMP systems) of the cpus polling in loops and thus cause extra cpu usage, but the trade off is lower latency and less risk of xruns (audio dropouts) in the ASIO callback thread. One way of dealing with the high cpu usage is to manually specify a lower amount of cpus, like 1 or 2 in Preferences->Buffering until you really need more cpu.
  • Preferences->Appearances->UI updates: Setting this to Lazy always, will speed up the zooming and scrolling somewhat and comes with no significant drawback.

Linux specifics

Supported soundcards

Using MIDI

Video drivers

Kernel patches

  • -rt - Realtime patch
  • -bfs or -ck - Brain Fuck Scheduler patch
  • -bfq - Budget Fair Queueing patch

Linux utilities

  • schedtool
  • chrt
  • ionice

A list of working VST and VSTIs

  • In general most any VST/VSTI without copy protection works well.
Personal tools