There are a lot of rendering issues (e.g. white rectangles) with the default OpenGL compositor using the i915 mesa driver, because the shader exceeds the hardware limits of Intel's Gen3 GPUs: kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 7 not linked) kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_ENUM in glTexStorage2D(internalformat = GL_R8) kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glTexSubImage2D(invalid texture level 0) kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 7 not linked) kwin_wayland[1576]: kwin_scene_opengl: Failed to link shader: "error: Exceeded max ALU instructions (163/64)\x00" kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 22 not linked) kwin_wayland[1576]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glGetUniformLocation(program not linked) kwin_wayland[1576]: Failed to link shader program: error: Exceeded max ALU instructions (86/64) kwin_wayland[1576]: Failed to build graphics pipeline state kwin_wayland[1576]: kwin_scene_opengl: Failed to link shader: "error: Exceeded max ALU instructions (162/64)\x00" kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 4 not linked) kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_ENUM in glTexStorage2D(internalformat = GL_R8) kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glTexSubImage2D(invalid texture level 0) kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 4 not linked) kwin_x11[3334]: Failed to link shader program: error: Exceeded max ALU instructions (86/64) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 19 not linked) kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 25 not linked) kwin_x11[3334]: Failed to link shader program: error: Exceeded max ALU instructions (86/64) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 19 not linked) kwin_x11[3334]: Failed to link shader program: error: Exceeded max nr indirect texture lookups (5/4) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: Failed to link shader program: error: Exceeded max nr indirect texture lookups (5/4) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: Failed to link shader program: error: Exceeded max ALU instructions (86/64) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 19 not linked) kwin_x11[3334]: Failed to link shader program: error: Exceeded max nr indirect texture lookups (5/4) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: Failed to link shader program: error: Exceeded max nr indirect texture lookups (5/4) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: Failed to link shader program: error: Exceeded max ALU instructions (86/64) kwin_x11[3334]: Failed to build graphics pipeline state kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 19 not linked) kwin_x11[3334]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUseProgram(program 25 not linked) kwin_x11[3334]: Failed to link shader program: error: Exceeded max nr indirect texture lookups (5/4) kwin_x11[3334]: Failed to build graphics pipeline state It happens on both Wayland and X11. KWin should either use less complex shaders, or should fallback to "QPainter" backend on Wayland, and "No Compositing" on X11.
Want to mention that KWin 5 worked fine on this hardware when I set the QT_QUICK_BACKEND=software environment variable. With KWin 6, this no longer works, and complex shaders are used even if this environment variable is set.
Having a "limited opengl" mode is probably not feasible, but we can try to compile a shader with all the features used in compositing and fall back to CPU rendering if that fails
This still happens on the lasted 6.1.0 version (Gentoo) with the same issues.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5991
Git commit 5a0ecdba333dba233d54124909028971260b0f78 by Xaver Hugl. Committed on 25/06/2024 at 13:49. Pushed by zamundaaa into branch 'master'. opengl/eglcontext: bail out early if we can't use complex shaders Some old hardware is very limited in the amount of instructions it can support. In order to not have KWin fail to composite, reject using hardware acceleration in this case and fall back to llvmpipe or QPainter M +10 -1 src/opengl/openglcontext.cpp https://invent.kde.org/plasma/kwin/-/commit/5a0ecdba333dba233d54124909028971260b0f78
Git commit b819606a740e44cf689781175fab7cf7731f162c by Xaver Hugl. Committed on 25/06/2024 at 13:59. Pushed by zamundaaa into branch 'Plasma/6.1'. opengl/eglcontext: bail out early if we can't use complex shaders Some old hardware is very limited in the amount of instructions it can support. In order to not have KWin fail to composite, reject using hardware acceleration in this case and fall back to llvmpipe or QPainter (cherry picked from commit 5a0ecdba333dba233d54124909028971260b0f78) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +10 -1 src/opengl/openglcontext.cpp https://invent.kde.org/plasma/kwin/-/commit/b819606a740e44cf689781175fab7cf7731f162c