Hacker News new | past | comments | ask | show | jobs | submit login

PipeWire will use SCHED_RR automatically, but Linux mainline is pretty bad at actually delivering consistently low scheduling latency.

As an alternative to increasing latency, especially if you're not running on batteries, try linux-rt. (PREEMPT_RT).

It makes scheduling latency decent. On my machines, the max column in rt-test cyclictest, after running for a day, remains at <100µs, whereas if I use mainline it easily goes to ms range within a minute or two, and I've seen it go as high as 30ms.

linux-rt patchset is slowly getting merged into mainline. I am hopeful that at some point we will be able to build it with PREEMPT_RT, and that desktop kernels in distributions will do that.




Debian has Linux RT builds, so I could use those, but really the change in quantum isn't noticeable at all. I just need to figure out how to configure pipewire to keep it at that value instead of reverting after restarts.


With its 30ms scheduling latency peaks (guaranteed xrun), I've found mainline is simply not capable of audio in any reasonable form.

If you do audio at all and run Linux, I can't recommend PREEMPT_RT enough.


Fedora has started considering the switch to a fully preemptible kernel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: