1

I have persistent screen tearing on Nvidia Optimus laptop running Mint (but every other distro I've tried as well) and commonly recommended solutions don't work for me. I have an external monitor that I commonly use alongside the built-in laptop monitor.

nvidia-smi output:

user@mint:~$ nvidia-smi 
Wed Nov 13 18:46:55 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1050    Off  | 00000000:01:00.0  On |                  N/A |
| N/A   44C    P0    N/A /  N/A |    581MiB /  3020MiB |      2%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1110      G   /usr/lib/xorg/Xorg                           327MiB |
|    0      1706      G   cinnamon                                      50MiB |
|    0      2005      G   /usr/lib/firefox/firefox                      27MiB |
|    0      2039      G   /usr/lib/firefox/firefox                     151MiB |
+-----------------------------------------------------------------------------+

1st commonly offered solution - turn on PRIME Syncronization

user@mint:~$ sudo cat /sys/module/nvidia_drm/parameters/modeset
[sudo] password for user:        
Y

I did that but I still get screen tearing.

2nd commonly offered solution - Force Composition Pipeline

This does work, but I cannot for the life of me figure out how to make it persist. If I go to 'NVIDIA X Settings' I can enable 'Force Composition Pipeline' or 'Force Full Composition Pipeline'; both work seemingly the same, but the option gets disabled when I reboot. If I try to save the configuration to X config file it results in disabling of the inbuilt monitor. I tried using the following command and setting it to execute on startup:

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

It also does work (doesn't disable built-in display), but it resets my display configuration. I can manually fix it, but this would be annoying to do on every reboot.

From what I understand I need to modify the command to account for the in-built display, but even after reading the documentation I could find (such as ArchWiki) I could not figure out how to do that.

I also get this output:

user@mint:~$ nvidia-settings --query CurrentMetaMode

  Attribute 'CurrentMetaMode' (mint:0.0): id=50, switchable=no,
  source=RandR :: DPY-0: nvidia-auto-select @1920x1080 +1920+0
  {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0,
  ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}

Does anyone have any idea where to go from here?

EDIT: Requested output:

user@mint:~$ xrandr --props | awk '/ conn/{flag=1;}/discon/{flag=0}flag'
HDMI-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 527mm x 296mm
    CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0 
    EDID: 
        00ffffffffffff0004724c066c325074
        2d1b010380351e78ca6c40a755519f27
        145054bfef80714f8140818081c08100
        9500b300d1c0023a801871382d40582c
        45000f282100001e000000fd00384c1f
        5311000a202020202020000000fc004b
        41323431590a202020202020000000ff
        005442514545303031383533310a01a3
        020322f14f9001020304050607111213
        1415161f230907078301000065030c00
        1000023a801871382d40582c45000f28
        2100001e011d8018711c1620582c2500
        0f282100009e011d007251d01e206e28
        55000f282100001e8c0ad08a20e02d10
        103e96000f2821000018000000000000
        00000000000000000000000000000005
    BorderDimensions: 4 
        supported: 4
    Border: 0 0 0 0 
        range: (0, 65535)
    SignalFormat: TMDS 
        supported: TMDS
    ConnectorType: HDMI 
    ConnectorNumber: 4 
    _ConnectorLocation: 4 
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
eDP-1-1 connected 1920x1080+0+568 (normal left inverted right x axis y axis) 344mm x 194mm
    EDID: 
        00ffffffffffff0009e5000700000000
        011a0104a522137802c9a0955d599429
        24505400000001010101010101010101
        0101010101019c3b803671383c403020
        360058c21000001a0000000000000000
        00000000000000000000000000fe0042
        4f452043510a202020202020000000fe
        004e5631353646484d2d4e34380a007c
    PRIME Synchronization: 1 
        supported: 0, 1
    scaling mode: Full aspect 
        supported: Full, Center, Full aspect
    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
   1920x1080     60.03*+  60.01    59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
  1680x1050 (0x49) 146.250MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock  65.29KHz
        v: height 1050 start 1053 end 1059 total 1089           clock  59.95Hz
  1280x1024 (0x51) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1440x900 (0x52) 106.500MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz
        v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1280x960 (0x55) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1280x800 (0x5e) 83.500MHz -HSync +VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock  49.70KHz
        v: height  800 start  803 end  809 total  831           clock  59.81Hz
  1024x768 (0x66) 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 (0x75) 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
  800x600 (0x76) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0x84) 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

Ran out of characters...

user@mint:~$ xrandr --verbose | awk '/ conn/{flag=1;}/discon/{flag=0}flag'

https://paste.sh/JDe-NRuv#eH0BRJYykGXuKjVHo_2ip_mQ

7
  • Can you add the log output of xrandr --props | awk '/ conn/{flag=1;}/discon/{flag=0}flag' – Neticegear Nov 13 '19 at 19:49
  • Thanks for your effort. Added requested output to the main body. – JR6 Nov 14 '19 at 18:15
  • Unless I am missing something in your xrandr output, one possible reason for the display configuration reset at reboot (I am guessing the resolution drops from 1920x1080 to the next available one which is 1680x1050 in the list) is the fact you are running a 1080p mode that does not seem to be present among the configured and added modes (no 1080p setting like: 1920x1080 (0x5a) 138.500MHz +HSync +VSync *current +preferred). Can you add the output of xrandr --verbose | awk '/ conn/{flag=1;}/discon/{flag=0}flag' instead as well as awk '/Screen/{f=1}f;/EndSection/{ f=0;} [xorg.conf] – Neticegear Nov 14 '19 at 19:24
  • Added the output of the first command. The second one results in an input prompt, I'm not sure if I'm doing something incorrectly... Also, resolution does not drop on reboot. Settings persist, except the compositing settings. – JR6 Nov 14 '19 at 19:42
  • By composition settings, are you refering to for example putting one screen to the left/right/above/below the other, and such(panning, marging etc.)? Because if so, then the issue and the solution does not lie in xorg.conf because the Xserver does not turn on displays not connected to dGPU on its own. Both on my NVIDIA(hdmi)+iGPU(eDP) and my AMD(dvi/hdmi/DP)+Intel iGPU(vga/hdmi) , a post-boot script is required that sources and sets the appropriate provider. I am on my AMDsystem right now and the helper script to turn on igpu on vga has the following lines: sprunge.us/CGaSn8 – Neticegear Nov 16 '19 at 3:35

Your Answer

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

Browse other questions tagged or ask your own question.