Linux DJ
Kernel configuration screen with preemption options highlighted
Low Latency·/latency/

Linux PREEMPT_RT for Audio: Check Your Kernel and Test It

A full preemption setting does not establish that you are running PREEMPT_RT. Check the running kernel configuration and test the audio workload before deciding whether a different kernel helps.

Read the running kernel, not the package name

Linux 6.12 brought the mainline real-time option to supported builds; it did not make every later kernel a real-time kernel. PREEMPT_RT makes more kernel paths preemptible and moves many interrupt handlers into schedulable threads. That gives a time-sensitive audio thread a chance to run sooner when kernel work would otherwise block it. It does not increase the time available in a graph cycle or remove an interface's safety buffer.

uname -r
cat /proc/cmdline
if test -r "/boot/config-$(uname -r)"; then
  grep -E '^(CONFIG_PREEMPT_RT=|# CONFIG_PREEMPT_RT is not set|CONFIG_PREEMPT_DYNAMIC=)' "/boot/config-$(uname -r)"
elif test -r /proc/config.gz; then
  zcat /proc/config.gz | grep -E '^(CONFIG_PREEMPT_RT=|# CONFIG_PREEMPT_RT is not set|CONFIG_PREEMPT_DYNAMIC=)'
fi

Look for CONFIG_PREEMPT_RT=y in the matching config. If neither file is available, use the distribution's config for the exact running build. A missing file or grep result is not positive evidence either way. CONFIG_PREEMPT_DYNAMIC and a runtime preempt=full setting are separate from an RT build. The kernel documentation on real-time preemption explains what changes inside the kernel. Ubuntu Studio 26.04 uses a generic kernel with low-latency boot parameters; see the Ubuntu Studio setup and version checks for what to inspect locally.

What a kernel change will not fix

Observed failureTest before changing kernels
One project breaks when an effect is enabledBypass that effect and replay the same passage at the same rate and quantum.
Device disappears after idleCompare enumeration and device messages around the event; separate runtime USB power management from system suspend.
Normal graph operation but delayed monitoringCheck the monitoring route and plugin compensation; measure physical delay if needed.
Intermittent stalls despite a simple, connected graphCapture the graph and collect wake-up timing under the same workload. Look for a repeatable difference, not a single coincident outlier.

The kernel configuration and the audio threads' actual policy are two separate checks. Even on an RT build, an audio process may not receive the scheduling treatment it expects. Inspect the processing thread, not just the service's main thread. Keep the distribution's default priorities until you establish which thread, interrupt or dependency is late. Running every process at a higher priority is not a diagnosis and can starve work the audio graph needs.

Avoid tuning CPU affinity, frequency policy and device power at the same time. Compare a laptop under the same mains/battery and thermal conditions. If a USB change seems to help, verify that the same port, interface and rate were used. If you cannot keep those conditions steady, describe the difference as a configuration comparison rather than attributing it to preemption.

Compare the failure you need to fix

First check the active audio driver, graph period, routing and error deltas. If the device is silent or the graph is overloaded by a plugin, a new kernel is not the first diagnostic step. For suspected scheduling delays, the latency measurement guide distinguishes timer wake-up delay from the audio graph and the physical signal path.

If you try an RT kernel, keep the known working boot entry. Hold interface, firmware, stack, sample rate, quantum, plugin settings and workload steady. Repeat runs with logged versions and background activity, and report the spread, counter resets and audible failures. Test external kernel modules before trusting the alternate build for a performance. Do not raise real-time priorities indiscriminately; a scheduler change is not a substitute for diagnosing why a node misses its deadline.

For a useful comparison, boot the known working kernel, test the same project and save the observed settings, then repeat after booting the candidate. Include startup, reconnect and a sustained run, not just idle cyclic timing. Return to the first kernel for another trial if the result changes; it helps distinguish the kernel from temperature or changing workloads. An improvement in scheduler timing is useful diagnostic evidence, but keep the candidate only if the actual audio problem improves and the rest of the rig still works.

No numerical performance comparison is reported here: matched per-run evidence is not available. Use an RT kernel if it resolves a reproduced failure without costing you another required capability, not because its name implies better audio.

  • PREEMPT_RT
  • Linux Kernel
  • Low Latency
  • Linux Audio
  • 2026

Related Notes

← All notes