LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Screen tearing. (https://www.linuxquestions.org/questions/slackware-14/screen-tearing-4175534266/)

Death On Wings 02-17-2015 06:43 AM

Screen tearing.
 
Hello fellow slackware users.

I am using 14.1 with the latest nvidia drivers installed and everything is working fine.
But there is one thing that is very annoying, when I watch movies thru vlc and other media players I get very bad screen tearing and I just can't find any way to get rid of it.

I have tried all of the options in the nvidia-setting but nothing is helping.

Is there a way to solve this or so I just have to live with it?

schmatzler 02-17-2015 06:50 AM

This problem went away when I started using a compositor like Compiz.

Screen Tearing also goes away when you activate the desktop effects in KDE.

Additionally, the nvidia settings should have an option called "Sync To VBlank". (I just googled that, as I have an AMD card)

phenixia2003 02-17-2015 06:59 AM

Hello,

You can try to set ForceFullCompositionPipeline to On. Here is how this works :
Code:

$ nvidia-settings --assign CurrentMetaMode="<CONNECTED_DEVICE> { ForceFullCompositionPipeline=On }"
where <CONNECTED_DEVICE> is given by :
Code:

$ xrandr | grep " connected "
For instance, on my side, I have this :
Code:

$ xrandr | grep " connected "
DVI-D-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm

so, I use that :
Code:

$ nvidia-settings --assign CurrentMetaMode="DVI-D-0: 1920x1080 { ForceFullCompositionPipeline=On }"
To make this permanent, you can add the option below in your xorg config file :
Code:

Option          "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline=On }"
On my side, I have a configuration file in /etc/X11/xorg.conf.d dedicated to nvidia which is called 10-nvidia.conf and contains :
Code:

# Important note about the attribute ForceFullCompositionPipeline
# ===============================================================
#
#  Setting the attribute "ForceFullCompositionPipeline" to "On"
#  solves the tearing issue on nvidia kepler based videocards.
#
# ATTENTION:
# ---------
# The use of ForceFullCompositionPipeline=On might reduce performance
# in some video-games. To avoid that, this attribute can be disabled
# using nvidia-settings before running any game as below :
#
#    $ nvidia-settings --assign CurrentMetaMode="<CONNECTED_DEVICE> { ForceCompositionPipeline = Off }"
#
#  <CONNECTED_DEVICE> must be replaced with the connected device
#  returned by the command :
#
#    $ xrandr | grep " connected"
#
#  For instance, if running the command above returns :
#
#      DVI-D-0 connected primary 1920x1080+0+0 ...
#
#  Then, the string <CONNECTED_DEVICE> will be : "DVI-D-0: 1920x1080"
#
# Source: https://devtalk.nvidia.com/default/topic/543305
#
Section "Device"
        Identifier      "Device0"
        Driver          "Nvidia"
        VendorName      "Nvidia Corporation"
        BoardName      ""

        Option          "UseEdidDpi" "False"
        Option          "DPI" "120 x 120"

        Option          "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline=On }"
EndSection

Hope this helps.

--
SeB

GazL 02-17-2015 07:30 AM

Anything from 320.xx onwards gave me tearing on 'xv' video output. I switched back to the "legacy 304.xx" drivers and the problem went away.

dugan 02-17-2015 09:29 AM

I also think that the issue is with the newer NVidia drivers.

I get around it by setting VLC and MPlayer to render movies using either vdpau or OpenGL, not xv.

FullForceCompositionPipeline didn't make a difference for me.

And we did have an earlier thread about this:

Screen tearing with VLC only

stureedy 08-14-2015 06:58 AM

From what I've read, this is due to a bug in Compiz, discovered and reported by Arthur Huillet. I have yet to find a .patch file for compiz-0.8.8, which is what I'm using on Slackware 14.1, but I did find and unofficial release of compiz-0.8.10 at http://www.northfield.ws/projects/co...leases/0.8.10/
If I get some time, I'll try to build this and see if it fixes the issue.
If anyone else out there has the time and ability, I'd love to have some help (or another person or twenty working on this): I gotta have my wobbly windows!

stureedy 08-18-2015 08:03 AM

I built and installed compiz (core) v0.8.10 on my Slackware 14.1 box and the problem seems worse. When (if) I get time, I'll try building all of the pieces of compiz-fusion v0.8.10 and see if that improves things.
Fun, fun, fun!
Stu...

stureedy 08-21-2015 07:52 PM

Good News! The .Slackbuilds for compiz 0.8.10 are now available on http://slackbuilds.org/!! woohoo! Big thanks to M.Dinslage (for the new .SlackBuilds) and mrscottm at northfield.ws!
I'm now using them with my build of compiz (core) and it seems to work. I'll be able to test the tearing (no redraw) issue when I get back to my office machine!
Progress!

metaschima 08-21-2015 08:36 PM

In the past I have gotten the same problem with the 'xv' driver. Use 'vdpau' or 'gl' drivers.

stureedy 08-24-2015 01:11 PM

Bummer; I spoke too soon and forgot to actually read the documentation. While compiz 0.8.10 is an excellent update, it does not include the nvidia patch. In fact, my screen issues got much worse under Slackware64 Current with compiz 0.8.10!

I guess it's back to the drawing board for me!

Daedra 08-24-2015 04:37 PM

Quote:

Originally Posted by stureedy (Post 5410439)
Bummer; I spoke too soon and forgot to actually read the documentation. While compiz 0.8.10 is an excellent update, it does not include the nvidia patch. In fact, my screen issues got much worse under Slackware64 Current with compiz 0.8.10!

I guess it's back to the drawing board for me!

Hi stureedy, I maintain the compiz packages over at SBo. The bug you are referring to above is for the 0.9 branch of compiz, not for the 0.8 branch which are two different forks at this point. I fixed my screen tearing issues with compiz by either installing the legacy Nvidia driver or setting the ForceFullCompositionPipeline to on in your xorg.conf. Also what model is your nvidia card? Gentoo has a patch that is supposed to address nvidia screen tearing issues but I have never applied it to my compiz-core build because the above fixes my problem, however here is a link to the patch if you want to try it http://data.gpo.zugaina.org/stuff/x1..._tearing.patch

If you need a slackbuild for it let me know, I have one ready to go that I use. I can't guarantee that it will fix your problem but I suppose it is worth a try.

stureedy 08-29-2015 01:07 PM

Hey Daedra!
Thanks so much! It looks like the ForceFullCompositionPipeline setting fixed the issues I was having (at least in -current with NVidia driver 352.30). I'm confident the same will work for 14.1 (where I'm using NVidia 352.30 with kernel 3.10.87).
Progress!

Drakeo 08-29-2015 05:27 PM

on the latest nividia the adaptive mode handles most of this for you. think of a video of thousands of textures the adaptive setting syncs this and then reduces tearing. you have auto adaptive and max . Then set the setting so it enhances the program running.
or you can go brute force. ForceFullCompositionPipeline
thing to remember the Nvidia blob driver has been changed. It works by heat as the heat goes up the the gpus are throttle back.
this is what has allowed more overclocking for linux. such as fan speed settings etc etc. just a note.

enorbet 08-29-2015 05:35 PM

FWIW I have found KWin to be a superior compositor to Compiz, which AFAIK has all but ceased development. KWin is in continuous development. In my case it is ultra simple to use since I have KDE installed but generally use Xfce. It is my understanding that it does not take a full KDE install to have KWin but I don't know the file list required. I just have heard it is reasonably minimal.

dugan 09-24-2015 10:38 PM

I have version 349.16 of the NVidia drivers and the following /usr/share/X11/xorg.conf.d/10-nvidia.conf:

Code:

Section "Device"
    Identifier  "Device0"
    Driver  "nvidia"
    VendorName "Nvidia Corporation"
    BoardName ""
EndSection

Section "Screen"
  Identifier    "Screen0"
  Device        "Device0"
  Option        "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline=On }"
EndSection

Is that correct?

Compton's currently running and it's set to unredirect fullscreen windows. Everything plays tear-free except Youtube in Chromium, and Youtube in Chrome plays tear-free if I turn Compton off.


All times are GMT -5. The time now is 06:01 PM.