feat(just): Add setup-realtime #2938
Draft
+14
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Configures the system for realtime task scheduling, sacrificing some performance for consistent latencies — useful primarily for audio engineering and production applications on the desktop. This should allow audio processing to be scheduled with very tight latencies — in the single digit millisecond range — without crackling or other forms of distortion (known in the Linux audio space as Xruns).
In the aforementioned use cases, even just a dozen milliseconds could disrupt the user in playing a MIDI instrument for sequencing, monitoring a microphone's output through headphones, or simply playing back complex audio projects.
Implementation
Fedora maintains a realtime-setup package, layered by this script with
--apply-live
to enable its included systemd services. The udev rules added for threadirqs and/dev/rtc
access are given to therealtime
group, which currently needs to be explicitly added to/etc/groups
in Atomic Fedora.As PREEMPT_RT has been in the mainline Linux kernel since 6.12, the only change required to equate modern kernels to the former RT kernel builds is the inclusion of the
threadirqs
kernel argument; given Bazzite enables full preemption by default.Development Note (Work in Progress)
This is currently in a proof of concept stage. I still plan on adding an installation prompt along with a reversal script.
Supersedes #1726.