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

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-31-08, 12:06 PM   #1
torturedutopian
Registered User
 
Join Date: Oct 2007
Posts: 28
Thumbs down Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Hi to everyone,

the following post is definitely not a rant and is meant to be productive !

I'm an "average ubuntu user" with a common piece of hardware (nvidia 7600). My concern is that, in order to get a working, fast and smooth Compiz, even with the latest Ubuntu beta and nvidia drivers, I still have to go through a little tedious 6+ steps process. I don't really mind personally. But many "casual" or "novice" users maybe stumble upon it and give up.

Please let me describe it.

By default, if I enable the desktop effects in Ubuntu, animations are quite slow, choppy and "torn". Some may find them bearable, but they definitely aren't ! To make them perfect, you have to :

1- Add "Option "TripleBuffer" "True"" in xorg.conf, otherwise, animation is slow (and also some games and opengl apps are slow)

2- Add "Option "DynamicTwinView" "false"" in xorg.conf, otherwise, compiz doesn't detect the right refresh rate and thus, animations are choppy

3- install "ccsm" (advanced desktop effects settings)

4- run ccsm and set, in general options -> display settings : detect refresh rate : yes ; sync to vblank : yes

5- run nvidia-settings and tick "sync to vblank" as well in openGL settings (otherwise animations are torn)

6- add the following command line to be run at startup (in the "sessions menu of ubuntu for instance) : "nvidia-settings -l"

Done !

I really think it's annoying. What do you think ? Who is to "blame" ? Compiz team ? Ubuntu team ? Nvidia ? Xorg ? I don't care who's at fault, but I really think something should be done !

(PS : an additional step for people who like me use 2 separate X screens :

- disable compiz in the ubuntu apparency desktop settings
- launch it manually in the sessions menu with "compiz --replace --only-current-screen" and launch metacity (or compiz) on the other screen like so "metacity --display=:0.1"

But that's definitely not an nvidia issue


Thanks for reading, folks ! Please tell me what you think !

PS : of course, the distribution could produce an xorg with proper settings but that clearly doesn't solve everything
torturedutopian is offline   Reply With Quote
Old 03-31-08, 02:48 PM   #2
Tangamandapiano
Registered User
 
Join Date: Feb 2007
Posts: 9
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

I heard something about X.org implementing a change which will allow the ugly DynamicTwinView refresh rate workaround to be discarded. I hope this happen soon, it's a great step

But... about "TripleBuffer" option... could NVIDIA drivers come with "TrippleBuffer" enabled by default, or there's some technical reason for not doing this?
Tangamandapiano is offline   Reply With Quote
Old 04-01-08, 01:00 AM   #3
ctheo
Registered User
 
Join Date: Mar 2007
Posts: 74
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

<rant> vsync is bad for any game that requires mouse input, especially with lcds that only do 60Hz-75Hz </rant>
ctheo is offline   Reply With Quote
Old 11-19-09, 12:43 PM   #4
torturedutopian
Registered User
 
Join Date: Oct 2007
Posts: 28
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Well, almost two years later I'm resurrecting this thread :-)

Actually, everything I had written here still applies.

What about a poll to ask users whether they'd like better default values ?

Indeed, by default, one gets tearing (and incorrect frequencies reported). This is really annoying : you can't get smooth animation out of the box. (I tried an old friend's laptop with an intel chip, last week, and it *was* smooth with no tearing when booting from the Ubuntu CD). But the situation is much worse with Radeon boards (you always get 2D tearing with the proprietary drivers).

Anyway, overall, I really do appreciate the work done by the nv developers : there is no comparison, quality and performance and feature-fullness wise. But little details like the lack of vsync by default may give a bad first impression :-)

What do you think ? How can we make nvidia developers change this ? It's a shame 4 years after the first release of compiz, that in most cases the compiz experience is really average (some effects are still not smooth on my core 2 duo setup + 8600GTS : quartz is smooth on a 1 Ghz G4 Macintosh -- but this is a compiz issue

Cheers !
torturedutopian is offline   Reply With Quote
Old 11-20-09, 09:29 AM   #5
Lemmiwinks
Registered User
 
Join Date: Apr 2009
Location: Germany
Posts: 75
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

The dynamictwinview option really kicks ass, thanks for that!!
Turing triplebuffer on does not show any effect for me, but I have to admit, that I did not check any framerates...
__________________
GF 8600M GT, core 2 duo 1.8ghz, Ubuntu 12.04, driver 304.37
Lemmiwinks is offline   Reply With Quote
Old 11-20-09, 10:44 AM   #6
torturedutopian
Registered User
 
Join Date: Oct 2007
Posts: 28
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Actually, I don't know either if Triple Buffer really makes any significant difference

Edit : it definitely improved the Scale plugin here.

Last edited by torturedutopian; 10-26-10 at 05:50 AM.
torturedutopian is offline   Reply With Quote
Old 10-26-10, 05:44 AM   #7
torturedutopian
Registered User
 
Join Date: Oct 2007
Posts: 28
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Well, I wake up this thread, one more year later :-)
It seems the situation still remained more or less the same.

Also, it got worse recently in Ubuntu 10.10 or maybe even 10.04 (in fullscreen openGL games, even with all those steps performed, I get a little tearing at the top of the screen, always at the top, which didn't occur before).

Well, that means 95% of Nvidia+Compiz users get some tearing. How can we help improve the situation ? Really, I don't understand why this problem seems (just my feeling) completely overlooked. I know it's probably a combination of Xorg issues, drivers issues, compiz issues, distros issues... The fact that other drivers (non nvidia) are not that good and thus that correct defaults cannot be set for everyone.... But the result is here : getting a smooth & not torn display needs some serious tweaking that the average user is incapable of, which gives a poor image of the Linux ecosystem in general.

Edit : still : I don't want to blame anyone, I'm very grateful of what you Nvidia developers do, your drivers are really good.
torturedutopian is offline   Reply With Quote
Old 10-26-10, 06:28 AM   #8
schulzm
Registered User
 
Join Date: Apr 2009
Posts: 2
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

I got a regression on Ubuntu 10.10 after installing aktual updates. (including a kernel update)
A System with just Packages from the Install CD (+Nvidia Drivers) works very good for me.

I didn't use compiz but kwin.
The System with the regression has a Problem to repaint windows fast while resize.
schulzm is offline   Reply With Quote

Old 10-26-10, 06:59 AM   #9
snk
Registered User
 
Join Date: May 2008
Posts: 9
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

For me it is enough to

1. install "ccsm" (advanced desktop effects settings)

2. run ccsm and set, in general options -> display settings : detect refresh rate : no ; refresh rate : 60 ; sync to vblank : yes

and I never get any tearing in compiz. I'm using Ubuntu 10.10 and Geforce 7300GT with the latest "nvidia" driver.

The blame is partially on compiz team; vsync should be on by default, and partially on Nvidia; they should implement proper RandR support and drop the half-assed "DynamicTwinView".
snk is offline   Reply With Quote
Old 10-26-10, 08:49 AM   #10
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Quote:
Originally Posted by ctheo View Post
<rant> vsync is bad for any game that requires mouse input, especially with lcds that only do 60Hz-75Hz </rant>
Not when using triple buffering ... also playing games that look like crap due to tearing is "bad" either.
Dragoran is offline   Reply With Quote
Old 10-26-10, 09:53 AM   #11
bearoso
Registered User
 
Join Date: Sep 2003
Posts: 57
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Quote:
Originally Posted by Dragoran View Post
Not when using triple buffering ... also playing games that look like crap due to tearing is "bad" either.
Triple buffering can cause an extra frame's worth of latency, which is VERY bad in terms of responsiveness. Imagine moving a window with a compositor on, and the window lagging several frames behind the mouse cursor.

The cause of the tearing everyone's getting even with vsync is a client-side wait in compiz (via GLX_SGI_video_sync). It uses a dirty-rectangles approach most of the time, preventing page-flipping and making display susceptible to scheduler interference. So most of the time the output frame is drawn partially during scan-out.

This can be fixed by using a buffer swap with only driver-side vsync every time. A page flip is completed very quickly by the video card and there's no tearing. There's two problems with this:

1. Buffer swaps on the video card occur asynchronously with respect to compiz. So compiz continues running and picks up input and graphics data for the next frame in advance--accumulating an additional frame of input-lag. This can be eliminated by waiting until the current framebuffer is complete by using glFinish or glXWaitGL immediately after the swap-buffers call.

2. Redrawing the whole screen is more expensive than only redrawing parts. Arguably, this is a moot point because all the graphic content is in video memory and framebuffer->framebuffer writes are so fast. It is, however, the main reason people mention for not doing it.
bearoso is offline   Reply With Quote
Old 10-26-10, 04:17 PM   #12
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: Why does it take 6 steps to get nvidia + compiz running smooth, fast, not torn ?

Quote:
Originally Posted by bearoso View Post
Triple buffering can cause an extra frame's worth of latency, which is VERY bad in terms of responsiveness. Imagine moving a window with a compositor on, and the window lagging several frames behind the mouse cursor.
http://www.anandtech.com/show/2794

Quote:
So there you have it. Triple buffering gives you all the benefits of double buffering with no vsync enabled in addition to all the benefits of enabling vsync. We get smooth full frames with no tearing. These frames are swapped to the front buffer only on refresh, but they have just as little input lag as double buffering with no vsync at the start of output to the monitor. Even though "performance" doesn't always get reported right with triple buffering, the graphics hardware is working just as hard as it does with double buffering and no vsync and the end user gets all the benefit with out the potential downside. Triple buffering does take up a handful of extra memory on the graphics hardware, but on modern hardware this is not a significant issue.
Quote:
The cause of the tearing everyone's getting even with vsync is a client-side wait in compiz (via GLX_SGI_video_sync). It uses a dirty-rectangles approach most of the time, preventing page-flipping and making display susceptible to scheduler interference. So most of the time the output frame is drawn partially during scan-out.

This can be fixed by using a buffer swap with only driver-side vsync every time. A page flip is completed very quickly by the video card and there's no tearing. There's two problems with this:

1. Buffer swaps on the video card occur asynchronously with respect to compiz. So compiz continues running and picks up input and graphics data for the next frame in advance--accumulating an additional frame of input-lag. This can be eliminated by waiting until the current framebuffer is complete by using glFinish or glXWaitGL immediately after the swap-buffers call.

2. Redrawing the whole screen is more expensive than only redrawing parts. Arguably, this is a moot point because all the graphic content is in video memory and framebuffer->framebuffer writes are so fast. It is, however, the main reason people mention for not doing it.
You missed my point, I was not referring to compiz at all, but doing gl rendering without synchronization will pretty much always result in tearing, and playing a game with tearing (at least to me) isn't fun (I was just replying to the "vsync is BAD rant").
Dragoran 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
Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 Ferianto85 NVIDIA Linux 0 05-18-12 08:35 PM

All times are GMT -5. The time now is 02:29 PM.


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