Screen blanking causing signal loss with G-sync
I've reported this to Nvidia and tried to figure out the issue for a long time (about a year). I'm now posting here in the hope that someone could have an idea in which component the problem lies. At this point I'm more curious about figuring out where the problem is (or isn't), and don't have high hopes of fixing the issue. There is a workaround that I can live with. My own opinion is that it could be an Nvidia driver issue. But it would be good to rule out other components (Nvidia hasn't been exactly responsive).
Short description of the problem:
An application is running fullscreen (FLIP) with G-sync enabled. When letting gnome-screensaver and screen blanking kick in, and when unlocking the screen and returning to the fullscreen application, it causes massive continuous signal loss of the display signal (display turning signal on and off).
Long description:
I'm using Fedora 31 with Gnome (3.34.1-4) and proprietary Nvidia linux driver 440.31 (GTX 1070 card). The issue has existed in several past versions of the nvidia driver (as long as I've had this monitor). Monitor is Samsung LC34F791WQUXEN. This is an ultra-wide (21:9) 34" 100 Hz screen with freesync support. I use displayport cable directly connected to the screen. Monitor is set to 99.98 Hz in Gnome control center.
After starting the PC and immediately starting a game with G-sync on (and with "Allow G-SYNC on monitor not validated etc."), everything works fine. The game plays with G-sync and refresh rate looks variable (everything plays smooth and nice). Nvidia on-screen indicators show FLIP - VSYNC ON and G-SYNC. But when I pause the game and let Gnome screensaver lock the screen, then unlock screen and continue gaming, the monitor starts turning the input off and on every few seconds (like it has lost the signal). It seems that Gnome screensaver itself doesn't cause the issue, because if I'm fast enough before screen goes blank (black), I can unlock the screen and continue without issue. So it's the actual screen blanking that somehow "disturbs" refresh rates.
To get it to stop losing signal I have to quit the game (hard to click on anything with the screen flickering) or alt-tab to desktop. This stops the input signal flipping. But if you start the game again (or alt-tab back), the problem is still there. Now to get it to work again, you can reboot the PC, or simply turn off g-sync in Nvidia settings. Another way without rebooting is to change Resolution in Nvidia-settings from Auto to 3440x1440 and then set refresh rate to 60 Hz (sometimes toggling a couple of times between 60 and 100 Hz is necessary). Then when starting the game it is like the driver "takes over" and G-sync then drives the refresh rate up to 100 Hz and keeps it on. So toggling screen refresh rate somehow resets the issue.
There is nothing in logs that would tell anything about the problem. Different Displayport cables don't affect the issue.