SUMMARY Occasionally, when returning from a screen dim on X11, the compositor ends up disabled. Seems to reproduce more easily when another application is using openGL. Seems to be an integer overflow problem. STEPS TO REPRODUCE For me, leaving a firefox tab at https://webglsamples.org/aquarium/aquarium.html and letting the screen dim reliably triggers it. OBSERVED RESULT Compositor is disabled. EXPECTED RESULT Compositor should remain enabled. I built a custom package with some printf debugging, and found that in SceneOpenGL::viewportLimitsMatched(), from time to time the call to glGetIntegerv(GL_MAX_VIEWPORT_DIMS, limit) is returning a very large value for width, overflowing the GLint. Based on https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.xhtml it seems these dimensions are supposed to be GLsizei, and indeed I cannot reproduce the issue if I change the GLint to GLsizei in that function. This might be the same as Bug 394890. SOFTWARE/OS VERSIONS (available in About System) KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.2-arch1-2 ADDITIONAL INFORMATION Radeon RX 570
Maybe Bug 431858 as well.
Cannot reproduce with those steps, but because you can, would you be interested in submitting a merge request to fix it at https://invent.kde.org/plasma/kwin/-/merge_requests/? Thanks!
I checked out git master, but haven't been able to reproduce it there. Seems to be due to https://invent.kde.org/plasma/kwin/-/merge_requests/1199. So in the same scenario as before, SceneOpenGL::viewportLimitsMatched() is not hit anymore. Nonetheless, I think the use of GLint is still wrong.
Nice, thanks for digging into the code. Feel free to leave a comment there, or even submit a merge request with a proposed change.
Sounds like this isn't happening anymore. Code improvements can still be submitted via merge request.