Tell Linux to schedule osu! as real-time using RealtimeKit #35413
-
|
RealtimeKit (or This is worth doing on desktop systems as it would help keep latency low under system load, with an easy fallback route: No D-Bus access or no RealtimeKit service = silently give up and use the scheduling we're given. To avoid clobbering the real-time scheduler, this feature would only be activated by using the "Multithreaded" backend setting. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi there, I did some digging on this as I've previously worked on osu!'s audio backend, and I was personally interested in this idea. From what I've found, it seems like osu! does already request real-time privileges, although to an extent. Pipewire and Pulseaudio both automatically use rtkit to elevate their threads to realtime. However, osu!'s audio library, BASS, only outputs audio on linux via ALSA. Therefore to ensure realtime audio is available, one must ensure they have an ALSA compatibility layer installed (e.g. pipewire-alsa, pulseaudio-alsa), and that they're outputting to either one (pipewire would be named While we can add functionality for osu! to request realtime privileges, this would only be useful if the user is directly outputting to ALSA (via selecting a device other then pipewire/pulse in the audio settings). And to be frank I feel like this is a bit of a scope reach, since ideally BASS should be doing that for us. I believe it would be better to add the pipewire/pulse compatibility layers as suggested packages on the distro packages, and prioritize using them by default if installed, rather than manually calling rtkit. Let me know what you think of this. |
Beta Was this translation helpful? Give feedback.
Hi there, I did some digging on this as I've previously worked on osu!'s audio backend, and I was personally interested in this idea. From what I've found, it seems like osu! does already request real-time privileges, although to an extent.
Pipewire and Pulseaudio both automatically use rtkit to elevate their threads to realtime. However, osu!'s audio library, BASS, only outputs audio on linux via ALSA.
Therefore to ensure realtime audio is available, one must ensure they have an ALSA compatibility layer installed (e.g. pipewire-alsa, pulseaudio-alsa), and that they're outputting to either one (pipewire would be named
Pipewire Audio Server)While we can add functionality for osu! to reque…