LIBPIPEWIRE-MODULE-RT(7)

✨ libpipewire-module-rt ✨

okay bestie, welcome to the manual page for libpipewire-module-rt(7) β€” it lives in the Miscellaneous Information Manual section, and it's literally the module that hands out real-time priorities like they're VIP passes. 🎟️✨


πŸ’– NAME πŸ’–

libpipewire-module-rt β€” RT πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the rt modules? their whole thing is giving real-time priorities to processing threads. that's it, that's the job. πŸ‘‘

It uses the operating system's scheduler to enable realtime scheduling for certain threads, all so your low latency audio processing can slay without stuttering. 🎧✨

but WAIT β€” this requires RLIMIT_RTPRIO to be set to a value that's equal to this module's rt.prio parameter or higher. no cap. πŸ’€

Most distros will come with some package that configures this for certain groups or users β€” so like, check first, bestie. 🫢

If this is not set up and DBus is available, then this module will fall back to using the Portal Realtime DBus API or RTKit. iconic backup plan honestly. 🌈


πŸŽ€ MODULE NAME πŸŽ€

libpipewire-module-rt


πŸ’… MODULE OPTIONS πŸ’…

  • nice.level β€” the nice value set for the application thread. it improves performance of the communication with the pipewire daemon. πŸ’–
  • rt.prio β€” the realtime priority of the data thread. higher values are higher priority. ⬆️πŸ”₯
  • rt.time.soft, rt.time.hard β€” the amount of CPU time an RT thread can consume without doing any blocking calls before the kernel kills the thread. yes, literally murders it. this is a safety measure to avoid lockups of the complete system when some thread consumes 100%. 😭🚨
  • rlimits.enabled β€” enable the use of rtlimits, default true. βœ…
  • rtportal.enabled β€” enable the use of realtime portal, default true. βœ…
  • rtkit.enabled β€” enable the use of rtkit, default true. βœ…
  • uclamp.min β€” the minimum utilisation value the scheduler should consider. πŸ“‰
  • uclamp.max β€” the maximum utilisation value the scheduler should consider. πŸ“ˆ

The nice level is by default set to an invalid value so that clients don't automatically have the nice level raised. protect the vibes, don't touch the nice level without asking πŸ›‘

The PipeWire server processes are explicitly configured with a valid nice level.


🧚 CONFIG OVERRIDE 🧚

A module.rt.args config section can be added to override the module arguments. yes ma'am, you can just drop in your own. πŸ’œ

# ~/.config/pipewire/pipewire.conf.d/my-rt-args.conf

module.rt.args = {
    #nice.level = 22
}

🌸 EXAMPLE CONFIGURATION 🌸

here's the whole look, head to toe πŸ‘‘:

context.modules = [
{   name = libpipewire-module-rt
    args = {
        #nice.level   = 20
        #rt.prio      = 88
        #rt.time.soft = -1
        #rt.time.hard = -1
        #rlimits.enabled = true
        #rtportal.enabled = true
        #rtkit.enabled = true
        #uclamp.min = 0
        #uclamp.max = 1024
    }
    flags = [ ifexists nofail ]
}
]

and that's the whole page bestie, you ate it fr fr πŸ’…βœ¨ periodt πŸŽ€

cute little sign-off: this is from PipeWire version 1.6.11, and yeah it's libpipew...module-rt(7) β€” that's the truncated one, iykyk 😭🫢
πŸ“¦ where this page comes from