HOWTO enable Adaptive Vertical Sync (Freesync) on AMD GPUs

From LinuxReviews
Jump to navigationJump to search

GNU/Linux systems can (finally) use variable refresh-rate monitors using either the VESA's adaptive synchronization standard or AMDs own Freesync standard. It is disabled by default and it does have limitations. However, it is usable and it can easily be enabled by setting the option VariableRefresh to true in a Xorg's configuration file. You will, of course, also have to turn it on in your monitors settings.

You do not need a "Freesync" branded monitor. You do need one with support for variable refresh rates. Most new monitors have it even if they do not market it and hide the off-by-default setting deep within the monitors settings menu.

Requirements[edit | edit source]

Amd-information.jpg
  • The Linux kernel did not get fully working Freesync support until version 5.0.
  • The MESA graphics stack got Freesync support in version 19.
  • MESA 19.0 can only do adaptive sync on OpenGL, 19.1' can into Vulkan vrr.

This means that you are out of luck if you are using a distribution with older versions. Most of the Linux distributions have versions that are new enough. Further,

  • You can only use Freesync with DisplayPort as of kernels 5.0 and 5.1. Support for HDMI may be added in the future but for now you're out of luck.
  • Freesync will only work for games and programs running full screen. You can not have a game running in a window on your desktop and have the entire desktop do vertical sync.
    • This does of course mean window-managers like xfwm4 needs the configuration option Display fullscreen windows in an overlay directly enabled.

You will need a display which is either capable of doing AMD Freesync OR able to do vertical refresh synchronization using the VESA standard. These features will need to be enabled which they are not out-of-the-box on many monitors. As an example, the ASUS PB27U has support for vertical refresh synchronization but it is not enabled by default. It must be enabled using the monitor's menu.

You can verify if the technology is available by opening a terminal and running xrandr --prop | less which will show you all kinds of incriminating information about your display setup. You will want to do a close-up inspection of the vrr_capable listing which will either show vrr_capable: 1 if any vsync technology is available or 0 if it's not. Do note that vrr_capable only shows if the display is capable of doing adaptive vsync.

Configuration[edit | edit source]

Add Option "VariableRefresh" "true" to a configuration file named something like 20-radeon.confin the folder /etc/X11/xorg.conf.d/ to enable Freesync. That's all you need. Example:

File: /etc/X11/xorg.conf.d/20-radeon.conf
Section "Device"
  Identifier "AMD"
  Driver "amdgpu"
  # 8-bit or 10-bit colors 24 or 30
  # Using 10-bit breaks Chromium and Chrome
  DefaultDepth    24
  Option "TearFree" "1"
  Option "VariableRefresh" "true"
EndSection
Kemonomimi rabbit.svg
Note: The folder /etc/X11/xorg.conf.d/ does not exist on default Ubuntu installations. It will be used if it exists. Simply sudo mkdir /etc/X11/xorg.conf.d/ and place the configuration file(s) you want in that folder.

The 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. xfwm 4.12 is one prime example of something which requires this setting.

grep VariableRefres /var/log/Xorg.0.log will show AMDGPU(0): VariableRefresh: disabled if it's not enabled and AMDGPU(0): VariableRefresh: enabled if it is.

One last minor detail: Option "DRI" "3" is required if you are using Xorg >= 1.18.3 - in which case you probably don't have Mesa 19.x anyway.. it's the default and therefore not needed on not ancient X versions.

Get ready for much disappointment once you have it working[edit | edit source]

The small and simple test application "Unofficial OpenGL G-SYNC Demo for Linux" available at https://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. Turn on your monitors FPS counter (if it has one) and run that and you should see the monitors FPS overlay 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 fun.

Feel free to leave a comment below if you are aware of any worthwhile games which supports the technology.


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.