Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-21-09, 05:50 PM   #1
mforget
Registered User
 
Join Date: Jan 2009
Posts: 9
Default compiz glxgears tearing

i know this has been discussed over and over in many threads on many forums, but i still seem to be doing something wrong...

its about TEARING !!!

i am seeing this issue with xv, vdpau-blitter, -vo gl2(mplayer) vlc (opengl+xv+x11)... basically everywhere, but i thought starting with glxgears would be simpler since it is clearly the same tearing everywhere (same line 2in from the top of my tv)

8400GS G86 component out (dongle, TV-0) , 720p, 1280x720 to 60Hz TV.

nvida 180.22

1) startx (my .xinitrc only has xterm in it to keep things clear)
2) glxgears -geometry 1200x900+10+-350
2371 frames in 5.0 seconds = 474.179 FPS
2369 frames in 5.0 seconds = 473.700 FPS
(no vblank sync... normal)
note: i use the weird geometry to see the tearing at the top of my screen better

3) nvidia-settings -l (see the .nvidia-settings-rc later)

4)glxgears -geometry 1200x900+10+-350
303 frames in 5.0 seconds = 60.516 FPS
301 frames in 5.0 seconds = 60.002 FPS
301 frames in 5.0 seconds = 60.002 FPS
== NO tearing, everything is perfect

5) xcompmgr &
6) glxgears -geometry 1200x900+10+-350

303 frames in 5.0 seconds = 60.516 FPS
300 frames in 5.0 seconds = 59.998 FPS
301 frames in 5.0 seconds = 60.002 FPS
301 frames in 5.0 seconds = 60.002 FPS

= 60fps, but HUGE TEARING at the top....
(i know xcompmgr is 2d only, but its just to show that its not only compiz related)


7) killall -9 xcompmgr
8) compiz --replace --loose-binding ccp & (see the ccsm config data later)

9) glxgears -geometry 1200x900+10+-350
303 frames in 5.0 seconds = 60.531 FPS
301 frames in 5.0 seconds = 60.002 FPS
301 frames in 5.0 seconds = 60.005 FPS
301 frames in 5.0 seconds = 60.003 FPS

= 60fps, but MEDIUM TEARING at the TOP

-----------------------------------------------
i have tried many different scenarios (different monitors, dfp-0 vs tv-0, hard-setting the VertRefresh to 60.0 on DFP-0 dvi) , nvidia gl_vblank on or off.. compiz-config vblank on-off, autodetect, no-detect 60hz, .... all of them seem to have some tearing
-----------------------------------------------

this sounds like a compiz problem, but xcompmgr does it too.

it does it too with intel or ati, but the only fix at the moment seems on intel when using dri2...

dri2?? whould it be a xfree issue?

many people seem to say that it is fix when they click "unredirect fullscreen" with mplayer, but that is just when mplayer is full-screen so compiz doesn't have to handle it. anything that is not full-screen has tearing .



-thank you


here is my configuration:


Code:
#SPECIFIC FOR NVIDIA CARDS
#Section "Module"
#    Load           "dbe"
#    Load           "extmod"
#    Load           "freetype"
#    Load           "glx"
#EndSection
#Section "Extensions"
#        Option  "Composite" "Disable"
#EndSection

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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       30.0 - 110.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TVStandard" "HD720p"
    Option         "metamodes" "1280x720 +0+0"
    Option         "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Code:
cat /var/log/Xorg.log.0
X.Org X Server 1.5.2
Release Date: 10 October 2008
X Protocol Version 11, Revision 0
...
Vidia Corporation GeForce 8400 GS rev 161, Mem @ 0xdf000000/0, 0xe0000000/0, 0xdc000000/0, I/O @ 0x0000e800/0, BIOS @ 0x????????/131072
(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is enabled
(II) Initializing built-in extension COMPOSITE
(**) NVIDIA(0): Option "AddARGBGLXVisuals" "True"
(**) NVIDIA(0): Enabling RENDER acceleration
...

Code:
root@divaos:~# cat .nvidia-settings-rc 
#
# /root/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility
# Generated on Wed Jan 21 17:34:44 2009
#

# ConfigProperties:

RcFileLocale = C
ToolTips = Yes
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000

# Attributes:

0/CursorShadow=0
0/CursorShadowAlpha=64
0/CursorShadowRed=0
0/CursorShadowGreen=0
0/CursorShadowBlue=0
0/CursorShadowXOffset=4
0/CursorShadowYOffset=2
0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureSharpen=0
0/AllowFlipping=1
0/FSAAAppControlled=0
0/LogAnisoAppControlled=0
0/OpenGLImageSettings=0
0/FSAAAppEnhanced=0
0/RedBrightness=0.000000
0/GreenBrightness=0.000000
0/BlueBrightness=0.000000
0/RedContrast=0.000000
0/GreenContrast=0.000000
0/BlueContrast=0.000000
0/RedGamma=1.000000
0/GreenGamma=1.000000
0/BlueGamma=1.000000
0/DigitalVibrance[TV-0]=0
0/XVideoTextureBrightness=0
0/XVideoTextureContrast=4096
0/XVideoTextureHue=0
0/XVideoTextureSaturation=4096
0/XVideoTextureSyncToVBlank=1
0/XVideoSyncToDisplay=256
Code:
root@divaos:~# more ccsm-config 
[core]
as_active_plugins = core;ccp;fade;png;regex;move;scale;resize;place;
s0_lighting = false
s0_detect_refresh_rate = false
s0_refresh_rate = 60
s0_outputs = 1920x1080+0+0;1280x720+0+0;640x480+0+0;
mforget is offline   Reply With Quote
Old 01-21-09, 06:23 PM   #2
astack
Registered User
 
Join Date: Jan 2009
Posts: 1
Default Re: compiz glxgears tearing

Have you tried this:

Code:
export XV_SYNC_TO_VBLANK=1
or maybe:

Code:
export __GL_SYNC_TO_VBLANK=1
I noticed that I have to use the former one when I have xcompmgr running and driver version 180.22.
astack is offline   Reply With Quote
Old 01-22-09, 06:50 AM   #3
mforget
Registered User
 
Join Date: Jan 2009
Posts: 9
Default Re: compiz glxgears tearing

yes, no change.

implicitly, that is what nvidia-settings -l do, but i have also tried it explicitly and same results. you can see from the fps rates that it does sync to vblank, but somehow the vblank doesn't represent my monitor settings (or in this case my tv-0 encoder settings) even if they are all set at 60Hz and my tv supports 60Hz
mforget is offline   Reply With Quote
Old 01-22-09, 07:10 AM   #4
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: compiz glxgears tearing

Disable detect refresh rate in compiz, enable sync to vblank in compiz and set the refresh rate in compiz to 60.

The result should be no tearing.
Dragoran is offline   Reply With Quote
Old 01-22-09, 05:53 PM   #5
mforget
Registered User
 
Join Date: Jan 2009
Posts: 9
Default Re: compiz glxgears tearing

already like that,


from the logs below:

s0_detect_refresh_rate = false
s0_refresh_rate = 60
(sync to vblank is on by default in git ccsm/config, that is why is doesn't show )

with __GL_SYNC_TO_VBLANK =1 or = 0 (nvidia-setttings)

all combinaison still tears ... ??
mforget is offline   Reply With Quote
Old 01-27-09, 11:10 AM   #6
mforget
Registered User
 
Join Date: Jan 2009
Posts: 9
Default Re: compiz glxgears tearing -RESOLVED-

issue is resolved with the help of bearoso

http://www.nvnews.net/vbulletin/show...=113599&page=2

my setup:
compiz git with the patch of bearoso
compiz sync-to-vblank=false
nvidia sync-to-vblank=true, allow-flipping=true

nvidia-settings -l before compiz startup


this forces compiz to use glxSwapBuffer which is synched to vblank.

usually, compiz only uses glxSwapBuffer when the whole screen has been damaged.

basically, that it is never really synched to vblank.

note:

this also works perfectly when using mplayer -vo vdpau while compiz is running.
mforget is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bug Report] Xid error after resume with 307.02, and compiz stops working. John K. NVIDIA Linux 0 05-09-12 02:42 PM

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


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