Skip to content

RFC: wayland: Make wrapper process set realtime scheduling (Proposal №2)

Vlad Zahorodnii requested to merge work/zzag/realtime-scheduler into master

On Wayland, kwin uses realtime scheduling. To accomplish that, the executable has to have CAP_SYS_NICE capability.

The problem with setting CAP_SYS_NICE capability is that it effectively kills secure_getenv(). This creates issues in libxkbcommon, which uses the secure_getenv() function to initialize lookup paths.

With this change, the wrapper process will set realtime scheduling. Because kwin_wayland won't need CAP_SYS_NICE, secure_getenv() will work as expected. The main disadvantage of this approach is that only the main thread will have RR scheduling.

The wrapper process doesn't need to drop the nice capability because it won't cross the exec() boundary.

Edited by Vlad Zahorodnii

Merge request reports