Bug 451125 - Changing kwin related settings when OpenGL renderer is enabled makes kwin sluggish
Summary: Changing kwin related settings when OpenGL renderer is enabled makes kwin slu...
Status: RESOLVED DUPLICATE of bug 444536
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.24.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-04 12:17 UTC by Marco
Modified: 2022-03-24 16:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco 2022-03-04 12:17:46 UTC
SUMMARY
***
It seems that whenever kwin gets replaced to apply some settings, and the OpenGL renderer is enabled, kwin becomes sluggish and almost unusable. The only way to fix the issue is either reboot the system, or disable OpenGL via the OpenGLIsUnsafe setting in .config/kwinrc and then run kwin_x11 --replace (this of course disables all effects).
***


STEPS TO REPRODUCE
1. Simply run kwin_x11 --replace or just modify some kwin related setting like window decorations.


OBSERVED RESULT
kwin is restarted but it is now sluggish

EXPECTED RESULT
kwin should restart without problems

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 35 KDE Edition
(available in About System)
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel version: 5.16.11
Video driver: nouveau
GPU: intel/nvidia optimus

ADDITIONAL INFORMATION
I tried disabling nouveau from boot by setting nouveau.modeset=0 as kernel parameter and thus use only mesa drivers, but the issue remains.
Comment 1 Marco 2022-03-04 12:28:26 UTC
As an additional confirmation that the OpenGL renderer is at fault, when executing KWIN_COMPOSE=<renderer> kwin_x11 --replace, everything is fine when using X (Xrender), but when setting KWIN_COMPOSE=O2 (OpenGL2), the problem starts to show up.
Comment 2 Daniel Eckl 2022-03-23 08:30:13 UTC
I have the same issue on Kubuntu 21.10 with KDE Backports PPA

Operating System: Kubuntu 21.10
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-37-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-7300U CPU @ 2.60GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620

I cannot reconfigure anything kwin related that restarts kwin, without having a nearly unusable system, framerate of everything drops to about 1-2 fps. My workaround then is to disable compositing by pressing CRTL-SHIFT-F12, but for re-enabling a working compositing I have to logout and back in.

The issue also appears when I restart kwin on the console with using "kwin_x11 --replace". Console output:

$ kwin_x11 --replace
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5089:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5091:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5093:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5097:47: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5099:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5107:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5111:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5113:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5117:45: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5120:46: this compose sequence is a duplicate of another; skipping line
OpenGL vendor string:                   Intel
OpenGL renderer string:                 Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL version string:                  4.6 (Compatibility Profile) Mesa 21.2.6
OpenGL shading language version string: 4.60
Driver:                                 Intel
GPU class:                              Kaby Lake
OpenGL version:                         4.6
GLSL version:                           4.60
Mesa version:                           21.2.6
X server version:                       1.20.13
Linux kernel version:                   5.13
Requires strict binding:                yes
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_core: XCB error: 10 (BadAccess), sequence: 3598, resource id: 1993, major code: 142 (Composite), minor code: 2 (RedirectSubwindows)
Comment 3 David Edmundson 2022-03-24 16:38:06 UTC

*** This bug has been marked as a duplicate of bug 444536 ***