I'm having issues with screen tearing on my laptop when browsing the web. The laptop has both integrated graphics from Intel, and an Nvidia GPU. When using it on battery power I use the integrated graphics to increase battery life.
The screen tearing only occurs when using the integrated graphics. I googled for solutions to this problem, and I found one that works. I create a file at
/etc/X11/xorg.conf.d/20-intel.conf with the following contents:
Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TearFree" "true" EndSection
This gets rid of screen tearing when using the integrated graphics, but I can't use the Nvidia GPU as long as that file exists. Nvidia's drivers fail to load properly, and the computer falls back on using the integrated graphics even when I enable the Nvidia GPU in nvidia-settings. In order to re-enable the Nvidia GPU, I have to delete or move the
xorg.conf.d folder and restart the computer.
How do I fix screen tearing when using my laptop's integrated graphics, without being prevented from using the Nvidia GPU?
I'm using an HP spectre x360 with an MX150 Nvidia GPU and an Intel Core i7-8550U CPU. I'm running i3-gaps with i3-gnome on Ubuntu 19.04.
I switch back and forth by using
nvidia-settings and changing the prime profile between one and the other:
xorg.conf.d directory: [Failed] There's already an
xorg.conf.d directory at
/usr/share/X11/xorg.conf.d, and it contains a number of different configuration files. I tried adding the
20-intel.conf file there, and that fixed screen tearing but still broke the Nvidia GPU (and I had to remove the file to get the GPU to work again).