Tearing on thunderbolt 3 connection with two external screens on Lenovo P50 with M2000M

Hi,

I’ve got Ubuntu 16.04 with 370.28 driver on Lenovo P50 with M2000M.
I also have ‘dongle’ that converts Thunderbolt3 output on this laptop to two DP ports. This is a ‘passive’ dongle in a sense that it just forward outputs from TB3 port, not an external graphics card.

So I have three screen connected like this:
DP-4 connected primary 1920x1080+0+608 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 60.02*+
DP-5 connected 2560x1440+1920+480 (normal left inverted right x axis y axis) 708mm x 398mm
2560x1440 59.95*+
1920x1080 60.00 59.94 50.00 23.97 60.05 60.00 50.04
1680x1050 59.95
1600x900 60.00
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.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-6 connected 1080x1920+4480+0 left (normal left inverted right x axis y axis) 531mm x 299mm
1920x1080 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94

And when I move things around on screen connected to DP-5 I see quite bad tearing. Other screens are fine.

If I connect ‘middle’ screen via laptop’s mini-dp port like so:
DP-3 connected 2560x1440+1920+478 (normal left inverted right x axis y axis) 708mm x 398mm
2560x1440 59.95*+
1920x1080 60.00 59.94 50.00 23.97 60.05 60.00 50.04
1680x1050 59.95
1600x900 60.00
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.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-4 connected primary 1920x1080+0+666 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 60.02*+
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 connected 1080x1920+4480+0 left (normal left inverted right x axis y axis) 531mm x 299mm
1920x1080 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94

tearing seems to be gone.

I’ve tried things like ‘ForceFullCompositionPipeline = On’ but they seem to produce no difference.

Is this some sort of inherent problem of TB3 or is it some sort of a bug/config issue that can be fixed?
What sort of additional diagnostics can I provide?

Thanks!

I think I’ve got it.

It turns our that ‘ForceFullCompositionPipeline = On’ wasn’t properly applied because it needs to be directly applied in nvidia settings each time I change screen configuration (e.g. plug/unplug screens, or even resume from sleep). I run Ubuntu Mate and Mate is managing screens via xrandr - and each time Mate changes screens configuration via xrandr ‘ForceFullCompositionPipeline = On’ setting is wiped out.

Is there any way to set ‘ForceFullCompositionPipeline = On’ apply by default on all screens somehow?