Screen Tearing on Intel Graphics with Dual Monitor Setup Nvidia and Intel

Solution 1:

It may be the case that what you used in /etc/X11/xorg.conf.d/20-intel.conf is not enough. Without having details on your system, I will suggest first a few things to try. Then, a few pieces of information for you to post on your system.

Possible solutions

Post in the body of the question the outcome of the following options (please copy+paste verbatim when applicable):

  1. Driver. Perhaps the driver you are using in

    Driver      "intel"
    

    should be changed. Try instead modesetting or i915 (reboot after each change). Source.

  2. Further options. Include one or more of the extra options (replace XXXX with your driver)

     Section "Device"
         Identifier "Intel Graphics"
         Driver "XXXX"
         Option "TearFree"    "true"
         Option "TripleBuffer" "true"
         Option "AccelMod"    "uxa"
         Option "DRI"         "3"
     EndSection
    
  3. Module Section. Add

     Section "Module"
         Load "dri3"
     EndSection
    

    above Section "Device". Source.

  4. Remove Fractional Scaling to check if this adds to the combination of factors leading to screen tearing. Source.

  5. Removing the intel driver was suggested, with a some positive feedback. I would consider it as a last resort to try.

Further info on your system

Post in the body of the question the output of the following commands:

$ inxi -F
$ lspci -knn | grep -EA4 'VGA|3D|Display'
$ grep "LoadModule" /var/log/Xorg.0.log
$ hwinfo --monitor

You might need

$ sudo apt install inxi hwinfo

Notes:

  1. Consider using these suggestions as a guide, nos as a step-by-step instructions manual.
  2. Take your time to read linked posts, tinker a bit, and post what you get.
  3. Try reading the output messages and interpret what they tell you. Even web-search a bit. Especially with warnings and errors.
  4. Avoid "narrating" what you obtained; copy+paste the output. Include a screen capture when using a GUI.
  5. Include from copy+paste also the exact command you entered.
  6. If the output of one specific command is very long to post, use pastebin.

Solution 2:

After weeks of tinkering and trying to figure out what might be wrong and after sancho.s ReinstateMonicaCellio's detailed answer and still not fixing the issue i got frustrated and gave up.And thought maybe two monitors connected with two different graphics is doomed with screen tearing on the intel side.

But i accidentally stumbled upon nvidia-prime, and started reading upon it, what i understood is, It let's either gpu render the other gpu monitor's screen. So nvidia can use its processing to render everything connected to intel side.

so the steps i used are

Step 1: enable nvidia force composition pipeline

you have to do it using startup scripts, other methods doesn't work, and don't try to save it to xorg.conf , if you enable from nvidia-settings it will disable the intel display on next reboot.

DO NOT DO THIS enter image description here

i found this script that auto detects your screen configuration and enables nvidia force composition pipeline

nvidia-settings --assign CurrentMetaMode="$(nvidia-settings -q CurrentMetaMode -t|tr '\n' ' '|sed -e 's/.*:: \(.*\)/\1\n/g' -e 's/}/, ForceCompositionPipeline = On}/g')" > /dev/null

But it needed some modification from my end, copy this part and run

"$(nvidia-settings -q CurrentMetaMode -t|tr '\n' ' '|sed -e 's/.*:: \(.*\)/\1\n/g' -e 's/}/, ForceCompositionPipeline = On}/g')"

it will generate something like this

shantanu@shantanu-pc:~$ "$(nvidia-settings -q CurrentMetaMode -t|tr '\n' ' '|sed -e 's/.*:: \(.*\)/\1\n/g' -e 's/}/, ForceCompositionPipeline = On}/g')"
DPY-1: nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, ForceCompositionPipeline = On} : command not found

remove the DPY-1: and the : command not found parts

and modify the command with the generated values like this (Just replacing the edited value with the previously "inside the quotation command")

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, ForceCompositionPipeline = On}"

Step 2: the add it to your startup scripts enter image description here

Step 3: install nvidia-prime

sudo apt install nvidia-prime

switch to nvidia using prime so all the redering is done by nvidia intel screen will be rendered by nvidia too

sudo prime-select nvidia

This will effectively fix the screen tearing, only drawback is nvidia gpu usage will be higher cause it is doing rendering for two monitors, while intel just outputs it.

This was a long lasting issue on many threads, and maybe it will help somebody who is searching for help.