From 896562580fe65913832e01674544b48e377d6339 Mon Sep 17 00:00:00 2001 From: Marc Ferland Date: Wed, 5 Nov 2025 10:10:09 -0500 Subject: [PATCH] kwin: allow kwin to set real-time thread priotiry KWin supports setting RT thread priorities to improve rendering and input processing speed when the system is under load for example. It should also result in a smoother experience in general. As an added bonus, we also get rid of this warning: kwin_wayland_wrapper[1016]: Failed to gain real time thread priority (See CAP_SYS_NICE in the capabilities(7) man page). error: Operation not permitted See: https://blog.martin-graesslin.com/blog/2017/09/kwinwayland-goes-real-time/ Signed-off-by: Marc Ferland --- recipes-plasma/kwin.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-plasma/kwin.inc b/recipes-plasma/kwin.inc index db01469..6423592 100644 --- a/recipes-plasma/kwin.inc +++ b/recipes-plasma/kwin.inc @@ -36,6 +36,7 @@ DEPENDS:class-target = " \ kxmlgui \ lcms \ libdisplay-info \ + libcap \ libei \ libinput \ libplasma \ @@ -88,6 +89,11 @@ do_install:append() { install -m 644 ${UNPACKDIR}/kwinrc ${D}/${sysconfdir}/xdg/kwinrc } +pkg_postinst:${PN} () { + setcap cap_sys_nice+ep "$D/${bindir}/kwin_wayland" +} +PACKAGE_WRITE_DEPS += "libcap-native" + FILES_SOLIBSDEV = "" FILES:${PN} += " \ ${datadir}/config.kcfg/*.kcfg \