From 853a1c0ba8c98f84f1afa902efc97eb7d72f9095 Mon Sep 17 00:00:00 2001 From: Maxim Mikityanskiy Date: Thu, 8 Sep 2022 20:03:53 +0300 Subject: [PATCH] module-rt: Fix setting realtime priority with rtkit The commit cited below mistakenly removed the set_rlimit call from under `if (impl->use_rtkit)`, saying it doesn't have an rtkit implementation. However, this function does call rtkit, so it has to be called in the rtkit flow, otherwise pipewire fails to set the realtime priority, printing the following error message: mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied mod.rt: could not make thread #### realtime using RTKit: Permission denied Fixes: 5ae1c03d771f ("module-rt: small fixes") --- src/modules/module-rt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c index 0ee3463d2..2122a9b7a 100644 --- a/src/modules/module-rt.c +++ b/src/modules/module-rt.c @@ -1007,9 +1007,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args) goto error; } } - /* Retry set_nice with rtkit */ + /* Retry set_nice and set_rlimit with rtkit */ if (IS_VALID_NICE_LEVEL(impl->nice_level)) set_nice(impl, impl->nice_level, true); + set_rlimit(impl); } #endif