Is screen tearing while using Nvidia drivers in Linux driving you nuts? Do you have an Optimus laptop? I believe we may have a solution for you!

I experienced this issue for quite some time before finally finding a fix. This would happen in Ubuntu Mate, Ubuntu and similar distributions where Prime was used as a method to switch between Nvidia and Intel drivers.

Typically on the Intel side of things, everything was fine but as soon as I switched to using my Nvidia driver, all hell would break loose. That was, until I found this solution buried in the Ubuntu forums.

In terminal –

sudo nano /etc/modprobe.d/zz-nvidia-modeset.conf
Now, you're going to add a line such as the one below, replacing 384 with whichever driver version you are using, Add this line, adjust 375 if using newer driver, ex. 381 or 384 ect.
options nvidia_375_drm modeset=1

Updated for Ubuntu 18.04: I took me a while to find this but if you are using Ubuntu 18.04 or any of it's derivatives and finding the above does not work, it's because prime synchronization does not require the driver number. The proper command should be:

options nvidia_drm modeset=1

Save and exit nano

Now type:
sudo update-initramfs -u

Reboot and keep your fingers crossed. If all goes well, things should be fixed.

Let me know if this works for you or if you have another workaround that has been successul.

Mike Johnston
Mike is the founder and editor of CMS Critic. He consults with vendors and the public to help them find the right products for their websites and businesses. When he's not working here, he's off mixing cocktails for his wife's website, The Kitchen Magpie. You can check out some of his great cocktail shots over on Instagram.

Wix Review – Create Beautiful Websites Quickly & Easily

Previous article

Duda Review: A Powerful Platform for Web Design Agencies

Next article

You may also like