I do all of my production work on Arch-based Linux systems these days. This is generally a pleasent experience since Reaper started supporting native Linux builds and yabridgectl made bridging Windows VST Plugins quite breezy and effective. Once setup correctly, this offers a performance experience and workflow that I think is quite close to native.
One advice that I kept hearing again and again though was to install wine (the Wine program that lets you use Windows software on Linux) using wine-tkg, a customized build system for installing. The TKG system makes it easy to add patches during installation that increases performance and was, as far as I can tell, made for gamers who wanted to squeeze the best possible performance out of Linux systems (thanks, gamers!). The main patch we are interestd in here is the one that adds support for fsync
which uses some kernel trickery to reduce cpu usage. The increased performance is relevant for audio work as well (see this post for performance results using yabridge on Ubuntu).
I put off installing wine-tkg for a long time because I found the installation process a bit mysterious and so I gathered these notes that hopefully will help others in the process.
Note: It is assumed that you are on Manjaro or Arch Linux.
The installation process consists of downloading a PKGBUILD, which is a small script that is used in Arch Linux packages to install software (this is a big part of the magic of the Arch User Repository). With a(ny) PKGBUILD file downloaded, you are able to run the makepkg
command to build and install the software described in the file on your system using pacman
. An added benefit of this is that this allows your system to keep track of the installation.
We will be using Frogging-Family’s PKGBUILD for this installation.
Enable multilib
Before continuing, you need to enable multilib if you haven’t already.
Installation
First, download the source code and move into it’s directory:
git clone https://github.com/Frogging-Family/wine-tkg-git
cd wine-tkg-git/wine-tkg-git
The next step is to configure the installation. The defaults should be good, but still, if you want to customize your installation, it is done by editing customization.cfg
.
This file allows you to choose a specific wine version.
For example, to use wine version 6.4 (which at the time of writing this is one of the more stable ones):
_staging_version="v6.4"
The most important setting here probably is the one that activates fsync
.
Make sure it looks like this:
_use_fsync="true"
Once that’s done, and while still in the directory of the PKGBUILD, you may run the following command to install the software using pacman:
makepkg -si
After the installation
To allow your system to make use of the fsync feature, you need to modify or add an environment variable to your system. Robbert from yabridge has summarized this quite well, but otherwise this is what you need to do:
Add export WINEFSYNC=1
to $HOME/.zprofile
(if using zsh as shell (note, it won’t work if you put it in .zshrc
))
Then reboot your system and run this command to verify that it worked:
env -i HOME="$HOME" $SHELL -l -c 'echo $WINEFSYNC'
This should print 1
. If it didn’t, something is wrong.