2

Ok i know there are alot answers regarding intel graphics or nvidia graphics screen tearing but i have scoured every thread i could find and here's what i came across (i am using ubuntu 20.04)

My Setup Nvidia Gtx 1050 ti running nvidia 470 latest stable driver running 1080p Monitor

Another monitor is connected through VGA in intel graphics running 1366x1768 both at 60 hertz

Initially both monitors had screen tearing, but i fixed the screen tearing for the nvidia monitor with

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

and adding this to startup apps, cause saving nvidia-settings to /etc/X11/xorg.conf disables intel graphics monitor

So now when nvidia tearing is fixed, intel tearing is still present, the answers i find that said to fix screen tearing is this

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
EndSection

and adding this to /etc/X11/xorg.conf.d/20-intel.conf which doesn't work in my case.

any suggestions what i should do ? this question have been asked on askubuntu few times before, but they don't seem to get answers. see this , and this also they have same problem as mine

also this is my xrandr output

Screen 0: minimum 8 x 8, current 3286 x 1080, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     74.97 +  60.00    60.00*   59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1400x1050     59.98  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-3 disconnected (normal left inverted right x axis y axis)
DP-1-2 connected 1366x768+1920+142 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
  1280x720 (0x1ce) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1024x768 (0x1d2) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x1d3) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x1d4) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x1d5) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  640x480 (0x1d8) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0x1d9) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz

Is this a bug ? any suggestions would be really helpful, thanks !

EDIT 1: suggested information output for sancho.s ReinstateMonicaCellio's answer

shantanu@shantanu-pc:~$ inxi -F
    System:    Host: shantanu-pc Kernel: 5.11.0-37-generic x86_64 bits: 64 Desktop: Gnome 3.36.9 
               Distro: Ubuntu 20.04.3 LTS (Focal Fossa) 
    Machine:   Type: Desktop System: Gigabyte product: H310M H v: N/A serial: <superuser/root required> 
               Mobo: Gigabyte model: B250M H v: x.x serial: <superuser/root required> 
    CPU:       Topology: Quad Core model: Intel Core i5-7400 bits: 64 type: MCP L2 cache: 6144 KiB 
               Speed: 800 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 1318 2: 1513 3: 2666 4: 1741 
    Graphics:  Device-1: Intel HD Graphics 630 driver: i915 v: kernel 
               Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 470.63.01 
               Display: x11 server: X.Org 1.20.11 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
               resolution: 1920x1080~75Hz, 1366x768~60Hz 
               OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 470.63.01 
    Audio:     Device-1: Intel 200 Series PCH HD Audio driver: snd_hda_intel 
               Device-2: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel 
               Sound Server: ALSA v: k5.11.0-37-generic 
    Sensors:   System Temperatures: cpu: 32.8 C mobo: 29.8 C gpu: nvidia temp: 38 C 
               Fan Speeds (RPM): N/A gpu: nvidia fan: 48%

Output 2:

shantanu@shantanu-pc:~$ lspci -knn | grep -EA3 'VGA|3D|Display'
00:02.0 Display controller : Intel Corporation HD Graphics 630 
    DeviceName:  Onboard IGD
    Subsystem: Gigabyte Technology Co., Ltd HD Graphics 630
    Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] 
    Subsystem: ZOTAC International (MCO) Ltd. GP107 [GeForce GTX 1050 Ti] 
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia 

Output 3:

shantanu@shantanu-pc:~$ grep "LoadModule" /var/log/Xorg.0.log
[     6.323] (II) LoadModule: "glx"
[     6.557] (II) LoadModule: "nvidia"
[     6.560] (II) LoadModule: "nouveau"
[     6.561] (II) LoadModule: "modesetting"
[     6.562] (II) LoadModule: "fbdev"
[     6.562] (II) LoadModule: "vesa"
[     6.577] (II) LoadModule: "fb"
[     6.578] (II) LoadModule: "wfb"
[     6.579] (II) LoadModule: "ramdac"
[     6.580] (II) LoadModule: "fbdevhw"
[     6.581] (II) LoadModule: "glxserver_nvidia"
[     7.510] (II) LoadModule: "glamoregl"
[     7.683] (II) LoadModule: "fb"
[     7.770] (II) LoadModule: "dri2"
[     7.977] (II) LoadModule: "libinput"

Output 4:

    22: None 00.0: 10002 LCD Monitor                                
  [Created at monitor.125]
  Unique ID: UNIQUE ID
  Parent ID: PARENT ID
  Hardware Class: monitor
  Model: "SAMSUNG S19B150"
  Vendor: SAM "SAMSUNG"
  Device: eisa "S19B150"
  Serial ID: "SERIAL ID"
  Resolution: 720x400@70Hz
  Resolution: 640x480@60Hz
  Resolution: 640x480@67Hz
  Resolution: 640x480@72Hz
  Resolution: 640x480@75Hz
  Resolution: 800x600@56Hz
  Resolution: 800x600@60Hz
  Resolution: 800x600@72Hz
  Resolution: 800x600@75Hz
  Resolution: 832x624@75Hz
  Resolution: 1024x768@60Hz
  Resolution: 1024x768@70Hz
  Resolution: 1024x768@75Hz
  Resolution: 1280x720@60Hz
  Resolution: 1366x768@60Hz
  Size: 410x230 mm
  Year of Manufacture: 2012
  Week of Manufacture: 38
  Detailed Timings #0:
     Resolution: 1366x768
     Horizontal: 1366 1436 1579 1792 (+70 +213 +426) +hsync
       Vertical:  768  771  774  798 (+3 +6 +30) +vsync
    Frequencies: 85.50 MHz, 47.71 kHz, 59.79 Hz
  Driver Info #0:
    Max. Resolution: 1366x768
    Vert. Sync Range: 56-75 Hz
    Hor. Sync Range: 30-81 kHz
    Bandwidth: 85 MHz
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #19 (Display controller)
3
  • 1
    Have you tried this answer? Oct 14, 2021 at 21:56
  • yes tried it , it is for nividia which is fine in my case, my nvidia screen tear doesn't happen, problem is intel graphics connected monitor screen tearing. Oct 18, 2021 at 19:46
  • Did you also create the zz-nvidia-modeset.conf file as described? Oct 18, 2021 at 20:29

2 Answers 2

2
+25

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.
8
  • hello posted the information you requested in the edit Oct 19, 2021 at 17:48
  • i think with the information given it would be better for you to suggest Oct 19, 2021 at 18:08
  • 1
    @ShantanuBedajna - Good. As per you added info, I would suggest you go on and try the solutions here. Please post what you get. Oct 19, 2021 at 20:08
  • 1
    @ShantanuBedajna - A few comments: 1) Please add what you posted as comments (what you get after trying each solution) in the body of the question, the same as you did with diagnostic commands. 2) Try the other solutions proposed, and post the results in an organized way, the same as you did very well with diagnostic commands. So far, you seem to have tried only #1. 3) Modify what you posted from lspci -knn | grep -EA3 'VGA|3D|Display', using A4 instead of A3 (that shows one more line). I will wait for your updated question. What you post is essential to understand the case. Oct 20, 2021 at 10:24
  • 1
    Found an alternative solution, very thanks, in most cases your solution would have been perfect. For some reason it was not for me. Screen tearing issue in Ubuntu is almost witchcraft. Very thanks again , your answer helped me narrow it down. Oct 23, 2021 at 0:25
0

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.

3
  • 1
    Do you think this solution work when the 2nd "monitor" is actually a VNC session? I'm trying to resolve a screen tearing problem that happens on my remote computer but not on the locally-attached monitor (which connects through an Nvidia card). Feb 2, 2022 at 15:56
  • it will work if you have nvidia graphics card installed, and solves the tearing issue for dual graphics. Not sure what you mean by 2nd monitor is VNC session Feb 6, 2022 at 17:04
  • I mean by that I don't have a second monitor physically connected, but I am seeing screen tearing on my VNC session to this machine which does not show up on the monitor which is physically connected. And, yes, I do have an Nvidia card installed. Thanks, I'll give this a try. Feb 6, 2022 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .