Ubuntu – Nvidia GT 710 screen tearing on 18.04 (horizontal lines in videos)

18.04driversgraphicsmultiple-monitorsnvidia

I have a 2-monitor setup on my 18.04, one on the internal Intel GPU, and the second screen via DVI-D running on NVIDIA GT 710 card, while I have the latest 415 NVIDIA driver.
When watching videos on the NVIDIA-connected monitor, I get horizontal lines that keep moving up-and-down the video, I believe it's called screen tearing.

I have attempted proposed solutions, such as setting nvidia-drm.modeset=1 to the line GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, but then the NVIDIA monitor will block on 'Starting Gnome DISPLAY Manager' during boot, while the other monitor logs in fine; then in Displays configuration I don't see the second monitor anymore.

Update: Intel monitor is tearing as well, although a little less.

Running xrandr --verbose returns the following (filtered for relevance):

Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384
DVI-D-0 connected 1920x1200+1920+0 (0x46) normal (normal left inverted right x axis y axis) 518mm x 324mm
    Identifier: 0x2b1
    Timestamp:  148801474
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 1.0
    Clones:    
    CRTC:       1
    CRTCs:      1 2 3 4
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    _MUTTER_PRESENTATION_OUTPUT: 0 
    CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
    BorderDimensions: 4 
        supported: 4
    Border: 0 0 0 0 
        range: (0, 65535)
    SignalFormat: TMDS 
        supported: TMDS
    ConnectorType: DVI-D 
    ConnectorNumber: 0 
    _ConnectorLocation: 0 
  1920x1200 (0x46) 154.000MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1920x1080 (0x2b2) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
DP-1-1 connected primary 1920x1200+0+0 (0x46) normal (normal left inverted right x axis y axis) 518mm x 324mm
    Identifier: 0x42
    Timestamp:  148801426
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 1.0
    Clones:     HDMI-1-1
    CRTC:       0
    CRTCs:      0 5 6
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    _MUTTER_PRESENTATION_OUTPUT: 0 
    PRIME Synchronization: 0 
        supported: 0, 1
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    non-desktop: 0 
        range: (0, 1)
    link-status: Good 
        supported: Good, Bad
  1920x1200 (0x46) 154.000MHz +HSync -VSync *current +preferred
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz
  1920x1080 (0x47) 148.500MHz -HSync -VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
DP-1-2 disconnected (normal left inverted right x axis y axis)
    Identifier: 0x44
    Timestamp:  148801426
    Subpixel:   unknown
    Clones:    
    CRTCs:      0 5 6
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    PRIME Synchronization: 1 
        supported: 0, 1
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    audio: auto 
        supported: force-dvi, off, auto, on
    non-desktop: 0 
        range: (0, 1)
    link-status: Good 
        supported: Good, Bad
  1920x1200 (0x46) 154.000MHz +HSync -VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  74.04KHz
        v: height 1200 start 1203 end 1209 total 1235           clock  59.95Hz

Best Answer

I have same issue here. I found some of solution, maybe this helped

1. edit this file (or create it)

sudo nano /etc/modprobe.d/zz-nvidia-modeset.conf

2. and add this line

options nvidia_drm modeset=1

3. after all, update initramfs with

sudo update-initramfs -u

4. then reboot.

Source: https://www.cmscritic.com/stop-screen-tearing-with-optimus-laptops-using-nvidia-drivers-in-linux/

Related Question