Capabilities for kwin_wayland in Plasma 5.12
Martin Flöser
mgraesslin at kde.org
Wed Dec 27 20:19:16 GMT 2017
Hi distributions,
it's that time of the year where we get closer to a new Plasma release
and once again KWin has a significant change where I think I need to
inform you about.
kwin_wayland is now using real time scheduling. The idea behind this
change is to keep the user interface responsive even when a process is
hogging CPU. This ensures that for example ctrl+alt+f1 will be handled
immediately. Or that the mouse still moves and one can close the window.
Without making KWin real time we cannot guarantee that input events are
handled fast enough and that required repaints happens. Don't worry: the
change is safe and won't make KWin hog the CPU. KWin only uses CPU if
there is something to do, like repainting or input events. If the system
is idle, KWin doesn't use CPU. KWin also doesn't take anything away from
"real" real time processes by using the lowest scheduling priority. So
everything is safe and after a few months in master: we only got
positive feedback.
Now the important change for distros: to achieve this kwin_wayland uses
capabilities and the package build system needs to ensure that the
capabilities get installed. Again: don't worry! KWin only takes
CAP_SYS_NICE and unsets it as soon as possible. It doesn't leak to any
other processes and KWin doesn't do anything nasty with it. It's as
secure as it can be.
What we noticed when introducing this feature in master is that distros
might have problems with capabilities in their package build system. So
please verify that this actually works. It's an important feature which
improves the user experience a lot.
Please no bikeshedding answers like "why do you need that" or "but this
is evil" or "you should use framework foo instead". What we did here is
the best possible solution. If you don't like it: the feature is compile
time optional.
Cheers
Martin
More information about the Distributions
mailing list