nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Always Tearing on 8600 GTS (http://www.nvnews.net/vbulletin/showthread.php?t=152257)

mikeym 06-22-10 08:06 AM

Always Tearing on 8600 GTS
1 Attachment(s)
Hi all.

I hope you can help with a problem I've always had (2-3 years now) with my NV card. I'm afraid this is a bit of a double post as I've posted pretty much the same thing to the Arch linux forum before being directed here.

Ever since I've had my current computer over 2 years now I've had quite considerable tearing video on my screen whenever I have any large degree of movement on my screen (watching videos, dragging windows or turning my head in games).

I decided to look into it and it appears that VSync is designed to remove tearing like this where the tearing is the result of a mismatch between your Monitor Vertical refresh rate and the rate that your video card is updating it (in my case a Gigabyte GeForce 8600 GTS Silent Pipe 3).

So I've tried experimenting with VSync to see if I can remove my tearing problems. I've found that I can't but I've found something interesting. With OpenGL VSync off I get lots of little tears - while turning in an opengl game - however with VSync on I get one near continuous tear about a 5th of the way down the screen. No matter what the OpenGL or Xv VSync options I seem to get lots of little tears when dragging windows around (at the moment in xfce with no effects).

I've also tried enabling triple buffering on my card in xorg.conf which hasn't changed much. I thought that maybe VSync was mis-detecting my refresh rate slightly which is why I was getting a near constant horizontal tear. So maybe I can find some way to tweak my refresh rates for VSync by hand??? If this is the case then I've noticed that my refresh rate on my monitors OSD changes with the screen resolution so any tweak would have to be able to set for each resolution.

I'd appreciate any advice you can give me to beat this once and for all.

P.S. My monitor is a Digimate L-1715 and I'm running the NVidia drivers 195.36.15.

hl_ 06-22-10 11:03 AM

Re: Always Tearing on 8600 GTS
Normal X rendering will always tear (no matter the driver or Xorg version), the only way to get around that to some degree is to use an OpenGL based compositing manager. This will most noticeably cause other issues at video playback however...

The aged X protocols simply have no functionality to completely avoid tearing.

mikeym 06-22-10 11:47 AM

Re: Always Tearing on 8600 GTS
From what I can tell unfortunately XFce compositor doesn't have any option for VSyncing either, so I suppose I can rule out tearing free X.

So what can I do about my tear line in OpenGL? And is tear free video out the window as well?

(edit) P.S. There is quite a lot of tearing in X is this normal? If I drag a window across the screen there will always be one or more tears flickering in the window.

mikeym 06-23-10 06:48 AM

Re: Always Tearing on 8600 GTS
A test against my laptop - a 1GHz PPC with gentoo on it - shows that the tearing on my NVidia card is excessive. Dragging windows in X there is some tearing but not as much as with my NVidia. There is occasional tears in opengl games but not near constant tearing like I experience on my NV card. And there's hardly any with video unlike my NV card.

That's with no VSync I'm aware of and a Radeon 9000 card (hardly high spec).

Any advice would be welcome, as I say it's been bugging me for 2+ years now.

mocharhw 06-23-10 07:55 AM

Re: Always Tearing on 8600 GTS
Are you using the nvidia-settings utility to make sure OpenGL is set to sync to vblank, and do you load the settings when your desktop environment starts up? (nvidia-settings -l) Also you can try declaring these variables in your .profile.

export __GL_SYNC_TO_VBLANK=1

Change DFP-1 to whatever your display is called.

mikeym 06-23-10 09:31 AM

Re: Always Tearing on 8600 GTS
Thanks for your reply mocharhw.

I've tried (the best I could figure out of what you were meaning) what you've said. I ended up putting both sessings in my ~/.xinitrc file (and I checked that the export variables were set once X was started).

This is how it looks:


# ~/.xinitrc
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
export __GL_SYNC_TO_VBLANK=1
nvidia-settings -l &
exec ck-launch-session startxfce4

Unfortunately this did not make any noticeable difference.

I've also tried a few options such as (edit) disabling twin view removing EDID and specifying my own settings from my monitor's user manual. None of which has had much success. Specifying my own settings just seemed to mess everything up.

The commented out lines:

# HorizSync 28.0 - 33.0
# VertRefresh 43.0 - 72.0

are from my monitor's user manual and screw up my settings if used, so I use the ones suggested from the nvidia-xconfig utility.

(edit) Sorry that's the other way round. The commented out lines are the ones suggested by the nvidia-xconfig utility that work and the uncommented Hsync and Vrefresh lines are from my user manual and totally mess things up. The Modlines are also from my user manual and don't appear to give me a proper resolution either.


# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder58)  Fri Mar 12 02:12:40 PST 2010

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

Section "Files"

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

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

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Unknown"
#    HorizSync      28.0 - 33.0
  HorizSync      30-62
#    VertRefresh    43.0 - 72.0
  VertRefresh    50-75
    Option        "DPMS"
# 1280x1024 @ 75.02 Hz (GTF) hsync: 80.20 kHz; pclk: 138.59 MHz
#  Modeline "1280x1024_75.02"  138.59  1280 1368 1504 1728  1024 1025 1028 1069  -HSync +Vsync
# 1280x1024 @ 60.02 Hz (GTF) hsync: 63.62 kHz; pclk: 108.92 MHz
#  Modeline "1280x1024_60.02"  108.92  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
# 1024x768 @ 75.03 Hz (GTF) hsync: 60.17 kHz; pclk: 81.84 MHz
#  Modeline "1024x768_75.03"  81.84  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
#  Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
# 800x600 @ 75.00 Hz (GTF) hsync: 47.03 kHz; pclk: 48.91 MHz
#  Modeline "800x600_75.00"  48.91  800 840 920 1040  600 601 604 627  -HSync +Vsync
# 800x600 @ 60.32 Hz (GTF) hsync: 37.52 kHz; pclk: 38.42 MHz
#  Modeline "800x600_60.32"  38.42  800 832 912 1024  600 601 604 622  -HSync +Vsync
# 720x400 @ 70.09 Hz (GTF) hsync: 29.23 kHz; pclk: 26.19 MHz
#  Modeline "720x400_70.09"  26.19  720 736 808 896  400 401 404 417  -HSync +Vsync
# 640x480 @ 75.00 Hz (GTF) hsync: 37.65 kHz; pclk: 30.72 MHz
#  Modeline "640x480_75.00"  30.72  640 664 728 816  480 481 484 502  -HSync +Vsync
# 640x480 @ 59.94 Hz (GTF) hsync: 29.79 kHz; pclk: 23.83 MHz
#  Modeline "640x480_59.94"  23.83  640 656 720 800  480 481 484 497  -HSync +Vsync
# 640x350 @ 70.10 Hz (GTF) hsync: 25.59 kHz; pclk: 20.06 MHz
#  Modeline "640x350_70.10"  20.06  640 648 712 784  350 351 354 365  -HSync +Vsync

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    Option        "TripleBuffer" "True"
#    Option "UseEDID" "FALSE"
#    Option "TwinView" "FALSE"

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
#        Modes "1280x1024_75.02" "1280x1024_60.02" "1024x768_75.03" "1024x768_60.00" "800x600_75.00" "800x600_60.32" "720x400_70.09" "640x480_75.00" "640x480_59.94" "640x350_70.10"

mikeym 06-24-10 06:28 AM

Re: Always Tearing on 8600 GTS

Here's an example of the kind of tearing I'm experiencing. Maybe it will help determine what the problem is.


mikeym 06-29-10 06:08 AM

Re: Always Tearing on 8600 GTS
* bump * :sry:

mikeym 07-07-10 03:29 AM

Re: Always Tearing on 8600 GTS
This problem will be resolved eventually as at some point I'm going to have to buy a new computer, but it's going to put me off NVidia a bit if this never gets resolved.

mocharhw 07-08-10 06:00 PM

Re: Always Tearing on 8600 GTS
It's hard to tell what I'm seeing in that video. It looks like the mplayer video had some interlacing artifacts in it, but it's hard to tell if there was actual vsync tearing. The desktop window tearing is normal in linux, see many threads about that. It's some limitation of X windows but can be worked around if you use an OpenGL compositing manger like Compiz, but I would get rid of Compiz and just use a normal window manager because it also has its share of video problems. The OpenGL game definitely had vsync tearing in it. Try declaring the environment variables in your ~/.profile or ~/.bashrc files, that's where I do it. Get rid of the TripleBuffer option in your xorg.conf, that causes a ton of OpenGL problems in my experience. Try disabling the composite extension in your xorg.conf and uninstall Compiz, add the following to the bottom:


Section "Extensions"
        Option  "Composite" "Disable"

TwinView should work fine, I use it everyday. Try running glxgears and tell us what it says in the terminal, if you have OpenGL vsync properly turned on then the number of output frames should match your monitor's refresh rate.

mikeym 07-09-10 09:21 AM

Re: Always Tearing on 8600 GTS
Hi mocharhw,

Thanks for the reply. I've had a shot of what you've suggested but with no joy. Tried all the combinations I could think of as well. Disabling composite stops the game I was running from displaying at all so couldn't test it, but a lesser version could be seen in Open Arena still. Triple buffering on and off makes no noticeable difference. You can see from glxgears that it thinks it's synced.


$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.415 FPS
301 frames in 5.0 seconds = 60.021 FPS
301 frames in 5.0 seconds = 60.017 FPS

And from some other output it appears that it is showing roughly the same refresh as my monitor (no sure why xrandr is showing 50Hz???):


$ xrandr
Screen 0: minimum 320 x 240, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
  1280x1024      50.0*    51.0 
  1280x960      52.0 
  1152x864      53.0 
  1024x768      54.0    55.0    56.0 
  832x624        57.0 
  800x600        58.0    59.0    60.0    61.0 
  700x525        62.0 
  640x480        63.0    64.0    65.0    66.0    67.0 
  512x384        68.0    69.0 
  400x300        70.0 
  320x240        71.0    72.0


And the monitor's OSD shows V Refresh of 60.0Hz.

In terms of what is to be seen in the video there's no interlacing on the video but you may be taking about the fact the monitor is picked up a bit weirdly on my camera (there's kind of the appearance of diagonal lines). But the tearing I'm talking about is vertical on the monitor and can be seen in the video when it's moving (especially round the light at the start). It's not as stable as the tearing in the game so it's easier to miss.

mocharhw 07-09-10 05:00 PM

Re: Always Tearing on 8600 GTS
"no sure why xrandr is showing 50Hz???"

That's a known issue with Twinview, check the readme.

Do you run mplayer with "-vo vdpau"? There shouldn't be any tearing with vdpau video output. I'm kind of lost why you're having so many problems. All of my OpenGL games and apps work perfectly fine for the past 3 years with composite extension disabled. What version of the nvidia driver do you run?

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

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.