User Tools

Site Tools


ubuntu:gpu:amd_gpu:troubleshooting:screen_tearing

Ubuntu - GPU - AMD GPU - Troubleshooting - Screen Tearing

Screen tearing is an effect seen in moving pictures where the display suffers from distortion due to incorrect rendering of fast-changing images

  • Screen tearing occurs when the monitor’s refresh rate and GPU’s frame rate are not synchronized.
  • It is characterized as a horizontal split at one or more places in the image.

Screen tearing can be fixed by enabling VSync, Adaptive VSync, Enhanced Sync, Fast Sync, FreeSync, G-SYNC or Variable Refresh Rate, depending on what the PC system and monitor support.


GPU Config File Update

Edit (or create) the Xorg config file in the /usr/share/X11/xorg.conf.d/ directory.

  • If using a newer AMD GPU, the file is probably the one named 10-amdgpu.conf.
/usr/share/X11/xorg.conf.d/10-amdgpu.conf
Section "Device"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
    Option "TearFree" "true"
EndSection
  • If using an older AMD GPU, the file is probably the one named 10-radeon.conf.
/usr/share/X11/xorg.conf.d/10-radeon.conf
Section "Device"
    Identifier "Radeon"
    MatchDriver "radeon"
    Driver "radeon"
    Option "TearFree" "true"
EndSection

NOTE: The key here is the TearFree option.

  • This configuration is effective for many different systems
  • It mmay work with Xorg-server or Wayland.

Restart the X server

restart gdm

NOTE: Be sure to save any work and close applications first, as this will log out any users utilizing the graphical front-end.


Alternative configuration utilizing DRI

A modified version of the configuration may also improve performance, by utilizing DRI (direct rendering infrastructure) 3.

  • This has certain improvements for the way the X server handles rendering.
  • Also enabling Glamor (if not enabled already by default) can improve 2D rendering tasks, performing them through Mesa’s OpenGL libraries.
    • Older AMD cards will not support Glamor.
  • The enhanced configuration is as follows:
/usr/share/X11/xorg.conf.d/10-amdgpu.conf
Section "Device"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
    Option "TearFree" "true"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection

or

/usr/share/X11/xorg.conf.d/10-radeon.conf
Section "Device"
    Identifier "Radeon"
    MatchDriver "radeon"
    Driver "radeon"
    Option "TearFree" "true"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection

Check the current TearFree status

xrandr --verbose | grep "TearFree"
ubuntu/gpu/amd_gpu/troubleshooting/screen_tearing.txt · Last modified: 2023/06/21 22:02 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki