Xruns while sequencing from external gear

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Xruns while sequencing from external gear

Post by mvdev0 »

Hi,

I do have some problems here and I'm at a point I don't know where to look elsewhere..

I really hope it can be solved or is going in a new direction with your help!

Hardware :

CPU: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
MB: ASUS ROG STRIX H370-I Gaming
RAM: 2x 8GB @ 2666MHz

SC: Focusrite Saffire Pro 24
FW: TI XIO2213B
MIDI: M-Audio MIDISPORT 4x4

Software :

OS : Arch Linux x64, Kernel 6.3.8
- jack2, 1.9.22-1
= 48 kHz, 256/3
= 48 kHz, 512/3
- jack2-dbus, 1.9.22-1
- cadence, 0.9.2-2
- a2jmidid, 9-4
- wine-staging, 8.10-1
- yabridge, 5.0.5-1
DAW : Reaper 6.79 / Ardour 7.4.0

I try to describe the problem.. and I'm sorry for that bad english language.

I'm in the state more experimenting with that setup than making music, but using Linux studiously
around many years.. but of course this machine do have a different setup than the other systems
I'm using.

.. BUT, the problem is existent on a fresh installed Ubuntu Studio 23.04 too!

Here it goes:

If I open a empty project and create 3 tracks with respectively Vital as CLAPi (or VST3, or any other
instrument) with the (more heavy) "Abbysun (Yuli Yolo)" Preset and sequencing that tracks from external
through the named MIDI-Interface on channel 1-3, it is about less than 10 seconds the system producing
endless Xruns while "RT CPU" and "RT longest-block" in Reaper is going up to >100% and ~55ms.

At once I armed that tracks for "input monitoring only", "RT CPU" is going up from ~0.3% to ~8%
for every track so I end up at ~22% while not starting the external sequence and do nothing in Reaper.

If I disarm that tracks and sequence them within Reaper there is no problem, "RT CPU" is at ~0.3%
and "RT longest-block" at ~0.08% while "FX CPU" is at ~2.6% and "CPU" at ~9%.

I changed the cable connecting the MIDI-Interface and choose other USB-Ports.. and this all is
true on a dedicated Distribution without any adjustments and not only in Reaper but Ardour too.

It looks to me like a problem that is related to the external MIDI signal, hardware and/or software.

Because Ubuntu Studio is also producing in this setup Xruns, I do not post right now all informations
about the Arch Linux setup, but if it's relevant for anyone of you, I do of course.

Here are a few:

$ lsusb -tv

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 10000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
ID 05e3:0612 Genesys Logic, Inc. Hub
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
|__ Port 6: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
ID 05e3:0610 Genesys Logic, Inc. Hub
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 046a:0702 Cherry GmbH
|__ Port 4: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 046a:0113 Cherry GmbH
|__ Port 4: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
ID 046a:0113 Cherry GmbH
|__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
ID 05e3:0610 Genesys Logic, Inc. Hub
|__ Port 3: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 1fd2:6103
|__ Port 3: Dev 7, If 1, Class=Human Interface Device, Driver=usbhid, 12M
ID 1fd2:6103
|__ Port 3: Dev 14, If 0, Class=Audio, Driver=snd-usb-audio, 12M
ID 0763:1060 M-Audio
|__ Port 3: Dev 14, If 1, Class=Audio, Driver=snd-usb-audio, 12M
ID 0763:1060 M-Audio
|__ Port 11: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M
ID 0b05:1872 ASUSTek Computer, Inc.

$ ps -eLo rtprio,cls,pid,pri,nice,cmd | grep "FF" | sort -r

- TS 1017 19 0 grep FF
99 FF 54 139 - [migration/5]
99 FF 47 139 - [migration/4]
99 FF 39 139 - [migration/3]
99 FF 32 139 - [migration/2]
99 FF 25 139 - [migration/1]
99 FF 20 139 - [migration/0]
95 FF 83 135 - [irq/8-rtc0]
92 FF 162 132 - [irq/16-firewire_ohci]
90 FF 81 130 - [irq/125-xhci_hcd]
88 FF 830 128 - /usr/bin/jackdbus auto
87 FF 830 127 - /usr/bin/jackdbus auto
86 FF 830 126 - /usr/bin/jackdbus auto
82 FF 830 122 - /usr/bin/jackdbus auto
77 FF 919 117 - /usr/local/bin/reaper_linux_x86_64/REAPER/reaper
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 913 117 - /usr/bin/python3 /usr/share/carla/carla-jack-multi --with-appname=/usr/bin/carla-jack-multi --with-libprefix=/usr
77 FF 794 117 - /usr/bin/a2jmidid dbus
50 FF 94 90 - [irq/131-nvme0q6]
50 FF 93 90 - [irq/130-nvme0q5]
50 FF 92 90 - [irq/129-nvme0q4]
50 FF 91 90 - [irq/128-nvme0q3]
50 FF 90 90 - [irq/127-nvme0q2]
50 FF 89 90 - [irq/126-nvme0q1]
50 FF 88 90 - [irq/124-nvme0q0]
50 FF 70 90 - [irq/9-acpi]
50 FF 53 90 - [idle_inject/5]
50 FF 46 90 - [idle_inject/4]
50 FF 38 90 - [idle_inject/3]
50 FF 379 90 - [irq/133-eno1]
50 FF 31 90 - [idle_inject/2]
50 FF 24 90 - [idle_inject/1]
50 FF 21 90 - [idle_inject/0]
50 FF 167 90 - [irq/132-i915]
50 FF 166 90 - [card0-crtc2]
50 FF 165 90 - [card0-crtc1]
50 FF 164 90 - [card0-crtc0]
1 FF 830 41 - /usr/bin/jackdbus auto
1 FF 830 41 - /usr/bin/jackdbus auto
1 FF 58 41 - [rcuop/5]
1 FF 51 41 - [rcuop/4]
1 FF 44 41 - [rcuop/3]
1 FF 43 41 - [rcuog/3]
1 FF 36 41 - [rcuop/2]
1 FF 29 41 - [rcuop/1]
1 FF 19 41 - [rcu_exp_par_gp_kthread_worker]
1 FF 18 41 - [rcu_exp_gp_kthread_worker]
1 FF 17 41 - [rcub/0]
1 FF 16 41 - [rcuop/0]
1 FF 15 41 - [rcuog/0]
1 FF 14 41 - [rcu_preempt]

It is noticeable every time I restart the system I have to reconnect the MIDI-Interface, without
this external MIDI information need around 2 second before Reaper handle them.

Can someone delimit why "RT CPU" is increasing so much only by arming that tracks?

Any hints are very welcome!

Thank you for reading this!

User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Xruns while sequencing from external gear

Post by khz »

I know the problem. It has to do with the fact that audio runs with its clock under RT, but MIDI does not. viewtopic.php?p=99769#p99769
According to FalkTX, - FalkTX is currently the jackd developer - jackd can't handle external MIDI clock reliably either. Jackd clock can only run internally stable. But this should change. https://forum.mod.audio/t/need-for-beat ... el/9833/22

. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Re: Xruns while sequencing from external gear

Post by mvdev0 »

Hi,

thank you, I now read your links, and stop going frustrated with my setup.. :)

Back later.. cu

mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Re: Xruns while sequencing from external gear

Post by mvdev0 »

Now I tested Ardour (7.4.0) with the ALSA backend and RAW MIDI.. looks a bit better, only ~10% IDLE with same tracks and instruments like
in Reaper, but with sequencing from external it grows up to ~80% .. so the system is nearly occupied.

I won't belive this is without problems in the background on that powerful CPU.

But now I can forget the idea it's about a2jmidid and it's priorities..

EDIT: This time the system is using snd_dice, not libffado .. my general Jack2 setup is with ffado, this way I can use the hardware mixer

mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Re: Xruns while sequencing from external gear

Post by mvdev0 »

Yesterday I do a fresh install of Windows 10 22H2 on that system and was able to use that old firewire sound card.. (I think this will change with W11+)

.. and it is running without the aforementioned problems.

This is with slightly better latency and more CPU workload on that untouched installation.

But I don't like that setup, so I recover the previous system. :)

mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Re: Xruns while sequencing from external gear

Post by mvdev0 »

khz wrote: Mon Jun 19, 2023 5:09 am

I know the problem. It has to do with the fact that audio runs with its clock under RT, but MIDI does not. viewtopic.php?p=99769#p99769
According to FalkTX, - FalkTX is currently the jackd developer - jackd can't handle external MIDI clock reliably either. Jackd clock can only run internally stable. But this should change. https://forum.mod.audio/t/need-for-beat ... el/9833/22

Hi khz,

thank you very much sharing that links, took a time to read them.. but it's good to know it's not only my setup.

You can't solve this situation in the past?

There is a link you pasted about JAMRouter, and the author doing great effort describing what I feel is happening here, but
the software is from 2016 so I do not testing it.

You all have a good day!

User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Xruns while sequencing from external gear

Post by khz »

Hy @mvdev0
I play mainly electric bass at the moment.
I wait and hope that this problem is perceived at some point and possibly fixed. Can just take a while. But it looks as good as never before.
I'm not testing anything at the moment because the climate - I live under the roof - is too extreme.
OT: The Torture Never Stops https://www.youtube.com/watch?v=d1aWV92OuMM
King Crimson - People (Live In New York City, 1995) https://www.youtube.com/watch?v=gyavU5H ... u&index=16

. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
mvdev0
Established Member
Posts: 28
Joined: Fri Jun 08, 2018 10:36 am

Re: Xruns while sequencing from external gear

Post by mvdev0 »

I don't have Xruns in that described situation anymore on linux.

Don't know really why, it's gone after installing Focusrite MixControl 3.7 (and possibly a new Firmware coming with?) on W10 22H2.
Now I'm having dual-boot on that system, and I think it's for some situation a good decision.
I do find the "Firewire Driver Latency" setting in MixControl, but this seems only Windows driver related.

But I still have the high "RT CPU", only by arming tracks in Reaper and it doesn't matter which Input is chosen, either audio or midi.

Post Reply