Skip to content

Instantly share code, notes, and snippets.

@ovichiro
Last active August 27, 2018 15:48
Show Gist options
  • Save ovichiro/ad4777347a845b0ba6980810c39deeda to your computer and use it in GitHub Desktop.
Save ovichiro/ad4777347a845b0ba6980810c39deeda to your computer and use it in GitHub Desktop.
Avoid screen tearing with KDE and Nvidia proprietary drivers

Avoid screen tearing with KDE and Nvidia proprietary drivers

Create the file /etc/modprobe.d/nvidia-modeset.conf.
Add setting options nvidia_drm modeset=1 inside the file.
Then sudo update-initramfs -u in the terminal.
Restart.

This generates some input lag, but seems comparable to the default Intel setting with the integrated graphics.
Games play fine (e.g. FPS games).
Tested with Kubuntu 18.04, nvidia-390 drivers, Nvidia 960M card on an ASUS ROG laptop.
You may have quirks depending on your hardware vendor. The only one I'm seeing is desktop icons look weird after waking from suspend. Select all and drag with mouse and they get back to normal.

According to comments in this thread: https://devtalk.nvidia.com/default/topic/1032482/linux/optimus-on-ubuntu-18-04-is-a-step-backwards-but-i-found-the-first-good-solution/2

Modeset=1 enables prime sync which only helps for tearing on displays connected to the Intel card. Tearing on any other screen is an NVIDIA problem. Try enabling pipeline composition (via nvidia-settings GUI for instance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment