HOWTO enable Adaptive Vertical Sync (Freesync) on AMD GPUs
You can enable Variable Refresh Rate adjustment (VRR) on GNU/Linux if you have a AMD graphics card and a display capable of variable refresh. The monitor does not have to use the AMD "Freesync" standard for this to work, VRR can be enabled on any display following the VESA DisplayPort 1.4 VRR specification. VRR is disabled by default; enabling it is a simple matter of setting the X configuration option
You do not need a "Freesync" branded monitor. You do need one with support for variable refresh rates using either Freesync or the VESA DisplayPort VRR standard.
You will need a display which is either capable of doing AMD Freesync OR able to do vertical refresh synchronization using the VESA standard. You will also need:
- Linux 5.0+ (Any recent kernel will do)
- Mesa 19.0+ for OpenGL and Mesa 19.1+ for Vulkan VRR support
- A display connected using DisplayPort. VRR is currently not supported on displays connected using HDMI (unless that's changed, it's still the case with Linux 5.9.1).
You can run
xrandr --prop | less and search for
vrr_capable by pressing / or
xrandr --prop |grep vrr to just get the
vrr_capable: setting. If you have one or more monitors that say
vrr_capable: 1 then congratulations, your display has variable refresh rate support. Note that
vrr_capable: 1 does not mean it's enabled, it just means it's supported.
Check your monitors menu if you suspect that it may support VRR and it's connected using DisplayPort and xrandr shows it as
vrr_capable: 0. There are some "office" monitors with VRR support that are shipped with VRR turned off. ASUS PB27U is one example of a monitor that can do VRR if you enable it in the display settings.
All you need to enable "Freesync"/VRR is a line that says
Option "VariableRefresh" "true" to a configuration file named something like
20-radeon.confin the folder
/etc/X11/xorg.conf.d/. That's it. Here's an example:
|Note: The folder |
Option "TearFree" "1" is not required for
Option "VariableRefresh" "true" and either setting can be used without the other.
TearFree will enable triple buffering which will eliminate tearing in games with a broken vsync implementation and also prevent tearing in a lot of other cases. xfwm4 4.12 is one prime example of something which requires this setting.
grep VariableRefresh /var/log/Xorg.0.log will show
AMDGPU(0): VariableRefresh: enabled if this setting is read and it will show
AMDGPU(0): VariableRefresh: disabled if it's not. Do be aware that the log will say
AMDGPU(0): VariableRefresh: enabled as long as X understands that you've set
Option "VariableRefresh" "true", this does not show if it's working or not. X will happily log
VariableRefresh: enabled even if there are no VRR capable displays connected.
One last minor detail: You will also need
Option "DRI" "3" if you are using Xorg >= 1.18.3. That's a very old Xorg version so your Mesa and kernel versions are probably too old to use VRR if your Xorg version is that old.
There are some caveats to be aware of.
- VRR/Freesync will only work if games or and applications that are running full screen.
- Window-managers like xfwm4 needs to have a configuration option like enabled.
- There does not appear to be any way to get MangoHud or other software to show the true display rate. It's hard to verify if it's working if you don't have a monitor capable of showing FPS on-screen.
- There's almost no software with actual VRR support. Like no games. At all.
The small and simple test application "Unofficial OpenGL G-SYNC Demo for Linux" available at github.com/dahenry/gl-gsync-demo is a quick and easy way to verify that adaptive sync is working. It is made with G-SYNC but that doesn't matter, it will test AMD adaptive sync just fine (it will crash if you try to turn vsync on/off by pressing V). Turn on your monitors FPS counter (if it has one) and run that and you should see the monitors FPS overlay display change. That should make you happy until you try some games... SuperTuxKart does NOT support variable refresh rate, neither does CS:GO or anything else for that matter.
Feel free to leave a comment below if you are aware of any worthwhile games that actually support the technology on GNU/Linux. It seems very much like VRR is something you can enable and test but not actually use for anything practical.