3

I've installed Manjaro Linux. My graphics card is an Nvidia GTX 1050Ti.

When I boot my computer and try to watch videos, I notice harsh screen tearing. This problem is resolved when I go to the Nvidia X Server Settings and enable the option "Force Full Composition Pipeline".

Is there any way to permanently set this option so that I don't have to manually enable it every time I reboot my computer?

1

You can set the "Force Full Composition Pipeline" option in a terminal, like this:

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

To do it automatically, the easiest way to do so is to put it inside your .bashrc. To proceed just type this inside a terminal:

$ echo "$ nvidia-settings --assign CurrentMetaMode=\"nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }\"" >> ~/.bashrc

You can log out and log back in (or reboot), to have this applied. Note that this is meant to be a one monitor solution only, because of the "auto-select".

Another method would be to do the same inside ~/.nvidia-settings-rc but the behaviour could change over time, while in .bashrc, you are sure on how it is done.

Addendum

Regarding screen tearing, you might want to try other tweaks.

Since you are using Manjaro, I assume you are using KDE. You can tell the window manager (KWin) to use triple buffering or to wait for the current image to be displayed before updating the screen.

1) Wait for the GPU to fully display current image

# echo "export __GL_YIELD=\"USLEEP\"" >> /etc/profile.d/kwin.sh

2) Enable triple buffering in KWin

# echo "export KWIN_TRIPLE_BUFFER=1" >> /etc/profile.d/kwin.sh

Do not have both of the above enabled at the same time. Be sure to enable triple buffering in nvidia-settings if you enable triple buffering in KWin.

| improve this answer | |
  • If he has a xorg.conf file it can be added there to make it perm which would be the correct method. – Jeight Oct 1 '19 at 22:50
1

Adding to Paradox's answer (since it seems I can't post comments...), I would put that command in ~/.bash_profile rather than in ~/.bashrc.

~/.bashrc is sourced every time you open a new bash session, i.e. every time you open a new terminal emulator window/tab.

On the other hand ~/.bash_profile is sourced only once when you start bash as a login shell, e.g. when you log in a graphical desktop environment. c.f. https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files

EDIT: There's now a better solution to the tearing issue with KWin when using the nvidia proprietary driver; you need to have a recent enough version of kwin, version >= 5.12 [1] and enable modesetting for the nvidia-drm kernel module [2]. I tested that and it works for me with kwin-5.17.80 (git snapshot from openSuse repos) and nvidia 440.26.

EDIT: hmm, there's a side effect to enabling modeset with the nvidia-drm module, resuming from suspend seems to fail...

EDIT (again): it looks like even without enabling modeset with the nvidia-drm module, tearting seems to be gone, for now at least...

[1]https://wiki.archlinux.org/index.php/NVIDIA/Troubleshooting#Avoid_screen_tearing_in_KDE_(KWin) https://phabricator.kde.org/D19867

[2]https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting

| improve this answer | |
1

My laptop is equipped with a Quadro K2100M, running Ubuntu Bionic with KDE Plasma 5.17 (from the neon repo) and using the nvidia-driver-430.

Since I have a different set of configurations for the monitors at home and at work, I needed something dynamic and here is what is working for me:

  1. I wrote the following script to handle the dynamic configuration of the screens (~/bin/force-composition-pipeline.sh):

    #!/bin/bash
    s="$(nvidia-settings -q CurrentMetaMode -t)"
    
    if [[ "${s}" != "" ]]; then
      s="${s#*" :: "}"
      nvidia-settings -a CurrentMetaMode="${s//\}/, ForceCompositionPipeline=On\}}"
    fi
    
  2. I added that script to the autostart:
    chmod +x ~/bin/force-composition-pipeline.sh
    ln -s ~/bin/force-composition-pipeline.sh ~/.config/autostart-scripts/
    
  3. In KDE Plasma settings, in Display and Monitor -> Compositor, I set the Tearing prevention ("vsync") to Never.

Note that I found the non-full ForceCompositionPipeline to be enough for me.

| improve this answer | |
0

Create a text file and paste this:

[Desktop Entry]
Type=Application
Name=nvidia-force-full-compositon
Exec=nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

save the text file as something like this:

nvidia-force-full-compositon.desktop

where .desktop is essential.

Now copy paste it in ~/.config/autostart

Reboot.

| improve this answer | |
New contributor
Fahad Hasan Pathik is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.