I have Ubuntu 18.04 installed on my Acer Nitro 5 notebook, and I'm using the NVIDIA driver metapackage nvidia-driver-450. I'm observing a lot of screen tearing in my external monitor, connected to the notebook via HDMI cable. I can observe it in videos and when I drag windows around. However, there is no screen tearing on the notebook monitor, only on the external one.

I have already tried the options nvidia-drm modeset=1 solution, it solved the screen tearing only for the notebook monitor, but not the external one.

I also have tried setting "Force Composition Pipeline" in the NVIDIA X Server Settings, it solves the issue, but when I restart the system the notebook monitor stops being recognized (the screen is black, and it is not listed in xrandr). It seems like it is because the Notebook monitor is a PRIME Display, as shown in the link below, and it can't deal with the X Configuration File that the X Server generates.

NVIDIA X Server Settings image

Can someone help me? The only thing I haven't tried yet is using the X X.Org Server (xserver-xorg-video-nouveau), but I didn't want to use it because I have an GTX 1650, and I understand the Nouveau isn't that good.


I let the nvidia-settings generate a conf file. That file was copied to: /etc/X11/xorg.conf.d/90-dual.conf.

You might have to setup both monitors in your config. See here for an example. Note that I've configured

Option "Xinerama" "0"

in the "ServerLayout" section

The following contents may not apply to your monitor, but it might give a gist how it should look like. After copying that file you need to reboot...

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"

Section "Files"

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "<your monitor here>"
    HorizSync       30.0 - 83.0
    VertRefresh     55.0 - 76.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce <your version here>"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DVI-D-0: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
  • I have done that, but after rebooting the notebook monitor stopped being recognized. It blacks out and xrandr won't list it anymore. Does yours work fine after generating that file? Do you use a notebook or a desktop? – AmandaB Nov 16 '20 at 19:55
  • Both. The conf file above is from my desktop. But I've done a similar config for my Thinkpad. So my educated guess is the that the second monitor does not have any EDID information. Try to apply a second "monitor" section in your conf. -> see my revised answer – kanehekili Nov 16 '20 at 20:02
  • What I think happens is that the notebook monitor can't deal with the file generated by the NVIDIA X Server. Do you have an example of how the file would be with the second monitor section? Coudn't find on Google :/ – AmandaB Nov 16 '20 at 20:05
  • As I said: see my revised answer. One more question: Are you using wayland? If yes, try to switch to X-Server – kanehekili Nov 16 '20 at 20:07
  • Ok, I'll try that. The configuration on your Thinkpad is something like that too? Do I have to add any other section other than another "monitor" section? – AmandaB Nov 16 '20 at 20:10

So, with the help of this, this and this post, I was able to find a workaround. Since using "Force Composition Pipeline" in NVIDIA X Server stops the screen tearing, but makes the notebook monitor stop being recognized, the workaround is to run the Force Composition Pipeline command after every startup.

I just added the command bash -c "sleep 10 && nvidia-settings --assign CurrentMetaMode=\"$(xrandr | sed -nr '/(\S+) connected (primary )?([0-9]+x[0-9]+)(\+\S+).*/{ s//\1: \3 \4 { ForceCompositionPipeline = On }, /; H}; ${ g; s/\n//g; s/, $//; p }')\"" (found in this post) in the startup commands, and now the second monitor has no screen tearing, and I have no problems after shutting the notebook down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.