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 <marc.ferland@sonatest.com>
This commit is contained in:
Marc Ferland
2025-11-05 10:10:09 -05:00
parent edeb275b9c
commit 896562580f

View File

@@ -36,6 +36,7 @@ DEPENDS:class-target = " \
kxmlgui \ kxmlgui \
lcms \ lcms \
libdisplay-info \ libdisplay-info \
libcap \
libei \ libei \
libinput \ libinput \
libplasma \ libplasma \
@@ -88,6 +89,11 @@ do_install:append() {
install -m 644 ${UNPACKDIR}/kwinrc ${D}/${sysconfdir}/xdg/kwinrc 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_SOLIBSDEV = ""
FILES:${PN} += " \ FILES:${PN} += " \
${datadir}/config.kcfg/*.kcfg \ ${datadir}/config.kcfg/*.kcfg \