Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1425  / 3 Years ago, sat, august 7, 2021, 10:59:20

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)

More From » nvidia

 Answers
5

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 '
' ' '|sed -e 's/.*:: (.*)/1
/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 '
' ' '|sed -e 's/.*:: (.*)/1
/g' -e 's/}/, ForceCompositionPipeline = On}/g')"

it will generate something like this


shantanu@shantanu-pc:~$ "$(nvidia-settings -q CurrentMetaMode -t|tr '
' ' '|sed -e 's/.*:: (.*)/1
/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.


[#1119] Sunday, August 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
laiuct

Total Points: 44
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Feb 15, 2021
3 Years ago
laiuct questions
Wed, May 19, 21, 17:43, 3 Years ago
Sun, Oct 24, 21, 23:14, 3 Years ago
Fri, Nov 25, 22, 01:11, 2 Years ago
;