First, I installed the Liquorix kernel, which is specially built for these kind of high-performance low-latency situations: https://liquorix.net/
Then I implemented some-but-not-all of the suggestions at https://wiki.linuxaudio.org/wiki/system_configuration. That document is pretty dated, but still contains a lot of good information. These are the steps I took:
1. In the LinuxAudio doc, it suggests using QuickScan, but the current tool is actually rtcqs from https://codeberg.org/rtcqs/rtcqs. I downloaded and unpacked that, then cd'ed into the new directory and ran:
Code: Select all
./rtcqs2. In /etc/default/grub, I modified the GRUB_CMDLINE_LINUX_DEFAULT line to look like this:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash threadirqs mitigations=off"Code: Select all
update-grubCode: Select all
echo -n performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor4. I created a PulseAudio configuration file at ~/.config/pulse/client.conf and included this line to prevent PA from respawning:
Code: Select all
autospawn = no5. In /usr/local/bin/audio-setup I added another line:
Code: Select all
pulseaudio -k6. At the end of /etc/sysctl.conf, I added these two lines, which tell the kernel to be less swap-happy, and increases the number of files the system can monitor for changes:
Code: Select all
vm.swappiness = 10
fs.inotify.max_user_watches = 524288
After doing all that, my latency went from more than 85ms down to just 2.7ms. I can work with that, but if you need even more speed, there are still plenty of suggestions to follow in the LinuxAudio guide I linked to earlier.
Last but not least... My workstation is a desktop computer with an 8-core AMD 3800X processor. It's water-cooled with a huge 3-fan radiator which almost never needs to run. It's worth spending a few extra bucks on your motherboard...mine makes it easy to do two things: 1) I've been running that processor overclocked to 4.5GHz, and 2) I can create a "performance curve" for the water cooler so the fans are essentially silent at low temperatures and only run audibly if the system starts to stress. With that much processor power, that rarely happens.