Fix Screen Tearing in Ubuntu 18.04 Optimus Laptops

Nvidia Linux driver

For Ubuntu 18.04 users plagued by screen tearing issue while using NVIDIA proprietary drivers, this quick tutorial may help you via enable PRIME Synchronization on Optimus.

Screen tearing usually happens on Ubuntu Linux laptop that uses Prime to switch between NVIDIA and Intel drivers.

1. Open terminal (either via Ctrl+Alt+T or by searching for ‘terminal’ from software launcher) and run command to create a new config file:

sudo gedit /etc/modprobe.d/nvidia-drm-nomodeset.conf

Type your password (no asterisks feedback) when it prompts and hit Enter.

2. When the file opens after running the previous command, add following line and save the file.

options nvidia-drm modeset=1

3. Finally update intramfs and reboot your machine.

sudo update-initramfs -u

To check if previous changes work after reboot, run command:

sudo cat /sys/module/nvidia_drm/parameters/modeset

It should output ‘Y’.

In addition, to get much SMOOTHER Nvidia window dragging experience, you can also do:

1. Set maximum performance in Nvidia X Server Settings -> PowerMizer.

2. If you have MORE than enough RAM, set swap tendency to a MUCH lower value by running command to edit sysctl.conf:

sudo gedit /etc/sysctl.conf

and add following 2 lines when the file opens:

via: ubuntuforums

Original Article