Recommended order for XRuns Troubleshooting?
Moderators: MattKingUSA, khz
Recommended order for XRuns Troubleshooting?
I'm having very intrusive consistent xruns. ~50 over a couple minutes of playing back a simple loop.
I have a very beefy build. 5900x and 32gb of ram at 3600mhz, which should be more than capable of playing back a single loop without xruns. I also have very generous jack settings. 48khz sample size, buffer size of 256, and 3 periods/buffer. I have tried disabling wireless with `nmcli radio wifi off` but xruns persist. The realtime configuration script verifies that all of my settings are correct and nothing returns as 'bad'. (https://github.com/raboof/realtimeconfigquickscan). I'm totally lost. I have good hardware with a very low footprint environment and everything configured properly but I am suffering extreme xruns trying to do something incredibly simple...
What's the recommended order of operations from here?
I have a very beefy build. 5900x and 32gb of ram at 3600mhz, which should be more than capable of playing back a single loop without xruns. I also have very generous jack settings. 48khz sample size, buffer size of 256, and 3 periods/buffer. I have tried disabling wireless with `nmcli radio wifi off` but xruns persist. The realtime configuration script verifies that all of my settings are correct and nothing returns as 'bad'. (https://github.com/raboof/realtimeconfigquickscan). I'm totally lost. I have good hardware with a very low footprint environment and everything configured properly but I am suffering extreme xruns trying to do something incredibly simple...
What's the recommended order of operations from here?
- Toejam76
- Established Member
- Posts: 138
- Joined: Sat Jun 20, 2020 10:41 am
- Has thanked: 15 times
- Been thanked: 21 times
Re: Recommended order for XRuns Troubleshooting?
Your computer is certainly fast enough. You can get pretty decent latency out of a Raspberry Pi. If you are using an USB interface try another port.
My Scarlett Solo works without xruns connected as a single device connected to USB 2.0 hub, but not on an USB 3 hub for some reason. Maybe some IRQ is shared and causes problems. I have also disabled the compositor in KDE. Just guessing here, but maybe that helps.
My Scarlett Solo works without xruns connected as a single device connected to USB 2.0 hub, but not on an USB 3 hub for some reason. Maybe some IRQ is shared and causes problems. I have also disabled the compositor in KDE. Just guessing here, but maybe that helps.
- LAM
- Established Member
- Posts: 992
- Joined: Thu Oct 08, 2020 3:16 pm
- Has thanked: 141 times
- Been thanked: 349 times
Re: Recommended order for XRuns Troubleshooting?
One thing I "discovered" recently to drastically reduce Xruns on my system is having Hyperthreading (aka SMT in kernel speaking) disabled.
If your system uses it you can disable it:
In the BIOS, look for Hyperthreading options in your CPU settings
or
At boot adding "nosmt" to the Grub commandline (https://www.kernel.org/doc/html/latest/ ... eters.html)
or
At runtime with
If your system uses it you can disable it:
In the BIOS, look for Hyperthreading options in your CPU settings
or
At boot adding "nosmt" to the Grub commandline (https://www.kernel.org/doc/html/latest/ ... eters.html)
or
At runtime with
Code: Select all
echo off | sudo tee /sys/devices/system/cpu/smt/control
in mix, nobody can hear your screen
Re: Recommended order for XRuns Troubleshooting?
Thanks for the reply! I'll try another port in general, but currently it is the only one on its bus, so it's not sharing with anything else, and that hub is 2.0 :/Toejam76 wrote: ↑Thu Oct 21, 2021 6:40 am Your computer is certainly fast enough. You can get pretty decent latency out of a Raspberry Pi. If you are using an USB interface try another port.
My Scarlett Solo works without xruns connected as a single device connected to USB 2.0 hub, but not on an USB 3 hub for some reason. Maybe some IRQ is shared and causes problems. I have also disabled the compositor in KDE. Just guessing here, but maybe that helps.
Re: Recommended order for XRuns Troubleshooting?
I already had it disabled but I went back and double checked, also disabling it as a kernel parameter, but nothing helped. I can't even switch to pipewire just yet so I am stuck in this limbo of xruns.LAM wrote: ↑Thu Oct 21, 2021 6:56 am One thing I "discovered" recently to drastically reduce Xruns on my system is having Hyperthreading (aka SMT in kernel speaking) disabled.
If your system uses it you can disable it:
In the BIOS, look for Hyperthreading options in your CPU settings
or
At boot adding "nosmt" to the Grub commandline (https://www.kernel.org/doc/html/latest/ ... eters.html)
or
At runtime withCode: Select all
echo off | sudo tee /sys/devices/system/cpu/smt/control
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: Recommended order for XRuns Troubleshooting?
I've got a Ryzen 3900x and my system is working well. I got it earlier this year and over the time I've had it the performance has improved. My explanation is that it's kernel updates and updates to amd-ucode. The 3900x came out in 2019. That implies it has taken the Linux kernel two years to fully accommodate a 3900x. I'm on kernel 5.14.14.
If you could say some more about your system like distro, kernel, soundcard we may be able to suggest things to try.
If you could say some more about your system like distro, kernel, soundcard we may be able to suggest things to try.
Re: Recommended order for XRuns Troubleshooting?
Ah yes. I am on Debian bullseye with a 3rd gen scarlett 4i4. I have tried using the stock debian kernel (5.10) as well as a 5.14 kernel I compiled so I could have access to the scarlett drivers, with some low latency tweaks. Same issue on both.merlyn wrote: ↑Thu Oct 21, 2021 3:52 pm I've got a Ryzen 3900x and my system is working well. I got it earlier this year and over the time I've had it the performance has improved. My explanation is that it's kernel updates and updates to amd-ucode. The 3900x came out in 2019. That implies it has taken the Linux kernel two years to fully accommodate a 3900x. I'm on kernel 5.14.14.
If you could say some more about your system like distro, kernel, soundcard we may be able to suggest things to try.
Re: Recommended order for XRuns Troubleshooting?
Jack is being started with RT priority of 60 already :/ ALso have audio group given unlimited memlock and rt prior max of 85 in /etc/security/limits.conf
Sadly, my motherboard does not have sound for headphones. Any advice on parsing through /proc/interrupts ? lsusb -tv shows this in regards to my soundcard.
Code: Select all
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 1: Dev 2, If 0, Class=Audio, Driver=snd-usb-audio, 480M
ID 1235:8212 Focusrite-Novation
|__ Port 1: Dev 2, If 1, Class=Audio, Driver=snd-usb-audio, 480M
ID 1235:8212 Focusrite-Novation
|__ Port 1: Dev 2, If 2, Class=Audio, Driver=snd-usb-audio, 480M
ID 1235:8212 Focusrite-Novation
|__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=, 480M
ID 1235:8212 Focusrite-Novation
|__ Port 1: Dev 2, If 4, Class=Audio, Driver=snd-usb-audio, 480M
ID 1235:8212 Focusrite-Novation
|__ Port 1: Dev 2, If 5, Class=Audio, Driver=snd-usb-audio, 480M
ID 1235:8212 Focusrite-Novation
- sunrat
- Established Member
- Posts: 925
- Joined: Wed Jul 22, 2020 2:08 pm
- Has thanked: 152 times
- Been thanked: 247 times
Re: Recommended order for XRuns Troubleshooting?
There is a huge topic about development with your interface - viewtopic.php?f=6&t=20669
I also use Bullseye but with an old M-Audio 2496 PCI card. I found the Debian kernels, even the RT one, were fairly rubbish for audio. I get good results with Liquorix kernel - https://liquorix.net/ their current most recent is linux-image-5.14.0-13.1-liquorix-amd64 (you need to set threadirqs as a kernel parameter for best results).
- thetotalchaos
- Established Member
- Posts: 212
- Joined: Mon Sep 29, 2014 8:29 pm
- Has thanked: 55 times
- Been thanked: 9 times
- Contact:
Re: Recommended order for XRuns Troubleshooting?
The proprietary NVidia drivers, can mess up your realtime priorities.
Also on Debian the stock kernel does not have the PREEMPT option enabled. You should use the Linux-RT or something that has the option.
Also on Debian the stock kernel does not have the PREEMPT option enabled. You should use the Linux-RT or something that has the option.
You can listen to my music at: https://totalchaos-music.bandcamp.com/
Take a journey to wonderland with The Butterfly Effect 2016
https://totalchaos-music.bandcamp.com/a ... fly-effect
Take a journey to wonderland with The Butterfly Effect 2016
https://totalchaos-music.bandcamp.com/a ... fly-effect