So far it is tested on a Vega 64 on X11 with recent mesa master, and this is where this issue happens for me. On my nvidia machine with Ubuntu 19.04 this issue does not happen. We have an effect plugin (xrdesktop) that makes use of window textures in drawWindow(), and for performance reasons we only want to process textures when the window content is updated, i.e. after a windowDamaged() call for this window. This works fine usually, but sometimes there is a windowDamaged() call missing even though the window renders at 60 fps on a 60 Hz display. STEPS TO REPRODUCE I wrote a minimal effects plugin for testing this: https://github.com/ChristophHaag/kwin-effect-test-damage No dependencies and the plugin is enabled by default, just cmake ..; make; make install The output happens with qDebug(), and the default window it watches for is glxgears, so run GALLIUM_HUD=frametime glxgears and QT_PLUGIN_PATH=/usr/local/lib/plugins/ TEST_DAMAGE_VERBOSE=TRUE kwin_x11 --replace OBSERVED RESULT The plugin prints the durations between windowDamaged() calls for glxgears, and an extra message when there are two drawWindow() calls where no windowDamaged() call happens in between. On my 60 Hz monitor the time between two windowDamaged() calls is usually ~16.67ms, but sometimes one windowDamaged() call is omitted: damaged(): 16.6673 ms since last damage damaged(): 16.6368 ms since last damage damaged(): 16.6442 ms since last damage damaged(): 16.775 ms since last damage drawWindow(): Drawing window "glxgears" without previous damaged event! drawWindow(): 34.7693 ms since last damage damaged(): 35.1921 ms since last damage damaged(): 31.3251 ms since last damage damaged(): 16.5497 ms since last damage damaged(): 17.5127 ms since last damage damaged(): 15.8502 ms since last damage I do believe that this drawWindow() call that had no preceding windowDamaged() call, actually draws a window with updated content, but I have not really dug into this issue yet. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Archlinux (available in About System) KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.13.1
Note that the damaged signal is not emitted immediately when a window reports the damage. kwin will note that and fetch the damaged region before starting the next compositing cycle. If I were to guess, it sounds like some XDamage events arrive too late and some frames take too long to paint.