(Partially self-answered) Windows flicker in OBS screen recording


I had the following problem: Recently OBS recordings starting having a really weird issue, windows became partially transparent at the top occasionally, always for very short amounts of time, but sometimes up to multiple times per second. This did not happen on the actual screen, but somehow OBS saw windows behind the top one and the desktop background despite them not being visible on the screen.

Here is an example recording: https://cdn.discordapp.com/attachments/173877869640941568/787022774974939187/2020-12-11_19-26-19.mp4

How I "fixed" it for myself: I switched from the latest "stable" kernel, 5.9.11-3, to the latest LTS kernel, 5.4.80-2. Now this doesn't happen anymore. I would still be interested to know how this was even possible and how I could get rid of this issue if I wanted to use the latest kernel.

Setup: GPU NVIDIA GeForce GTX 1050, Manjaro 20.2, driver "video-hybrid-intel-nvidia-455xx-prime". A system update recently switched the kernel from 5.8 to 5.9, that's probably what triggered the bug to occur. But is it really the original cause? Is it a kernel bug? I don't have issues like that outside of OBS.