Low-Latency Guitar Setup on CachyOS

πΈ Why This Setup?
As a guitar player, I wanted a Linux-based setup that lets me:
- Practice along with songs from YouTube, Spotify, or my local music library.
- Use Guitarix as a virtual amp/effects processor with real-time, low-latency performance.
- Record my sessions in Reaper (via JACK) while still hearing other audio sources.
- Avoid audio glitches or routing conflicts between my guitar software and everyday applications.
This guide explains how to configure PipeWire and JACK on CachyOS so you can play guitar through Guitarix while listening to backing tracks from your browser or music player.
ποΈ Overview: Audio Architecture
Audio Interface
β
βββ ALSA
β
βββ PipeWire
βββ JACK Compatibility Layer (libspa-jack)
β βββ virtual amp: Guitarix
β βββ DAW: Reaper
β
βββ Other Audio: Browser, Music Player
- ALSA: Direct hardware access for the Audio Interface.
- PipeWire: Handles general audio (browser, Spotify, system sounds).
- JACK (via
libspa-jack): Provides low-latency routing for Guitarix and Reaper. pw-jack: Bridges JACK applications to PipeWire, so both can run side by side.
π οΈ Setup Steps
ince I use CachyOS (an Arch Linux-based distribution), PipeWire is already pre-configured. However, some additional steps are required to ensure everything works smoothly for guitar practice and recording. If youβre using Arch Linux, see rhe arch linux documentation on pipewire for additional dependencies.
1. π¦ Install Required Packages
On CachyOS, PipeWire is pre-configured. Install PipeWire-JACK support, Guitarix, and Reaper:
sudo pacman -S pipewire-jack guitarix reaper
2. π Running Guitarix and Reaper via JACK
On CachyOS this step can be skipped, you typically donβt need to use pw-jack to start JACK applications, as PipeWire handles JACK compatibility out of the box. However, if you encounter issues (e.g., on Ubuntu or Fedora), you can use the pw-jack wrapper:
pw-jack guitarix
pw-jack reaper
Creating Desktop Shortcuts (Optional)
To launch Guitarix/Reaper with pw-jack from your application menu:
-
Locate the
.desktopfile:find /usr/share/applications ~/.local/share/applications -iname "*guitarix*.desktop" -
Copy it to your local applications directory:
cp /usr/share/applications/guitarix.desktop ~/.local/share/applications/guitarix-jack.desktop -
Edit the
Execline:Exec=pw-jack guitarix -
Update the desktop database:
update-desktop-database ~/.local/share/applications/
Tip: Repeat for Reaper (
reaper-jack.desktop).
3. π§ Configure Audio Routing
Audio routing issues can occur, especially when using Reaper or connecting new USB audio devices. Hereβs how to manage your connections:
Manual Routing with Helvum
Install Helvum, a graphical patchbay for PipeWire:
sudo pacman -S helvum
Start Helvum and connect:
- Your guitar input (Audio Interface) β Guitarix input.
- Guitarix output β Reaper input (for recording).
- Guitarix output β Audio Interface output (to hear your guitar).
Troubleshooting with Command Line
If you need to manually manage connections or disconnect routes, use these commands:
# List available inputs and outputs
pw-link -io
# Example output:
# alsa_input.usb-MOTU_M4_XXXXXX-00.analog-surround-40\:capture_RL
# gx_head_amp\:in_0
# gx_head_fx\:out_0
# REAPER\:in1
# Create a link (e.g., guitar input to Guitarix)
pw-link alsa_input.usb-MOTU_M4_XXXXXX-00.analog-surround-40\:capture_RL gx_head_amp\:in_0
# Delete a link
pw-link -d alsa_input.usb-MOTU_M4_XXXXXX-00.analog-surround-40\:capture_RL gx_head_amp\:in_0
Note: Replace
MOTU_M4_XXXXXXwith your actual MOTU M4 device ID (check withpw-link -o -i).
4. β‘ Optimizing for Low Latency
For the best real-time guitar performance, configure PipeWire for low latency:
1. Create a configuration file:
mkdir -p ~/.config/pipewire/pipewire.conf.d
vim ~/.config/pipewire/pipewire.conf.d/low-latency.conf
2. Add the following configuration:
context.properties = {
default.clock.rate = 48000
default.clock.quantum = 128
default.clock.min-quantum = 32 # Lower for less latency
default.clock.max-quantum = 256 # Upper limit
}
3. Restart PipeWire to apply the changes:
systemctl --user restart pipewire wireplumber
π‘ Troubleshooting
High Latency in Guitarix?
If you experience high latency:
Lower default.clock.min-quantum in the PipeWire config (e.g., 32).
Restart PipeWire:
systemctl --user restart pipewire wireplumber
Guitarix/Reaper Not Detecting JACK?
Ensure that libspa-0.2-jack is installed. If issues persist, launch the applications with pw-jack:
pw-jack guitarix
Crackling Sound
I encountered unresolvable crackling issues on an Intel Xeon E3-1505M v6 system. This problem did not occur on an AMD Ryzen 7 5800X or an Intel Core i5-3230M. It appears that some devices have energy-saving features that disrupt audio performance. Unfortunately, the only workaround is to increase latency, which is not ideal for real-time applications like recording an instrument.