How do I fix screen tearing issues when playing videos in mpv on Linux?

Screen tearing in mpv on Linux usually happens because the video player’s frame updates are out of sync with your monitor’s refresh rate. This issue is highly dependent on your display server (X11 vs. Wayland), your desktop environment’s compositor, and your graphics card drivers. You can resolve this artifacting by adjusting your mpv configurations, managing your system compositor, or applying driver-specific rules.

Use Video Sync and Hardware Acceleration in mpv

Before modifying system-wide settings, you can configure mpv to synchronize video frames directly with your display’s vertical blanking interval (VBlank). Open or create your user-level configuration file located at ~/.config/mpv/mpv.conf and add the following parameters:

# Force mpv to use video synchronization matching the display
video-sync=display-resample

# Enable hardware video decoding to reduce CPU rendering bottlenecks
hwdec=auto-safe

The video-sync=display-resample setting instructs mpv to resample audio to match the exact refresh rate of the monitor, preventing the misaligned frame submissions that lead to horizontal line tears.

Manage Your Desktop Compositor (X11 Users)

If you are running the legacy X11 display server, screen tearing is often caused by an inactive, misconfigured, or bypassed system compositor.

picom --backend glx --vsync

Force Driver-Level Tear-Free Rendering

When software-level adjustments fail, forcing your graphics hardware to handle vertical synchronization at the kernel level will resolve the issue.

For AMD Users (X11)

Create a custom Xorg configuration file to activate the driver’s built-in tear protection. Create a file at /etc/X11/xorg.conf.d/20-amdgpu.conf and add:

Section "Device"
    Identifier "AMD Graphics"
    Driver "amdgpu"
    Option "TearFree" "true"
EndSection

For NVIDIA Users (X11)

Open the NVIDIA X Server Settings GUI, navigate to your display profile under “X Server Display Configuration”, click Advanced, and check the box for Force Full Composition Pipeline. To make this change permanent across reboots, click Save to X Configuration File.

Switch to Wayland

The most robust remedy for persistent screen tearing is migrating your desktop session from X11 to Wayland. Wayland’s architecture fundamentally prevents screen tearing by mandating that every single frame is fully rendered and synchronized before it is pushed to the screen hardware. Most modern Linux distributions allow you to select a “Wayland” session from the display manager login screen. When running on Wayland, mpv works flawlessly out of the box without requiring manual synchronization workarounds.