Isolated squares freezing

Hi everyone

I have an issue where, in graphical applications (it seems to happen in anything that uses the GPU), after a few hours of continuous use, I get some very werid behaviour

I suddenly get large rectangular sections of the rendered environment subdivided up, and these rectangular shapes freeze (they don’t get updated). Everything outside of those shapes continues to render normally. They remain like this for a few seconds, then the rectangles change positions, and this continues until I restart the application.

When the issue occurs, only the single application is affected (although any gpu-bound application can fail in this way, just not at the same time), and the state can be temporarily cleared by moving the window off the screen and back on (though it fails again pretty fast).

Once closed and reloaded, the applications seem to be fine again for an hour or so before they misbehave again.

I have an nvidia-bug-report.log available to send, but I don’t wish to post this on a public forum post because it contains a lot of sensitive data.

Here’s what it looks like:

(Yes, I know my monitor needs cleaning :P)

I tried to screen capture it with OBS Studio (XComposite) but everything looks fine there, so the issue is clearly after the compositing stage.

Full-screen capture in OBS with XSHM does capture the corruption.