Gsync sometimes fails to work on Fedora 24/Gnome 3.20

After upgrading to Fedora 24, I’ve noticed that sometimes gsync will stop working. It happens after I’ve put the computer to sleep for a long time (> 30 minutes). I know gsync isn’t working because my Acer Predator monitor has a frame counter and it stays at a steady 144Hz instead of adjusting to the game frame rate. I also start to see tearing.

To work around this issue, I can restart Gnome Shell (press Alt-F2, type ‘r’, and press enter) and then gsync starts to work again.

Is anyone else experiencing this issue?

Computer info:
Geforce 780 Ti with 367.35 drivers
Acer Predator XB271HU Gsync monitor
Fedora 24
Gnome 3.20
Xorg 1.18.4

I’ve confirmed that I can consistently reproduce this issue by putting the computer to sleep for a long time

Steps to reproduce:

  1. Use Gnome 3.20 and verify that gsync works by launching any game.
  2. Exit the game and then put the computer to sleep.
  3. Wait a few hours. This step is crucial. The bug won’t trigger if you sleep and then immediately turn the computer back on. Leave the computer sleeping over night preferably.
  4. Launch the game again. Notice that gsync is not working by looking at your monitor’s frame counter or by seeing tearing in your game.
  5. Alt tab out of the game. Restart gnome-shell by pressing Alt-F2, entering ‘r’ in the box, and pressing enter.
  6. Go back to the game. Notice that gsync is working again.

I’ve attached nvidia logs as requested by the forum sticky post. Logs were dumped after issue was experienced and then gnome-shell restarted.
nvidia-bug-report.log.gz (118 KB)

Forum attachment didn’t seem to go through so I put it here:

If you turn on the G-SYNC visual indicator in nvidia-settings and then reproduce this problem, does it say “NORMAL” or just not display anything? I wonder if gnome-shell gets confused somehow and fails to unredirect the game’s full-screen window. Can you please also check how much video memory is used in the nvidia-settings GPU page? Please also see how much it changes after restarting gnome-shell.

I thought it might be a unredirect fullscreen issue too, but I think unredirect is being triggered because I see tearing when the Gsync bug occurs. If I disable unredirect, the compositor will do vsync and I will not see tearing. So I definitely think unredirection is working properly.

I will reproduce the problem again after work and look at the G-SYNC visual indicator.

The gsync indicator says “Normal” when the bug occurs. Restarting Gnome-Shell will make the Gsync indicator say “g-sync”. I forgot to check memory usage before I restarted gnome-shell today. I’ll reproduce again and let you know.

I got the memory statistics this morning when the bug occurred after sleep.

Before restarting Gnome Shell: 459 MB (15%)
After restarting Gnome Shell: 331 MB (11%)

Seems normal to me.