Screen Tearing solution

I’ve been having the usual screen-tearing issues when gaming or playing videos. After some research here, I modified my nvidia.conf file with the ‘Force Composition’ line, which seemed to cure the tearing - but I now get a completely blank display when I switch on. I can only get the DE back by ctrl-alt-del, bringing up the lock screen, then unlocking it. I can live with it, but it’s a bit annoying :unamused:
If someone could either point me towards a solution, or point out which dumb error I’ve made, I’d be grateful :grin:

inxi:

System:
  Host: kes-pc Kernel: 4.14.52-1-MANJARO x86_64 bits: 64 Desktop: N/A 
  Distro: Manjaro Linux 17.1.11 Hakoila 
Machine:
  Type: Desktop Mobo: Intel model: DH55HC v: AAE70933-505 
  serial: <root required> BIOS: Intel v: TCIBX10H.86A.0037.2010.0614.1712 
  date: 06/14/2010 
CPU:
  Quad Core: Intel Core i5 750 type: MCP speed: 1197 MHz 
  min/max: 1197/2661 MHz 
Graphics:
  Card-1: NVIDIA GF116 [GeForce GTX 550 Ti] driver: nvidia v: 390.67 
  Display: x11 server: N/A driver: nvidia resolution: <xdpyinfo missing> 
  OpenGL: renderer: GeForce GTX 550 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 390.67 
Network:
  Card-1: Intel 82578DC Gigabit Network Connection driver: e1000e 
  Card-2: Realtek RTL8192CU 802.11n WLAN Adapter type: USB driver: rtl8192cu 
Drives:
  HDD Total Size: 465.76 GiB used: 10.11 GiB (2.2%) 
Info:
  Processes: 151 Uptime: 3h 02m Memory: 7.73 GiB used: 1.17 GiB (15.1%) 
  Shell: bash inxi: 3.0.12 

dmesg (don’t know if this is relevant, but…)

[    9.387193] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/input11
[    9.387265] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/input12
[    9.387333] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/input13
[    9.387400] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.0/0000:01:00.1/sound/card1/input15
[    9.582952] kvm: VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL does not work properly. Using workaround
[    9.909038] Linux agpgart interface v0.103
[    9.924138] mousedev: PS/2 mouse device common for all mice
[   10.289359] Adding 9227464k swap on /dev/sda2.  Priority:-2 extents:1 across:9227464k FS
[   11.122796] nvidia: loading out-of-tree module taints kernel.
[   11.122811] nvidia: module license 'NVIDIA' taints kernel.
[   11.122813] Disabling lock debugging due to kernel taint
[   11.141350] rtl8192cu: Chip version 0x11
[   11.147073] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[   11.147387] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[   11.147467] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.67  Fri Jun  1 04:04:27 PDT 2018 (using threaded interrupts)
[   11.228080] rtl8192cu: Board Type 0
[   11.228309] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   11.228359] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   11.294314] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   11.294756] usbcore: registered new interface driver rtl8192cu
[   11.363784] usbcore: registered new interface driver rtl8xxxu
[   11.370690] rtl8192cu 2-1.3:1.0 wlp0s29u1u3: renamed from wlan0
[   11.418417] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.67  Fri Jun  1 03:15:43 PDT 2018
[   11.949967] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   11.949971] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0

nvidia.conf - I’ve commented out the Force Composition line for now:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 390.67  (buildmeister@swio-display-x64-rhel04-18)  Fri Jun  1 04:26:22 PDT 2018

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

Section "Files"
EndSection

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

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
	Option "NoLogo" "1"
#		Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
 

Thanks

Is this on Xfce? If so, try this fix. You may have to add a delay like I did (last post in thread)

I believe you have misconfigured /etc/X11/xorg.conf.d/20-nvidia.conf

This is mine:

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

Section "Files"
EndSection

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

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
        Identifier "Nvidia Card"
        Driver     "nvidia"
        VendorName "NVIDIA Corporation"
        BoardName "GeForce 8500 GT"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "AllowIndirectGLXProtocol" "off"
    Option         "TripleBuffer" "on"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Perfect! That seems to have nailed it :grin: Many thanks

1 Like

I did try moving the ForceComposition line to the “screen” section, as in your example, but it didn’t make any difference. Or should I have put in the extra lines from yours as well?
I have solved the issue by adding an autostart command, but I’m just curious, being a n00b…

It certainly wouldn’t hurt to try the triple buffering option.

This mine for the last 5 years

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
1 Like

Just wanted you to know that if you play competitive games triplebuffering and forcecompositionpipeline option are causing massive input lags. Try to avoid using triple buffer and compositor, nvidia full composition pipelines is enough. To quickly switch your composition pipeline you can use this command in terminal:

nvidia-settings --assign CurrentMetaMode=“DPY-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}”

or to turn it off,

nvidia-settings --assign CurrentMetaMode=“DPY-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=Off, ForceFullCompositionPipeline=Off}”

Edited:
I edit the command. You need to enter your metamode as shown with nvidia-settings -q all | grep CurrentMetaMode and add the composition pipeline options. DPY-1 is my display device id, yours can be different.

2 Likes

Great! Can you mark this thread as solved then (just click on the check-mark at the bottom of the post that was the solution).

This is what I do too.

Most of the games I play are fairly slow-paced (my connection speed causes more lag issues than my display driver, to be fair :laughing: ) but I’ll keep that suggestion in mind, thanks!

Sorry I’m not a gamer, I should have mentioned that , but I always forget. I always think of gaming as a Windows thing.

I guess if you were concerned about it you could have 2 different profiles and simply rename them when you wanted to switch.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.