The smaller the Audio Buffer you select in Mixxx's Sound Hardware Preferences, the faster you will hear changes when you manipulate controls in Mixxx, on a controller, or with timecode vinyl. However, lowering it beyond what your system can handle will cause audible glitches (pops). Here are some tips to configure your system to handle lower latency audio:
In Preferences > Sound hardware, if there is a link to this page, Mixxx is not running with real time priority. To enable Mixxx to run with real time priority, you wil need to set up your kernel and scheduling permissions.
To use real time scheduling, you will either need to boot Linux with the “threadirqs” parameter or use a kernel with the realtime patch set. To always boot with the “threadirqs” kernel argument, add it to your grub.cfg by editing /etc/default/grub as root, adding “threadirqs” to the line for GRUB_CMDLINE_LINUX, then generate a new grub.cfg file. On most distributions, do this by running
grub-mkconfig -o /boot/grub/grub.cfg. On Fedora, run
grub2-mkconfig -o /boot/grub2/grub.cfg if you boot with BIOS (legacy) or
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg if you boot with EFI (if /boot/efi does not exist, you boot with BIOS). Reboot. Check that you have booted with the “threadirqs” kernel parameter by running
grep threadirqs /proc/cmdline. If you booted with the “threadirqs” kernel parameter, all the parameters you booted with will be printed. If there is no output, you did not boot with the “threadirqs” kernel parameter.
To use a kernel with the realtime patch set, Fedora users can install the kernel-rt package from the Planet CCRMA repository. Ubuntu users can install the kernel-rt or kernel-lowlatency packages. Crossfade and Ubuntu Studio are distributions that come with a realtime patched kernel. Note that kernels with the realtime patch set may have some stability issues.
Enabling real time scheduling in your kernel will only have an effect if your user has permission to run Mixxx with realtime priority. Set the maximum rtprio for your user by editing
/etc/security/limits.conf as root and add
<your user name> - rtprio 99 to allow Mixxx (and other processes you run) to increase their thread priority to maximum. Reboot for this to take effect.
IRQs (interrupt requests) allow devices to get the operating system kernel's attention. You can improve the audio performance of your computer by configuring your OS to give more attention to your sound card than other devices. This will not have any effect unless you have enabled realtime scheduling in your kernel as described above.
The easiest way to raise the IRQ priority of your sound card is by installing rtirq and setting it to run on boot. To set rtirq to run on boot on distributions using systemd (which is most distros), run
systemctl enable rtirq as root. Check that rtirq set your IRQ priorities correctly by running
rtirq status. The IRQ for your sound card will end in ehci_hcd for devices plugged into USB 2.0 ports and xhci_hcd for USB 3.0 ports. If it is not a USB sound card, look for “snd” in the last column. This should be above other IRQs listed by
rtirq status. The configuration file for rtirq is located at
/etc/sysconfig/rtirq in Fedora and
/etc/default/rtirq in Ubuntu. If you use a USB sound card, you may want to put “usb” in front of “snd” in the RTIRQ_NAME_LIST in rtirq's configuration file (or remove “snd”) to give your USB sound card higher priority than your onboard sound card.
To set IRQ priorities manually, see this guide.
CPU frequency scaling is a main cause of Mixxx skipping on laptops. You can disable it by running this shell script as root:
for i in /sys/devices/system/cpu/cpu[0-9]*; do echo performance >$i/cpufreq/scaling_governor; done
The CPU governor will be reset when rebooting your computer. To run this every time your computer boots, save the above shell script to /etc/rc.d/rc.local and set that file to be executable
chmod +x /etc/rc.d/rc.local (this should work even on distributions using systemd). Note that this will run through your battery's charge much faster.
This utility polls for smart cards every few seconds, and when it does, it can cause Mixxx's audio to skip, even with the latency set really high.
For more tips, see Windows Vista Tuning Tips for Audio Processing from Native Instruments (this information applies to versions of Windows newer than Vista as well).
Raise the priority of Mixxx. While Mixxx is running, open Terminal and run
sudo renice -20 `pidof mixxx` (your user must be in
If you know of any more tips for reducing audio latency in Mac OS X, please edit this page and add them here.