Setup Linux for Bitwig without an Audio Optimized Distro

Official support for: bitwig.com
RELATED
PRODUCTS

Post

Using a distro like Ubuntu Studio would likely make getting Bitwig up and running even faster, but I wanted to use Linux Mint and also avoid the great many applications that distros like Ubuntu Studio come with. After struggling through the process a bit, and repeating it on a newer machine, I thought I would share the steps that ultimately worked well for me:

Steps to configure Linux for use with Bitwig without an audio optimized distro. (Note: Ubuntu Studio Controls requires a Ubuntu based distro. Tested with Linux Mint Cinnamon 20.2.)

1) Install the low latency kernel, JACK, and an interface to control it by running the following command in the terminal:

Code: Select all

sudo apt install linux-lowlatency pulseaudio-module-jack ubuntustudio-controls
2) Open Ubuntu Studio Controls:

a) Click the button at the top to enable "real time permissions" and follow the instructions.
b) Set "CPU Governor" to "Performance".
c) Under the "Audio Setup" tab, select your audio interface next to "USB device that should be Master:".
d) Enter your desired sample rate and buffer/period numbers to adjust latency.
e) Uncheck "Bridge ALSA to Jack MIDI (turn on a2jmidid)". [Note from chaocrator: If you need to use a2jmidid, you can start it AFTER Bitwig is running.]
f) Click "Apply Audio Settings" then "Start or Restart Jack".
g) Close out.

Now you should be able to run Bitwig and select JACK as your audio driver (Settings>Audio). Done.
Last edited by NWS on Tue Nov 30, 2021 7:29 pm, edited 1 time in total.

Post

Hi,many thanks for your help setting gnu linux audio on Bitwig Studio :) and best regards from Naples ( Italy)

gennaro
Bitwig Studio 4.0.1 - Live Ableton 10/11 standard + MaxMsp 8 - Reaper 6.3.4 - Waveform 11 - Mixbus 7 - Ardour 6.9
Mx Linux 21.4 Hp elite 8200 sff (Debian Bullseye based + kx studio) - mx linux 19.4 (Asus x54c) Windows 10

Post

Not every distribution ist Debian based ;) and there is no need for the lowlatency Kernel.
For Arch https://wiki.archlinux.org/title/Professional_audio
I simply use JACK, Pulseaudio and Cadence for configuring the whole stuff.

Post

I perform techno live acts with BW on linux mint XFCE on my laptop and all is fine even with native kernel.

Post

Yeah, I have that note about needing a Ubuntu based distro to use Ubuntu Studio Controls. I guess I figured many beginners who would find an easy guide helpful would have a good chance of considering some kind of Ubuntu based distro, but sure, you never know. Thanks for the link to that Arch guide.

I originally used QJackCTL, but found it a little buggy, plus setting up Ubuntu Studio Controls seemed a little easier.

So I've read mixed things about needing a low latency kernel. From that Arch link you shared:
Since a while ago, the stock Linux kernel has proven to be adequate for realtime uses. The stock kernel (with CONFIG_PREEMPT=y, default in Arch) can operate with a worst case latency of upto 10ms (time between the moment an interrupt occurs in hardware, and the moment the corresponding interrupt-thread gets running), although some device drivers can introduce latency much worse than that. So depending on your hardware and driver (and requirement), you might want a kernel with hard realtime capabilities.
So that makes it sound like in most cases, depending on your system, the stock kernel should be adequate. I guess I wonder what "adequate" is exactly. If that's 10ms more than using a low latency kernel, then that's significant. Or maybe the low latency kernel is something like 9.2 and the stock is 10? Some people might be more sensitive to latency, or might be using plugins that push their system pretty hard, making any latency reduction welcomed? Also, since many Ubuntu distros could be using kernels significantly older than many Arch distros, I wonder if that could also be a factor?

I don't have enough experience to know the answers to those questions, so would be interested if any of you could shed some light there.

All the best,

Post

My latency is at 5.3ms at a buffer size of 256 sample with the stock Arch kernel.

Post

I use Bitwig in plain Ubuntu LTS with no configuration just selecting ALSA for audio and midi. Seems to me that you only need to do any configuring if you want to use multiple audio interfaces or internally route audio between programs.

Post

peteb2006 wrote: Wed Nov 17, 2021 7:36 pm I use Bitwig in plain Ubuntu LTS with no configuration just selecting ALSA for audio and midi. Seems to me that you only need to do any configuring if you want to use multiple audio interfaces or internally route audio between programs.
Yes, I think you're right. The main reason why I'm using JACK is for its multi-client support (I think that would be the correct term). So it's great for being able to play a video with audio in one program while using Bitwig, or YouTube, etc. And personally, I've found it especially useful to automatically route audio from my MIDI keyboard (in Bitwig) into video calls (Zoom, Skype, etc.) when teaching lessons online. I was doing it in Windows before and it was quite a pain.

With my current setup I'm mainly running Pianoteq within Bitwig, with a buffer size of 64 samples, supposedly giving 1.3ms latency. Of course who knows how accurate that is. I'm assuming the real latency must be more than these reported numbers. I've found that in live performance situations, depending on the house audio setup and how much latency it introduces (sometimes pretty bad), every little bit seems to help.

So I'm also curious if there's a downside/trade-off to running a low latency kernel?

Post

What do you guys think about PipeWire?
"Out beyond the ideas of wrongdoing and rightdoing, there is a field. I’ll meet you there." · Rumi
UrbanFlow.art · Instagram · YouTube

Post

And yeah, I think everyone reporting that using Bitwig with ALSA on a regular stock distro works fine, means that unless you need the multi-client support of JACK and/or need to route your audio between programs, then you shouldn't need to do anything else. Also assuming you don't have any latency issues, perhaps from older hardware?

Post

ThomasHelzle wrote: Wed Nov 17, 2021 8:28 pm What do you guys think about PipeWire?
I've wanted to try PipeWire but haven't. I think I read it's not compatible with Mint yet.

Post

kling1 wrote: Wed Nov 17, 2021 7:09 pm My latency is at 5.3ms at a buffer size of 256 sample with the stock Arch kernel.
It's not quite that simple--the stock Arch kernel isn't "stock". The default Arch kernel includes the Zen patches, so the Arch family of distros won't compare well against "stock" Debian kernels, which are true vanilla linux kernels. Likewise, the kernels included with Ubuntu Studio, the so-called "Low-latency" kernels are simply vanilla kernels that have been compiled with the following settings:

* IRQs are threaded by default, meaning that more IRQs (still not all IRQs) can be pre-empted, and they can also be prioritised and have their CPU affinity controlled;
* pre-emption is enabled throughout the kernel (CONFIG_PREEMPT instead of CONFIG_PREEMPT_VOLUNTARY);
* the latency debugging tools are enabled, so that the user can determine what kernel operations are blocking progress;
* the timer frequency is set to 1000 Hz instead of 250 Hz.

It is important to note that a Debian user won't get the same results as an Arch user, and the Ubuntu Studio user will have different results than a Fedora user. It's better (and more realistic) for Arch users to use comparisons with other Arch users, and Debian users use comparisons with other Debian users, etc., etc.

If one is going to compare settings against different distros, A closer comparison, would be to compare kernels that have used the same patch set and has been compiled with the same settings. For example, the Arch stock kernels against Debian with the Liquorix kernel, which also uses the Zen patches.

Otherwise, there will be no consistency in the comparisons, and the latency values will be all over the map. :-)
Vendor‑Dependent Copy Protection: Customers lose. Pirates win.:mad:
(Also: I'm Accused of lying about Linux—it boots, runs my pro audio workflow, stays stable, updates--though yearly dismissed as “niche”. Yet I'm the deluded one.)
:roll:

Post

Good information, thanks.

Post

Do you also have a bug with midi ? I tried 2 different controllers (akai mpk mini, novation launchpad) and random ghost notes are being played each time i start playing something, very annoying and making the use of controllers impossible.
I use bitwig 4 flatpak on fedora 35.
That's the exact reason why I don't use linux for music production. Only issues. Back to windows...

Post

I've never had any MIDI bugs like that at all, but I've never tried it on Fedora. I've been using Linux for live music performance in part because eliminating all "Xruns" on Windows when some background process would start up, was really difficult, and even when I got it sorted out it was all too easy for a Windows Update to reset something, or for me to forget to change the power settings before a performance. But yeah, ghost notes are frustrating. I've only had issues with them in Windows when using MIDI to USB cables (rather than USB to USB).

Post Reply

Return to “Bitwig”