Solve Nvidia tearing issues on Linux

Je bent hier:
< Alle onderwerpen

If you use an Nvidia video card or chipset with the proprietary Nvidia video drivers on Linux, you might run into awful tearing artifacts while dragging windows, watching video and seeing other on-screen movement. Whatever settings you toggle in system settings and the Nvidia control panels, nothing seems to help.

There is a good solution, provided you are running at least version 364.12 of the Nvidia drivers.

Before you continue

This article assumes:

  • your computer uses GRUB to boot into the Linux install (can be MBR or UEFI, that doesn’t matter)
  • you have version 364.12 or newer of the Nvidia drivers installed and active with default settings
  • you know what the Terminal is and how to run a command with it
  • you have made a backup of your entire system, and know how to restore it in case something goes wrong

Here’s what to do

  1. Open /etc/default/grub in a text editor with sudo permissions.
    For example: on Linux Mint, you can run sudo xed /etc/default/grub from a Terminal window.
  2. Find this line, fairly at the top of the file:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  3. Change the entire line to this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
  4. Update the boot manager by running sudo update-grub in the Terminal.
  5. Reboot your computer and test if the tearing is gone!

Extra step for Linux Mint + Cinnamon

When using Cinnamon on Linux Mint, you might see that the tearing is now gone but window movement is still a little stuttery. If this is the case, go into System Settings > General and pick ‘Presentation Time’ as the VSync method.
Then reboot, and everything should be buttery smooth.

What does this all do?

nvidia-drm.modeset=1 allows the Nvidia Direct Rendering Manager to load in kernel space and pre-set display settings before the X video server has a chance to take over. I think this makes it possible for the Nvidia driver to use its own VSync instead of whatever X or the window compositor offers, but I don’t know nearly enough about Linux or graphics cards to know if this is true. All I know is: it works, and I hope it helps you too 🙂

Thank you

Volgende Taken plannen in Linux met crontab
Inhoudsopgave