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: 5ae1c03d77 ("module-rt: small fixes")
This commit is contained in:
Maxim Mikityanskiy 2022-09-08 20:03:53 +03:00
parent 70c314f254
commit 853a1c0ba8

View file

@ -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