check_realtime_privileges(): Can't set rt prio to 88: Operation not permitted (try increasing rlimits)
I'm trying to get pipewire to run with realtime priority.
$ PIPEWIRE_DEBUG=5 pipewire
...
[I][12603.799702] pw.conf | [ conf.c: 953 pw_context_conf_section_for_each()] handle override '/Users/atemu/.config/pipewire/pipewire.conf.d/test.conf' section 'context.modules'
[I][12603.799709] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0x55f27b2551a0: name:libpipewire-module-rt args:{
nice.level = -11
rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
}
[D][12603.799716] pw.module | [ impl-module.c: 167 pw_context_load_module()] moduledir set to: /nix/store/7zblgkp9iakf9hh21xzq9g397h9zf2ff-pipewire-0.3.68-lib/lib/pipewire-0.3
[D][12603.799723] pw.module | [ impl-module.c: 177 pw_context_load_module()] trying to load module: libpipewire-module-rt (/nix/store/7zblgkp9iakf9hh21xzq9g397h9zf2ff-pipewire-0.3.68-lib/lib/pipewire-0.3/libpipewire-module-rt.so) args({
nice.level = -11
rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
})
[D][12603.799732] pw.global | [ global.c: 88 pw_global_new()] 0x55f27b298ba0: new PipeWire:Interface:Module 29
[D][12603.799738] mod.rt | [ module-rt.c: 966 pipewire__module_init()] module 0x55f27b2db2a0: new
[I][12603.799745] mod.rt | [ module-rt.c: 610 check_realtime_privileges()] Can't set rt prio to 88: Operation not permitted (try increasing rlimits)
[I][12603.799778] mod.rt | [ module-rt.c: 640 set_nice()] main thread nice level set to -11
[I][12603.803584] mod.rt | [ module-rt.c: 640 set_nice()] main thread nice level set to -11
[D][12603.803696] mod.rt | [ module-rt.c: 661 set_rlimit()] clamping rt.time.soft from 18446744073709551615 to 200000 because of RTKit
[D][12603.803715] mod.rt | [ module-rt.c: 677 set_rlimit()] rt.time.soft:200000 rt.time.hard:200000
[D][12603.803727] pw.module | [ impl-module.c: 363 pw_impl_module_update_properties()] 0x55f27b298970: updated 4 properties
[D][12603.803738] pw.module | [ impl-module.c: 363 pw_impl_module_update_properties()] 0x55f27b298970: updated 2 properties
[D][12603.803750] mod.rt | [ module-rt.c: 1057 pipewire__module_init()] initialized using RTKit
[D][12603.803760] pw.global | [ global.c: 164 pw_global_register()] 0x55f27b298ba0: registered 29
[D][12603.803771] pw.module | [ impl-module.c: 256 pw_context_load_module()] 0x55f27b298970: loaded module: libpipewire-module-rt
[I][12603.803781] pw.conf | [ conf.c: 582 load_module()] 0x55f27b2551a0: loaded module libpipewire-module-rt
...
$ chrt -p $(pidof -o $(pidof pipewire-pulse) pipewire)
pid 47742's current scheduling policy: SCHED_OTHER|SCHED_RESET_ON_FORK
pid 47742's current scheduling priority: 0
But I can run chrt 88 echo test
just fine and the echo
command does get rt prio.
$ ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127949
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 99
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 127949
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
$ cat /proc/$(pidof -o $(pidof pipewire-pulse) pipewire)/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 127949 127949 processes
Max open files 1024 524288 files
Max locked memory 8388608 8388608 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 127949 127949 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 99 99
Max realtime timeout 200000 200000 us
What's going on? Am I doing something wrong?
$ pipewire --version
pipewire
Compiled with libpipewire 0.3.68
Linked with libpipewire 0.3.68