constant xruns

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
rube2112
Established Member
Posts: 4
Joined: Mon Jun 01, 2020 4:04 am

constant xruns

Post by rube2112 »

Hi, I have 5 different computers that I've tried to get jack working on. I've tried ubuntu studio, mint, and a few others. It's always the same story no matter which os or which computer I use. After install, Jack works perfectly and I can get very low latency, then in a few days, it just starts giving solid xruns.....38 frames at a time, not intermittently, but constantly. This never stops no matter what settings I try. I can put it on 4096 10, and it's still the same thing. This usually is triggered when a daw starts jack on it's own. Once this starts, I can never get it to work again no matter what I try until I reinstall the os. I can't find a jack troubleshooting page....this was the closest thing I could find. Thanks....Robb
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: constant xruns

Post by lilith »

Did you make all optimizations?

There a realtimeconfig script that checks your settings. I would start from here: https://github.com/raboof/realtimeconfigquickscan
It's strange though that it starts after some days. Are you using Laptops or Desktop PCs?
rube2112
Established Member
Posts: 4
Joined: Mon Jun 01, 2020 4:04 am

Re: constant xruns

Post by rube2112 »

No i haven't made any optimizations. I've been unable to find any documentation at all. That's why I'm here. Robb
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: constant xruns

Post by khz »

Welcome,
rube2112 wrote: Mon Jun 01, 2020 7:25 pm I've been unable to find any documentation at all.
you will find a small ;-) overview in my 2 notes (see signature).
. . . 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.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: constant xruns

Post by lilith »

Setting the CPU governor to performance is quite crucial. Run the script from above and post the output here.
rube2112
Established Member
Posts: 4
Joined: Mon Jun 01, 2020 4:04 am

Re: constant xruns

Post by rube2112 »

here it is....
Attachments
Screenshot from 2020-06-01 18-24-44.png
Screenshot from 2020-06-01 18-24-44.png (116.07 KiB) Viewed 1257 times
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: constant xruns

Post by lilith »

Check point 1. and 2. from here

https://jackaudio.org/faq/linux_rt_config.html

You are already in the audio group, so point 2 is not needed.

And then set the CPU governor to performance. I guess that should already improve it.

Maybe start from here
https://forums.linuxmint.com/viewtopic.php?t=297413

It can be different from distro to distro.
User avatar
ycollette
Established Member
Posts: 91
Joined: Sun Jul 03, 2016 8:53 pm
Has thanked: 14 times
Been thanked: 20 times
Contact:

Re: constant xruns

Post by ycollette »

Which RT kernel do you run ?
Which graphic card do you have ?

I met some similar problem a while ago with a recent RT kernel. That was a problem with the AMD graphic card and some lock in the kernel.s
I had constant xruns after kernel upgrade.
dailybug2
Established Member
Posts: 51
Joined: Tue May 28, 2019 2:33 pm
Location: Germany
Been thanked: 3 times
Contact:

Re: constant xruns

Post by dailybug2 »

Hello - here my observations regarding Jack "the XRUN" D.:

I'm using jackd on Ubuntu 20.04 with MusE and Audacity (for testing jackd only).
Audio interface: Behringer XENYX302USB (nothing special, think of a standard USB interface, duplex-capable).

Constant XRUNs every 10.22 seconds (yes, exactly 10.22!)
- with Audacity only when recording; playback is OK.
- with MusE all the time if the transport is rolling.

Tried a lot of tips I found in the web - no effect except for increased knowledge.
Played with the Jack config, exaggerated buffer settings (512 / 4 buffers / 50 msec latency) - no effect.

Then I had the "stupid" idea do test with "realtime = off" et voila, SOLVED!
This is ODD, jackd screws up I/O if realtime=on!? Does if "take real time" in this case? :wink:

I guess things are not that simple and something went wrong with the prios. Here a process/thread list for the insiders:

Code: Select all

> ps ax -L -o pid,ni,rtprio,comm | egrep -i 'command|muse|jack'
    PID  NI RTPRIO COMMAND
   1790   0      - jackdbus
   1790   0      - jackdbus
   1790   0      - jackdbus
   1790   -     10 jackdbus
   1790   0      - jackdbus
   2032   0      - qjackctl
   2032   0      - qjackctl:rcs0
   2032   -      0 qjackct:disk$0
   2032   -      0 qjackct:disk$1
   2032   -      0 qjackct:disk$2
   2032   -      0 qjackct:disk$3
   2032   0      - qjackctl
   2032   0      - qjackctl
   3022   0      - muse-fast-start
   3023   0      - muse3
   3023   0      - muse3
   3023   0      - muse3
   3023   0      - muse3
   3023   0      - muse3:rcs0
   3023   -      0 muse3:disk$0
   3023   -      0 muse3:disk$1
   3023   -      0 muse3:disk$2
   3023   -      0 muse3:disk$3
   3023   -      5 muse3
   3023   0      - muse3
   3023   -      4 muse3
/* Drunk, 'll fix later ... well, usability is anyway only of interest to those who got beyond the crashes! :P */
dailybug2
Established Member
Posts: 51
Joined: Tue May 28, 2019 2:33 pm
Location: Germany
Been thanked: 3 times
Contact:

Re: constant xruns

Post by dailybug2 »

dailybug2 wrote: Sat Jun 06, 2020 6:51 pm Then I had the "stupid" idea do test with "realtime = off" et voila, SOLVED!
This is ODD, jackd screws up I/O if realtime=on!? Does if "take real time" in this case? :wink:
No, not solved. With jackd/realtime=off there are still XRUNs every 1..2 minutes, not related to the buffer size. I had to go on with my "stupid" experiments.

In the meantime I moved my PC from here to there and the XRUNs are ... GONE, even with jackd/realtime=on! Whotttttf?!

Cause: I connected the USB interface to the back of the PC now, because of the cable length. Either the front connection is weak and catches interference (bad ground!), or the USB port is handled inadequately by the BIOS or Linux. Strange that I was able to copy an entire hard-disk via this port without issues.

I scanned the web for such USB port issues and yes, there is the advice to try different ports.

TLDR; if your USB interface causes cyclic sporadic XRUNs, try a different port. Use the front USB ports, if any, for keyboard and mouse only.
/* Drunk, 'll fix later ... well, usability is anyway only of interest to those who got beyond the crashes! :P */
Post Reply