kwin_wayland needs CAP_SYS_NICE to reschedule its input and kms commit thread as real time threads. Not using real time threads doesn't cause obvious issues on kwin-5. Kwin-6 uses explicit sync and tries to do KMS atomic commit as closely to vsync as possibly. Without a real time kms commit thread this can results in missed vsyncs and a full refresh duration of delay. This was noticed on Apple silicon systems with resizing a glxgears window constantly under kwin_wayland/Xwayland.
... or maybe it shouldn't be optional at all anymore then?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=d10f89f7da3a36bf51d812978e14b17d6afad4aa commit d10f89f7da3a36bf51d812978e14b17d6afad4aa Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2024-05-15 19:18:12 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2024-05-15 19:20:27 +0000 kde-plasma/kwin: Drop IUSE caps, make it unconditional Necessary for kwin_wayland. Closes: https://bugs.gentoo.org/931215 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-plasma/kwin/kwin-6.0.49.9999.ebuild | 5 ++--- kde-plasma/kwin/kwin-9999.ebuild | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-)
https://bugs.kde.org/show_bug.cgi?id=417227 This breaks shortcuts on musl/llvm profile on wayland.
(In reply to kingfared from comment #3) > https://bugs.kde.org/show_bug.cgi?id=417227 > > This breaks shortcuts on musl/llvm profile on wayland. The discussion on that bug seems to be "there's a bug here, but it's not related to your caps thing". Did you really have USE=-caps until now on your musl system?
doubtful.
kwin was broken since a long time with +caps on musl/llvm Not globally but locally for kwin
(In reply to kingfared from comment #6) > kwin was broken since a long time with +caps on musl/llvm > Not globally but locally for kwin I do wish you or someone had reported this before. Did you and I missed it, or...? Anyway, I must admit, on re-reading the bug, I think you're right: https://bugs.kde.org/show_bug.cgi?id=417227#c13 and https://bugs.kde.org/show_bug.cgi?id=417227#c16 in particular. I think we should put USE=caps back and p.use.force it on !musl systems. Maybe even mask it on musl. I'll do that if asturm is fine with it.
(In reply to Sam James from comment #7) > I think we should put USE=caps back and p.use.force it on !musl systems. > Maybe even mask it on musl. I'll do that if asturm is fine with it. That means we accept broken kwin_wayland on musl?
Well, it's more broken right now (no shortcuts). musl users tend to be okay with somewhat-worse performance too. I agree it sucks.
broken with a very wide interpretation of what broken means. Kwin was used for years without CAP_SYS_NICE on at least Fedora and Debian without anyone noticing. Granted that was only very briefly kwin 6 were it became more important due to kwin changes. I only noticed it because the asahi display driver used a slow (compared to direct HW reg programming) firmware interface for framebuffer swaps and thus locked closely at the timing. I'd expect that runs acceptable on most other hardware. Kwin developers are to my understanding open to using rtkit for real-time threads but buggy GPU drivers are currently blocking this. The issue is that some driver only allow high priority OpenGL contexts with SYS_NICE.
(In reply to Sam James from comment #7) > I think we should put USE=caps back and p.use.force it on !musl systems. > Maybe even mask it on musl. I'll do that if asturm is fine with it. Feel free to go ahead with that (p.use.force + mask on musl). @Janne, should we mention degraded performance on detection of musl in an ewarn/einfo?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2187d8ffaa43d8e236926dd2a47263487b7caada commit 2187d8ffaa43d8e236926dd2a47263487b7caada Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2024-05-21 18:11:38 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2024-05-21 19:05:13 +0000 kde-plasma/kwin: 6.0.5 version bump, re-add IUSE +caps Bug: https://bugs.gentoo.org/931215 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-plasma/kwin/Manifest | 1 + kde-plasma/kwin/kwin-6.0.5.ebuild | 140 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=7766de878755b75470ae2b0c4d4838891e49247d commit 7766de878755b75470ae2b0c4d4838891e49247d Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2024-05-30 17:20:19 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2024-05-30 17:20:59 +0000 kde-plasma/kwin: Re-add IUSE +caps Bug: https://bugs.gentoo.org/931215 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> kde-plasma/kwin/kwin-6.1.49.9999.ebuild | 5 +++-- kde-plasma/kwin/kwin-9999.ebuild | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
Sam, feel free to go ahead with the profile settings then.
Frankly speaking its for the best, if RTkit is not used, since it has canary thread starvation bugs that will probably never be fixed. Just my two cents.
(In reply to Niklāvs Koļesņikovs from comment #15) > Frankly speaking its for the best, if RTkit is not used, since it has canary > thread starvation bugs that will probably never be fixed. Just my two cents. I'm not sure what you're saying here but the previous discussion is already clear.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e38fb7aa0827ecc78cdfe9b59f3928ca13f800a commit 2e38fb7aa0827ecc78cdfe9b59f3928ca13f800a Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-03 02:18:47 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-03 02:18:47 +0000 profiles: package.use.force kwin[caps] except on musl It's needed for resonable rendering behaviour, but mask on musl because it doesn't work properly there (https://bugs.kde.org/show_bug.cgi?id=417227). Closes: https://bugs.gentoo.org/931215 Signed-off-by: Sam James <sam@gentoo.org> profiles/base/package.use.force | 4 ++++ profiles/features/musl/package.use.force | 5 +++++ profiles/features/musl/package.use.mask | 5 +++++ 3 files changed, 14 insertions(+)