Bug 515140 - KWin can't start in realtime priority via RTKit - Operation not permitted
Summary: KWin can't start in realtime priority via RTKit - Operation not permitted
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: git master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-26 23:34 UTC by Ángel Navarro
Modified: 2026-01-27 14:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ángel Navarro 2026-01-26 23:34:25 UTC
SUMMARY
KWin tries to start in realtime priority, but it can't despite this file being present:

aur/kwin-hifps-git [master●] » cat /etc/security/limits.d/99-realtime.conf
@realtime   -   rtprio     95
@realtime   -   memlock    unlimited

and my own user present in realtime group. ulimit -r output is 0 and rtkit doesn't automatically give it permission to start in realtime mode despite other threads being in realtime:

ene 26 16:01:23 malasdecisiones rtkit-daemon[154398]: Successfully made thread 173756 of process 173601 owned by '1000' RT at priority 20.


STEPS TO REPRODUCE
1. Launch `kwin-wayland --replace`

OBSERVED RESULT
It can't get RT priority.

EXPECTED RESULT
It should take RT priority at launch.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: Git Master as of 26/01/26
KDE Frameworks Version: Git Master as of 26/01/26
Qt Version: Git Master as of 26/01/26

ADDITIONAL INFORMATION
I'm using plasma-login-manager for login.
Comment 1 Ángel Navarro 2026-01-27 07:43:15 UTC
By the way, I discovered it because this is the first thing kwin_wayland --replace prints:

~ » kwin_wayland --replace
Failed to gain real time thread priority (See CAP_SYS_NICE in the capabilities(7) man page). error: Operation not permitted

This is with an untouched security.d directory, which means that Arch Linux's Plasma can't run on realtime by default, leading to this error.
Comment 2 Arjen Hiemstra 2026-01-27 14:31:37 UTC
"Git Master" sounds like a self-compiled version of KWin. This likely means the executable does not have `cap_sys_nice` set, as the error message mentions. This is not really something we can change, as the only way to set that is to execute `setcap`, which requires root. I'll note though, that the kwin_wayland from Arch Linux's beta packages works fine and seems to be able to acquire realtime priority just fine. So this most likely is an issue with how you're building KWin.