... | @@ -9,19 +9,19 @@ To avoid xruns and other hiccups while processing audio, there are some configur |
... | @@ -9,19 +9,19 @@ To avoid xruns and other hiccups while processing audio, there are some configur |
|
On recent kernels configured with PREEMPT_DYNAMIC, you can boot the kernel with and extra
|
|
On recent kernels configured with PREEMPT_DYNAMIC, you can boot the kernel with and extra
|
|
`preempt=full` option.
|
|
`preempt=full` option.
|
|
|
|
|
|
You could also try to install a realtime kernel for your distro.
|
|
You could also try to install a realtime kernel for your distribution.
|
|
|
|
|
|
Kernel 5.16 brings important latency improvements for USB devices. It also includes some important samplerate fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1547 .
|
|
Kernel 5.16 brings important latency improvements for USB devices. It also includes some important samplerate fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1547 .
|
|
|
|
|
|
# Realtime scheduling
|
|
# Realtime Scheduling
|
|
|
|
|
|
Realtime priorities are given to the data processing threads in both the clients and the server.
|
|
Realtime priorities are given to the data processing threads in both the clients and the server.
|
|
|
|
|
|
Since 0.3.44 there is a single module-rt that can use RTKit and fall back to native thread implementation automatically.
|
|
Since 0.3.44 there is a single module-rt that can use RTKit and fall back to native thread implementation automatically.
|
|
|
|
|
|
The RTKit implementation is potentially better because it can implement a global policy and does not require extra permissions from the client. It however needs DBus and is currently not configured optimally in many distributions. It also does not work with flatpaks because it does not know about the namespace of the thread ids in the sandbox.
|
|
The RTKit implementation is potentially better because it can implement a global policy and does not require extra permissions from the client. It however needs DBus and is currently not configured optimally in many distributions. It also does not work with flatpaks because it does not know about the namespace of the thread ID's in the sandbox.
|
|
|
|
|
|
# Config
|
|
# Configuration
|
|
|
|
|
|
The configuration of the realtime priorities and the implementation can be done in the different server and client config files:
|
|
The configuration of the realtime priorities and the implementation can be done in the different server and client config files:
|
|
|
|
|
... | @@ -43,13 +43,13 @@ Real-time priority limits are usually stored in `/etc/security/limits.conf` and |
... | @@ -43,13 +43,13 @@ Real-time priority limits are usually stored in `/etc/security/limits.conf` and |
|
@pipewire - priority -19
|
|
@pipewire - priority -19
|
|
@pipewire - memlock 4194304
|
|
@pipewire - memlock 4194304
|
|
```
|
|
```
|
|
Then add your user to the pipewire group so that you can use these priorities.
|
|
Then add your user to the PipeWire group so that you can use these priorities.
|
|
|
|
|
|
# RTkit
|
|
# RTkit
|
|
|
|
|
|
RTKit can be configured by passing extra arguments to the `/usr/libexec/rtkit-daemon` process. You can try `/usr/libexec/rtkit-daemon --help` to see the options.
|
|
RTKit can be configured by passing extra arguments to the `/usr/libexec/rtkit-daemon` process. You can try `/usr/libexec/rtkit-daemon --help` to see the options.
|
|
|
|
|
|
Depending on the distro, you would do something like this:
|
|
Depending on the distribution, you would do something like this:
|
|
|
|
|
|
* Make `/usr/lib/systemd/system/rtkit-daemon.service.d/limits.conf` with:
|
|
* Make `/usr/lib/systemd/system/rtkit-daemon.service.d/limits.conf` with:
|
|
|
|
|
... | | ... | |