Qt OpenGL programs sometimes fails to start and slows X on 770 GTX

I have this problem where programs that use OpenGL, like Plasma Desktop or my own Qt Quick 2 based program slows X to a crawl with the mouse cursor lagging over the screen when moved.

It only happens like every 3-5 times an OpenGL program is started and it only happens as the program starts.

The workaround is switching to VT and back, which restores normal X speed but crashes the OpenGL program.

Installed is a 770 GTX with 3 screens and an Oculus Rift connected and a 570 GTX that has no screens connected.

https://brix-verden.dk/misc/nvidia-bug-report.log.gz

With 352.09 my right screen started blinking at intervals. The screen was connected with a HDMI cable to a DVI converter, which was connected to a display port converter. I tried replacing the Oculus (HDMI) with the right screen instead and now everything is fine.