Getting Jack xrun errors - over/underrun? [SOLVED - I think]
Moderators: MattKingUSA, khz
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun? [SOLVED]
Hi Lad
So I just did a one hour show with the settings from last night and guess what...
I forgot to jump back into the low latency kernel... So I am hoping that maybe... it's sorted. It sounds weird using my headphones directly but I will learn to cope. Also I don't have to faff with two headsets, one from the PC and one plugged in the mixer to hear callers and things. So hugely better I think.
Thank you for all the help! I will come back if it breaks again!
Kyle
So I just did a one hour show with the settings from last night and guess what...
I forgot to jump back into the low latency kernel... So I am hoping that maybe... it's sorted. It sounds weird using my headphones directly but I will learn to cope. Also I don't have to faff with two headsets, one from the PC and one plugged in the mixer to hear callers and things. So hugely better I think.
Thank you for all the help! I will come back if it breaks again!
Kyle
Last edited by kyle_1974 on Tue May 19, 2020 8:23 pm, edited 1 time in total.
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
kyle_1974 wrote: ↑Tue May 19, 2020 8:10 pm Hi Lad
So I just did a one hour show with the settings from last night and guess what...
I forgot to jump back into the low latency kernel... So I am hoping that maybe... it's sorted. It sounds weird using my headphones directly but I will learn to cope. Also I don't have to faff with two headsets, one from the PC and one plugged in the mixer to hear callers and things. So hugely better I think.
Thank you for all the help! I will come back if it breaks again!
Kyle
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Sigh
It was all going so well.
Tuesday night, live show - no issue
Thursday - live show, no issue
Friday (just now) - 24 (4823) x run errors knocking the radio stream off intermittently. Three times on my two hour show and every song on my friends one hour show.
I wish I had never upgraded my PC. Set up as described. Jack using USB mixer as in and out, headphones plugged into mixer to hear output.
I have totally run out of ideas at this point, save shifting back to my old PC or using JACK to input from mixer and output from PC soundcard - or living with the glitch every half hour or so as only I hear it (not listeners)
It was all going so well.
Tuesday night, live show - no issue
Thursday - live show, no issue
Friday (just now) - 24 (4823) x run errors knocking the radio stream off intermittently. Three times on my two hour show and every song on my friends one hour show.
I wish I had never upgraded my PC. Set up as described. Jack using USB mixer as in and out, headphones plugged into mixer to hear output.
I have totally run out of ideas at this point, save shifting back to my old PC or using JACK to input from mixer and output from PC soundcard - or living with the glitch every half hour or so as only I hear it (not listeners)
-
- Established Member
- Posts: 45
- Joined: Thu Aug 16, 2018 8:31 pm
- Has thanked: 1 time
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Did you set your CPU governor to performance before the broadcast? Setting this is highly recommended.
Can you make sure that all desktop effects are disabled in your desktop environment settings.
"Disable WiFi and close any programs that do not need to be open when recording such as browsers. Many have reported disabling WiFi has led to more reliable JACK performance." - Do you use ethernet or wifi?
Do you happen to have bluetooth service enabled and running? Disable it if so.
Please paste output of:
Did anything jack settings change between the shows? Please, keep a log (on paper or text doc) of your jack settings each show. You're going to have to experiment with periods/buffer size/sample rate to get something that works for you.
But you have to do some detective work::
- boot w/ low-latency kernel
- set cpu governor to performance
- with various jack settings, start test broadcast (just as you do a real show) and proceed as follows:
Try to see xrun count with jack settings: 3 periods/256 buffer size@48000. Test your settings by trying to make xruns happen... really push your system! For example, try to change songs every second or as fast as you can to see if you can force xruns. If you can force xruns, your settings need to be adjusted. Adjust the buffer size to 512 and try to force xruns again... and so on until you find a setting w/ lowest # of xruns. Make sense?
To better understand your system, you'll want to benchmark it. There is a tool that will artificially load your system to generate xruns. You can run different to tests to try to pin down optimal jack settings.
You'll have to download and build the tool in terminal like this:
Can you make sure that all desktop effects are disabled in your desktop environment settings.
"Disable WiFi and close any programs that do not need to be open when recording such as browsers. Many have reported disabling WiFi has led to more reliable JACK performance." - Do you use ethernet or wifi?
Do you happen to have bluetooth service enabled and running? Disable it if so.
Please paste output of:
andcat /proc/interrupts
cat /etc/security/limits.d/audio.conf
Did anything jack settings change between the shows? Please, keep a log (on paper or text doc) of your jack settings each show. You're going to have to experiment with periods/buffer size/sample rate to get something that works for you.
But you have to do some detective work::
- boot w/ low-latency kernel
- set cpu governor to performance
- with various jack settings, start test broadcast (just as you do a real show) and proceed as follows:
Try to see xrun count with jack settings: 3 periods/256 buffer size@48000. Test your settings by trying to make xruns happen... really push your system! For example, try to change songs every second or as fast as you can to see if you can force xruns. If you can force xruns, your settings need to be adjusted. Adjust the buffer size to 512 and try to force xruns again... and so on until you find a setting w/ lowest # of xruns. Make sense?
To better understand your system, you'll want to benchmark it. There is a tool that will artificially load your system to generate xruns. You can run different to tests to try to pin down optimal jack settings.
You'll have to download and build the tool in terminal like this:
git clone https://github.com/Gimmeapill/xruncounter.git
cd xruncounter/
sudo apt-get install libjack-jackd2-dev
gcc -Wall xruncounter.c -lm `pkg-config --cflags --libs jack` -o xruncounter
./xruncounter -m
OS: Debian 11 kernel: Liquorix
...trying out AV Linux
...trying out AV Linux
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Morninglad wrote: ↑Sat May 23, 2020 7:48 am Did you set your CPU governor to performance before the broadcast? Setting this is highly recommended.
Can you make sure that all desktop effects are disabled in your desktop environment settings.
"Disable WiFi and close any programs that do not need to be open when recording such as browsers. Many have reported disabling WiFi has led to more reliable JACK performance." - Do you use ethernet or wifi?
Do you happen to have bluetooth service enabled and running? Disable it if so.
Please paste output of:
andcat /proc/interruptscat /etc/security/limits.d/audio.conf
Did anything jack settings change between the shows? Please, keep a log (on paper or text doc) of your jack settings each show. You're going to have to experiment with periods/buffer size/sample rate to get something that works for you.
But you have to do some detective work::
- boot w/ low-latency kernel
- set cpu governor to performance
- with various jack settings, start test broadcast (just as you do a real show) and proceed as follows:
Try to see xrun count with jack settings: 3 periods/256 buffer size@48000. Test your settings by trying to make xruns happen... really push your system! For example, try to change songs every second or as fast as you can to see if you can force xruns. If you can force xruns, your settings need to be adjusted. Adjust the buffer size to 512 and try to force xruns again... and so on until you find a setting w/ lowest # of xruns. Make sense?
To better understand your system, you'll want to benchmark it. There is a tool that will artificially load your system to generate xruns. You can run different to tests to try to pin down optimal jack settings.
You'll have to download and build the tool in terminal like this:
git clone https://github.com/Gimmeapill/xruncounter.git
cd xruncounter/
sudo apt-get install libjack-jackd2-dev
gcc -Wall xruncounter.c -lm `pkg-config --cflags --libs jack` -o xruncounter
./xruncounter -m
PC was set to Governor as I have not changed it since all the fun and games earlier in the week.
No desktop effects enabled.
No wifi card even installed, I always use ethernet.
No bluetooth enabled.
Interrupts
Code: Select all
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 CPU8 CPU9 CPU10 CPU11
0: 35 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 2-edge timer
7: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 7-fasteoi pinctrl_amd
8: 0 0 0 0 0 0 0 0 0 0 1 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 9-fasteoi acpi
25: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 22528-edge PCIe PME
26: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 51200-edge PCIe PME
28: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 116736-edge PCIe PME, aerdrv
29: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 133120-edge PCIe PME, aerdrv
30: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 135168-edge PCIe PME, aerdrv
31: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 137216-edge PCIe PME, aerdrv
38: 0 26597 150 1048 748 7341 100 0 0 0 0 0 PCI-MSI 524288-edge xhci_hcd
40: 1063 24471 244492 7942 0 1300 0 0 97815 0 0 0 PCI-MSI 4200448-edge xhci_hcd
41: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200449-edge xhci_hcd
42: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200450-edge xhci_hcd
43: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200451-edge xhci_hcd
44: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200452-edge xhci_hcd
45: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200453-edge xhci_hcd
46: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200454-edge xhci_hcd
47: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4200455-edge xhci_hcd
48: 760 0 0 0 0 0 0 1552590 0 0 0 13277 PCI-MSI 526336-edge ahci[0000:01:00.1]
50: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4718592-edge ahci[0000:09:00.0]
52: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 5242880-edge ahci[0000:0a:00.0]
53: 0 132326 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4202496-edge snd_hda_intel:card1
55: 2342 0 2160 0 0 0 0 0 0 6543666 0 0 PCI-MSI 3145728-edge amdgpu
58: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 4196353-edge ccp-1
61: 0 0 0 52 0 0 0 0 0 0 0 0 PCI-MSI 3147776-edge snd_hda_intel:card0
62: 0 0 0 0 568 0 0 0 0 0 0 31814 PCI-MSI 2097152-edge enp4s0
NMI: 10 177 152 196 225 214 158 148 159 199 205 216 Non-maskable interrupts
LOC: 7698617 7356012 7371336 9995821 8865782 8663688 7319931 7420337 7678490 7354972 7909767 7114855 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 10 177 152 196 225 214 158 148 159 199 205 216 Performance monitoring interrupts
IWI: 1 2 0 6 18 1 0 3 0 0 44 1 IRQ work interrupts
RTR: 0 0 0 0 0 0 0 0 0 0 0 0 APIC ICR read retries
RES: 9510157 6823452 6068639 6523764 6070658 7428823 8053737 6216592 8009544 4385172 6637209 4935339 Rescheduling interrupts
CAL: 491303 466822 513776 662409 642894 646036 485469 515920 502674 622578 674326 625813 Function call interrupts
TLB: 1528505 1583113 1605313 1730743 1685769 1703558 1602772 1503321 1631996 1701660 1725536 1689184 TLB shootdowns
TRM: 0 0 0 0 0 0 0 0 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 0 0 0 0 Threshold APIC interrupts
DFR: 0 0 0 0 0 0 0 0 0 0 0 0 Deferred Error APIC interrupts
MCE: 0 0 0 0 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 213 212 212 212 212 212 212 212 212 212 212 212 Machine check polls
HYP: 0 0 0 0 0 0 0 0 0 0 0 0 Hypervisor callback interrupts
HRE: 0 0 0 0 0 0 0 0 0 0 0 0 Hyper-V reenlightenment interrupts
HVS: 0 0 0 0 0 0 0 0 0 0 0 0 Hyper-V stimer0 interrupts
ERR: 1
MIS: 0
PIN: 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt notification event
NPI: 0 0 0 0 0 0 0 0 0 0 0 0 Nested posted-interrupt event
PIW: 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt wakeup event
Code: Select all
cat /etc/security/limits.d/audio.conf
# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
# dpkg-reconfigure -p high jackd
@audio - rtprio 95
@audio - memlock unlimited
#@audio - nice -19
Being totally honest, I may have forgotten to switch into low latency on boot up yesterday afternoon.
I will change those settings and do tests all afternoon as I have time before Tuesday - it's just so weird that everything was ok for those first two. I checked the recordings last night expecting to do massive editing - but when loading the audio files, there were no glitches recorded oddly. (Even checking bits where I KNEW there was a glitch during one bit)
Going to get that xrun checker now.
Thank you so much again! (in anticipation!)
Kyle
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Hi Lad
So...
Using the tool you recommended, I can force xruns into the thousands - but I wasn't sure what else I was doing with program?
Altering the settings to lowest in JACK and gradually ramping them up, I can get
Sample rate - 48000
Period - 256
Buffer - 2
(If I go lower on the values, JACK won't even start)
I constantly swapped songs every second. moved from player to player and touch wood, no x-run errors. Leaving it running for an hour now to see what it does.
ETA - Bugger, forgot I was not in Low-Latency
So...
Using the tool you recommended, I can force xruns into the thousands - but I wasn't sure what else I was doing with program?
Altering the settings to lowest in JACK and gradually ramping them up, I can get
Sample rate - 48000
Period - 256
Buffer - 2
(If I go lower on the values, JACK won't even start)
I constantly swapped songs every second. moved from player to player and touch wood, no x-run errors. Leaving it running for an hour now to see what it does.
ETA - Bugger, forgot I was not in Low-Latency
-
- Established Member
- Posts: 45
- Joined: Thu Aug 16, 2018 8:31 pm
- Has thanked: 1 time
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Nice one!
OS: Debian 11 kernel: Liquorix
...trying out AV Linux
...trying out AV Linux
-
- Established Member
- Posts: 45
- Joined: Thu Aug 16, 2018 8:31 pm
- Has thanked: 1 time
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
How did the additional tests go?
OS: Debian 11 kernel: Liquorix
...trying out AV Linux
...trying out AV Linux
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Touch wood, no problems on Friday for 3 hours live, going to have one more go during a live show on Tuesday but fingers crossed it’s sorted
- 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: Getting Jack xrun errors - over/underrun?
Is it normal that the time value is so large?? I also got and xrun with -300 000 ms.merlyn wrote: ↑Sun May 17, 2020 3:56 pm Yes, that's the standard Xrun message.
You can see that hardly any CPU is being used, so this system does have a lot of potential. Setting up a new system may mean that you find new ways of doing things, like using the same device for input and output.
To see how that might work -- what software are you using, and what audio routing are you using that means using the internal soundcard is preferable?
-
- Established Member
- Posts: 45
- Joined: Thu Aug 16, 2018 8:31 pm
- Has thanked: 1 time
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Hey Kyle, how's your setup going? Btw, what's your show about if you don't mind sharing?
OS: Debian 11 kernel: Liquorix
...trying out AV Linux
...trying out AV Linux
-
- Established Member
- Posts: 74
- Joined: Sat May 16, 2020 8:24 pm
- Has thanked: 4 times
- Been thanked: 1 time
Re: Getting Jack xrun errors - over/underrun?
Hey Lad
I had a blip last week so I have been a bit reluctant to say it's totally fixed In terms of having to constantly jump back to a previous kernel, is there anything I can do to have the newest low latency one? (If that's possible?)
My show is a bit of fun really, stuff that's in the papers, callers, music (mainly classic and indie type stuff), bit of a music quiz - I've been going 4 years and people aren't switching off in their droves! On Sunday nights from 10 there's a new guy called Stuart from London who is amazing (but it is his day job!) If you ever want to do a show, let me know!
All my shows go on mixcloud under Kyle Rickards and Stuart's Sunday night one is on at 10 on the website (don't know if I can post links here)
Thank you for asking though!