AMD FreeSync on a Nvidia GPU?
It may be a familiar story for a lot of office workers no matter where you live in 2020. Out of the blue, COVID19 showed up, and suddenly working remotely is the new norm - your company either allowing it or encouraging it. I am also in this situation, stuck for about 6 months at home, more or less. And with all changes, there’s positive and negative aspects. In my case, I have lost a comfortable setup in my workplace (multiple monitors, high resolution).
In order to make the best of working from home, I have purchased an ultra-wide monitor, which happens to be FreeSync compatible as well. But would it actually work on Linux? Especially on a non-AMD GPU configuration?
In case you have never heard of FreeSync, here’s a very quick description coming from Wikipedia:
FreeSync is an adaptive synchronization technology for liquid-crystal displays that support a variable refresh rate, aimed at avoiding tearing and reducing stuttering caused by misalignment between the screen’s refresh rate and the content’s frame rate.FreeSync was developed by AMD and first announced in 2014 to compete against Nvidia’s proprietary G-Sync. It is royalty-free, free to use, and has no performance penalty.
On a regular screen, you are typically stuck with 60 Hz or 30 Hz framerates. If a game becomes more resource intensive, and the frame rate drops below 60fps, the next best that your monitor can do (with Vsync) is wait for the next frame so you end up at 30 fps, which looks like stuttering when your eyes are used to 60fps. With FreeSync, the monitor will be able to switch to variable refresh frequencies in between 30Hz and 60Hz so that the gradient of FPS will be a lot smoother to you even when the game goes below 60 FPS.
Typically your monitor’s refresh rate is fixed at something like 60Hz, which corresponds to 60FPS. However, your GPU almost never delivers exactly 60FPS in every scene. Sometimes higher, sometimes lower. With VSync on, your monitor will ensure that:
- a frame produced faster than 16.7 ms (let’s say, 12 ms) will wait for the 16.7 ms Vsync monitor timing to be displayed.
- a frame produced slower than 16.7 ms (let’s say, 20 ms) will wait for the NEXT 16.7 ms Vsync monitor timing to be displayed. In this particular case, the monitor, having missed the new frame on time, will repeat the previous frame again until the next Vsync timing. This is what we call stuttering. Stuttering will occur even if you are slightly slower than 16.7ms - time is time and in order to have a constant 60 FPS, you would need your GPU to deliver on average new frames quite faster than 16.7 ms to make up for the variability in-game.
Now, FreeSync is a technology which enables Vsync to happen pretty much anytime (within a range). So if your GPU can only make new frames every 20ms, a FreeSync monitor will get that and refresh itself at every 20ms as well, instead of waiting for 33.3ms for the next frame. In practice, the monitor will stay as close as possible to the GPU’s output framerate and completely get rid of stuttering. So a 45 FPS framerate will appear as 45FPS on your monitor as well, and look much smoother than the resulting 30FPS on a non-FreeSync monitor.
This video explains the phenomenon quite well:
One of the aspects that the video hints about is the fact that with a FreeSync monitor, even lower framerates will appear smoother on screen, so you would not need a very powerful GPU to enjoy smooth framerates.
So, does FreeSync work with Nvidia on Linux?
Short answer: yes, it works. Now let me tell you how.
Since Nvidia drivers 418.x or so, FreeSync is now supported for all Nvidia GPUs above 1000 series. They refer to it as “GSYNC compatible” displays - GSYNC displays used to include some kind of hardware to achieve the same effect and were officially approved by Nvidia (trademark I guess?). Since FreeSync has become very popular, Nvidia ended up supporting it as well, without referring to it directly. It would seem that just any FreeSync capable monitor out there could work with Nvidia cards nowadays, but please do your homework before empyting your wallet. 2 minutes of Google-fu can go a long way to avoid surprises.
How does it work in practice? Well, it’s supposed to be a simple box you tick on your nvidia-settings GUI client. However, such options were completely invisible to me on my config when I was connected via the HDMI out, and some forum posts mentioned that for some reason, FreeSync only worked with Display Port and not HDMI (on Linux at least). This is also mentioned in the Arch Linux Wiki:
The monitor must be plugged in via DisplayPort. Some displays which implement (part of) the HDMI 2.1 specification also support VRR over HDMI. This is supported by the Nvidia driver and will likely be supported by the AMD driver in the future.
I therefore purchased a DP cable and tried again a few days later. Lo’ and behold, the options suddenly showed up in the advanced section of nvidia-settings.