... | @@ -47,6 +47,8 @@ Then add your user to the PipeWire group so that you can use these priorities. |
... | @@ -47,6 +47,8 @@ Then add your user to the PipeWire group so that you can use these priorities. |
|
|
|
|
|
# RTkit
|
|
# RTkit
|
|
|
|
|
|
|
|
## For Red Hat/Arch Based Distributions
|
|
|
|
|
|
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 distribution, you would do something like this:
|
|
Depending on the distribution, you would do something like this:
|
... | @@ -77,6 +79,65 @@ RTKIT_ARGS="--scheduling-policy=FIFO |
... | @@ -77,6 +79,65 @@ RTKIT_ARGS="--scheduling-policy=FIFO |
|
--canary-watchdog-msec=60000
|
|
--canary-watchdog-msec=60000
|
|
"
|
|
"
|
|
```
|
|
```
|
|
|
|
|
|
|
|
## For Debian/Ubuntu Based Distributions
|
|
|
|
|
|
|
|
* Edit `/lib/systemd/system/rtkit-daemon.service` with `systemctl edit rtkit-daemon.service` and add changes like so:
|
|
|
|
|
|
|
|
```systemd
|
|
|
|
# This file is part of RealtimeKit.
|
|
|
|
#
|
|
|
|
# Copyright 2010 Lennart Poettering
|
|
|
|
#
|
|
|
|
# RealtimeKit is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# RealtimeKit is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with RealtimeKit. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=RealtimeKit Scheduling Policy Service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
EnvironmentFile=/etc/dbus-1/system.d/rtkit
|
|
|
|
ExecStart=/usr/libexec/rtkit-daemon $RTKIT_ARGS
|
|
|
|
Type=dbus
|
|
|
|
BusName=org.freedesktop.RealtimeKit1
|
|
|
|
NotifyAccess=main
|
|
|
|
CapabilityBoundingSet=CAP_SYS_NICE CAP_DAC_READ_SEARCH CAP_SYS_CHROOT CAP_SETGID CAP_SETUID
|
|
|
|
PrivateNetwork=yes
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=graphical.target
|
|
|
|
```
|
|
|
|
|
|
|
|
* Make `/etc/dbus-1/system.d/rtkit` with:
|
|
|
|
|
|
|
|
```ini
|
|
|
|
RTKIT_ARGS="--scheduling-policy=FIFO
|
|
|
|
--our-realtime-priority=89
|
|
|
|
--max-realtime-priority=88
|
|
|
|
--min-nice-level=-19
|
|
|
|
--rttime-usec-max=2000000
|
|
|
|
--users-max=100
|
|
|
|
--processes-per-user-max=1000
|
|
|
|
--threads-per-user-max=10000
|
|
|
|
--actions-burst-sec=10
|
|
|
|
--actions-per-burst-max=1000
|
|
|
|
--canary-cheep-msec=30000
|
|
|
|
--canary-watchdog-msec=60000
|
|
|
|
"
|
|
|
|
```
|
|
|
|
|
|
|
|
Reboot.
|
|
|
|
|
|
# ALSA
|
|
# ALSA
|
|
|
|
|
|
ALSA USB devices can be tuned for latency with the `api.alsa.period-size` property.
|
|
ALSA USB devices can be tuned for latency with the `api.alsa.period-size` property.
|
... | @@ -118,4 +179,4 @@ The `pw-profiler` tool can be used to collect statistics about PipeWire and turn |
... | @@ -118,4 +179,4 @@ The `pw-profiler` tool can be used to collect statistics about PipeWire and turn |
|
|
|
|
|
Check [here](Performance) for some performance measurements.
|
|
Check [here](Performance) for some performance measurements.
|
|
|
|
|
|
See also [here](https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/698) for more information. |
|
See also [here](https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/698) for more information. |
|
|
|
\ No newline at end of file |