I am experiencing frequent failure of the kwin compositor since I upgraded my video card from a GTX 670 to a GTX 1070. When the failure occurs the compositor fails to restart so I have to restart kwin to get it back. The failure is always accompanied by an NVRM Xid 31 error. I am able to reliably reproduce the problem using Steam by clicking back and forth between Library and Store rapidly. I have a video of the failure along with the logging here: https://www.youtube.com/watch?v=mW6AM1CauNw
I found a Manjaro user reporting the exact same errors, using the same version of kwin (5.10.5), and the same GPU here: https://forum.manjaro.org/t/stupid-issue-with-plasmashell/30425
I have been unable to reproduce the issue when I enable the options “Force Composition Pipeline” and “Force Full Composition Pipeline” in nvidia-settings. I am also unable to reproduce it if I set the compositor to XRender backend. I am able to reproduce it with both the OpenGL 2.0 and OpenGL 3.1 backends.
I have tried Nvidia driver versions 381.22, 384.59, and 384.69. The behavior is identical.
Here is the corresponding kde bug report: https://bugs.kde.org/show_bug.cgi?id=384403
Here is my nvidia-bug-report.log: http://www.huntsvegas.org/files/nvidia-bug-report.log.gz