Sporadic XRUNS / Linux

Official support for: bitwig.com
Post Reply New Topic
RELATED
PRODUCTS

Post

I think it is related to task switching in the kernel, and I'm not a kernel expert. I may be wrong so please excuse my vague understanding of the issue.

In the audio engine at some point we prepare the data for the plugin host and then we send some data on a pipe, this wakes up the plugin host and then it processes the data and sends a message back to the audio engine via a pipe when it is ready.

The issue is when will the kernel wake up the plugin host thread that is waiting for I/O? In that case the kernel will put the plugin host in the queue of tasks ready to process. Then this queue will be consumed when there is a core that will schedule the next task that is ready, and this depends on the kernel configuration: the interruption frequency (or if a task goes to waiting state). Maybe other things can trigger it, but I'm not aware of it.

I think this is what we want: a cooperative scheduler primitive that let us tell the kernel to immediately schedule a given task on the current core.

If you're aware of such a syscall, then I'd be happy to try a few thing.

For now, I'm using the Linux zen kernel on arch and I have no issues.

Post

This is still present on my system with Bitwig 4.3 beta 10 / Ubuntustudio 20.04 (low latency stock kernel). External plugins (especially U-he) are only usable when "within Bitwig" is used.

Post

Have you tried Pipewire yet?
I've been using it for a few months now and it's been great.
For one, you no longer have to start/stop Jack; it eliminates Jack. Which perhaps might eliminate your xrun issue. For one, it could rule out any erroneous Jack settings.

Post

lunardigs wrote: Sun Jun 26, 2022 10:33 pm Have you tried Pipewire yet?
I've been using it for a few months now and it's been great.
For one, you no longer have to start/stop Jack; it eliminates Jack. Which perhaps might eliminate your xrun issue. For one, it could rule out any erroneous Jack settings.
Not yet, I'm on Ubuntustudio 20.04 and I don't know how stable it is working there. I think in newer versions it works better.

Post

Hi guys,
I'm REALLY happy to have found this topic, I'm in trouble with that since I bought my new computer beginning of 2022.
I've just found something very insteresting: when I unplug power supply, peaks and xruns disappear completely!, can you believe it?
And there is more:
when I plug OR unplug PSU, an alsa-jack client appears shortly and disappears, named:

Code: Select all

alsa-jack.jackP.2436.13:
out_000
out_001
It is not more convenient to work with no power than deactivate sandbox, so I really want to fix that.
I tried to check jackd "server synchronous mode", which is pretty bad documented. It seems to reduce xruns but doesn't suppress them.
I have to mention the exactly same patches was working with no problem at all on my last computer, less powerfull.
my config:
I use Kubuntu with low-latency kernel and KX repositories, the same as on my old computer.

Code: Select all

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-50-lowlatency (64-bit)
Graphics Platform: X11
Processors: 4 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 31.1 Gio of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Links to the thread I opened or and another about PSU:
Xruns on Kubuntu/KX https://linuxmusicians.com/viewtopic.ph ... 85#p149185
Worse performance when power supply plugged in! https://linuxmusicians.com/viewtopic.php?t=19865

Post

can anybody check if the same behavior happens on your system?

Post

I've read the first comment and the last ones so far. I use a desktop computer, no laptop, so this might not be relevant at all. I use Xubuntu 18.04 and Bitwig 2.4.3 on a i5 with 16GB RAM. Recently I started the move to Xubuntu 22.04 and Bitwig 4.4.3. One thing I noticed from such a jump in versions is that it takes more time to load a session in 4.4.x but, the resources used are quite low compared to 2.4.3. In 4,4.x so far I run all u-he synths and have installed the Biotek synths.

On Bitwig 2.4.3 I run many Linux plugins plus many Windows plugins using linvst, like all Melda v15, all Voxengo, etc.

It can obviously depend on any load at a single moment in time. Maybe my tracks are not complex enough to experience any xruns, I might be having 15 synths, Linux and Windows, plus audio tracks, but not all of them are running at the same time within a piece. You can have an idea of the stuff I make from the soundcloud page in the signature, to estimate what kind of load I might subject Bitwig to.

I think that using Xfce as the desktop manager (Xubuntu) might help since it's lightweight.

Post

blindekinder wrote: Sat Nov 19, 2022 12:10 am Hi guys,
I'm REALLY happy to have found this topic, I'm in trouble with that since I bought my new computer beginning of 2022.
I've just found something very insteresting: when I unplug power supply, peaks and xruns disappear completely!, can you believe it?
And there is more:
when I plug OR unplug PSU, an alsa-jack client appears shortly and disappears, named:

Code: Select all

alsa-jack.jackP.2436.13:
out_000
out_001
It is not more convenient to work with no power than deactivate sandbox, so I really want to fix that.
I tried to check jackd "server synchronous mode", which is pretty bad documented. It seems to reduce xruns but doesn't suppress them.
I have to mention the exactly same patches was working with no problem at all on my last computer, less powerfull.
my config:
I use Kubuntu with low-latency kernel and KX repositories, the same as on my old computer.

Code: Select all

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-50-lowlatency (64-bit)
Graphics Platform: X11
Processors: 4 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 31.1 Gio of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Links to the thread I opened or and another about PSU:
Xruns on Kubuntu/KX https://linuxmusicians.com/viewtopic.ph ... 85#p149185
Worse performance when power supply plugged in! https://linuxmusicians.com/viewtopic.php?t=19865
I don't see any difference here when unplugging the power supply (Lenovo T440P).

Post

mevla wrote: Thu Nov 24, 2022 11:47 pm I use Xubuntu 18.04 and Bitwig 2.4.3 on a i5 with 16GB RAM. Recently I started the move to Xubuntu 22.04 and Bitwig 4.4.3.
If you're willing to upgrade again to 22.10 you'll get to use the pipewire audio engine (now the Ubuntu default) which in my experience is just as powerful as jack, but easier to use.

Post

I never had any issue with Jack in the past 8 years (KXstudio, Debian, Ubuntustudio and now MXLinux).

Post

dehuszar wrote: Fri Dec 30, 2022 11:51 pm If you're willing to upgrade again to 22.10 you'll get to use the pipewire audio engine (now the Ubuntu default) which in my experience is just as powerful as jack, but easier to use.
I have had no problems with jackd in the past years so I do not feel any push to go for something else. Especially since the installation of 22.04 wasn't smooth at all resulting in an unbootable system which in turn I had to ask for help on irc. And fortunately there were good people in ubuntu's irc to help out and get the system running properly. The problem was at the type of UEFI BIOS and how the installer reacts to that - things I never spend time dealing with so I'm mostly unfamiliar with.

EDIT: I'm also using for years now the jack pulse audio sink - whatever its official name is - to have both jackd and pulse audio working effortless together.
Last edited by mevla on Tue Jan 03, 2023 4:53 pm, edited 1 time in total.

Post

Fair enough. No need to change what's working.

Personally, I've had lots of problems with Jack (specifically it's ability to coexist with Pulseaudio) and have found the new default audio engine to be rock solid at 2ms, easier to grok, and all with no boilerplate setup needed (on latest versions of Ubuntu and Fedora, anyway).

Consider it a recommendation for those whose jack experiences are not as favorable.

Post

I've just tried without jack, directly with Bitwig connected to Alsa. Same here, maybe a bit less...

Post

blindekinder wrote: Wed Feb 01, 2023 11:05 am I've just tried without jack, directly with Bitwig connected to Alsa. Same here, maybe a bit less...
Are you running the lowlatency kernel and is lowlatency properly configured on your setup? If yes, then you might try to look at IRQs and disabling hardware devices since some of them might be interrupting with the realtime capabilities. This might be a hardware thing.
((( ~ )))

Post

yes, lowlatency kernel, and config is ok...
It is for sure device shared with IRQ or something Bitwig uses to communicate with third party plugins.
Bitwig tech team just answered me it's a known bug and they are on it!
An idea how to check which IRQ is guilty?

Post Reply

Return to “Bitwig”