JACK server gets xruns even when unloaded

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
ChemiCalChems
Posts: 1
Joined: Tue Mar 24, 2020 3:41 pm
Location: Madrid, Spain

JACK server gets xruns even when unloaded

Post by ChemiCalChems »

As the title says, my JACK server keeps on getting xruns with no load. I have been researching for a while, and have checked common problems that could possibly be causing this issue.

For starters, these are my cards

Code: Select all

$ cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfcda0000 irq 98
 1 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfcc00000 irq 100
For this test, I will use card 1 (hw:Generic_1), as card 0 is an HDMI output.

Are sound card IRQs shared with anything else? NO

Code: Select all

$ cat /proc/interrupts
            CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       CPU8       CPU9       CPU10      CPU11      
  98:          0          0          0          0          0          0       1245          0          0          0          0          0  IR-PCI-MSI 5769216-edge      snd_hda_intel:card0
 100:          0          0          0          0          0          0          0     752054          0          0          0          0  IR-PCI-MSI 6823936-edge      snd_hda_intel:card1
 
Other entries omitted for brevity's sake.

Is the cpu scaling governor set to performance? YES

I run

Code: Select all

# cpupower frequency-set -g performance
at boot, and

Code: Select all

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
Even though it isn't necessary, I am running linux-rt (compiled today as you can see, took a bit and didn't solve anything at all, but oh well)

Code: Select all

$ uname -srv 
Linux 5.4.26-rt17-1-rt #1 SMP PREEMPT_RT Tue, 24 Mar 2020 12:03:28 +0000
For testing purposes, I run

Code: Select all

$ jackd -R -P90 -dalsa -dhw:Generic_1 -r48000
as my JACK server. RT is enabled on only ONE of JACK's processes. htop reports jackd has 5 processes to its name, only one of which is RT.

Code: Select all

$ chrt -p 28422
pid 28422's current scheduling policy: SCHED_FIFO
pid 28422's current scheduling priority: 90
The rest report SCHED_OTHER, priority 0 (not RT).

I am unsure whether this is an issue, and I'm starting to believe it may very well be.

(Here I tried to embed an image but it doesn't seem to be working, link is left here https://imgur.com/a/mBs7rXc)

Under absolutely no load (no audio applications connected to JACK and DSP load at ~0.02%) I'm getting xruns at a rate of 15 per second. I've tried lowering the buffer size and the problem only gets worse, and I will not allow anything above -p128, maybe even -p256. However, in this test, even at the standard period size of 1024 it's getting a ton of xruns.

I have absolutely no clue what could be going on. I am glad to add any more information if needed, and am very thankful for any help I may get.
Post Reply