Flicker when recording or sharing screen

Whenever I use any screen recording app (such as SCR, gnome-screenshot, spectacle) or share screen through firefox or zoom, I get a lot of flicker on the recording. If i restart cinnamon or change the display refresh rate via the settings menu, the flicker stops for a few minutes, and then comes back. It comes back sooner if there’s a lot going on in the screen, so i believe it to be buffer related.
This happens not only on Cinnamon, but on Gnome, Plasma and Budgie as well. I tried using wayland on Gnome and Plasma, I still can’t share or record my screen(I just get a black screen), but taking screenshots works just fine.
The flicker seems to be made out of old frames, alternating with new ones. So, if I take a screenshot, I get an image of my desktop some time before, with programs that I already closed.
I’ve already tried disabling vsync and desktop effects on the settings menu.
Here’s the output of inxi -G:

  Graphics:
 Device-1: Intel Iris Xe Graphics driver: i915 v: kernel 
 Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo 
 Display: x11 server: X.Org 1.20.11 driver: loaded: intel 
 unloaded: modesetting resolution: 1920x1080 
 OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.0.3 

I had similar flicker issues but with Nvidia drivers long time ago (while screen recording, teamviewer, things like that), the issue was fixed by disabling ‘Allow Flipping’ in the drivers. Maybe your issue is similar and you can find some kind of options to disable this setting too?

Here is what it looked like https://cloud.githubusercontent.com/assets/13511120/23264133/877d2732-fa0a-11e6-9e44-9295ce28e0cc.gif sometimes it was whole screen too.

1 Like

It worked! Thank you very much! I was going crazy over this. This specific setting is hard to find on intel gpus, but it’s on the arch wiki: https://wiki.archlinux.org/title/intel_graphics#Disable_Vertical_Synchronization_(VSYNC). I guess there’s a bug on mesa’s buffering pipeline that prevents screen sharing to work on certain intel gpus.

Maybe you can tell what worked specifically so that it helps people.