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

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-30-07, 07:29 PM   #1
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Rendering of edges of moving windows not smooth

I use a GeForce 7800 GTX graphics card on an Opensuse 10.2 system (KDE 3.5.8; dual core AMD X2 4800; Xorg 7.2).
I have installed the latest ...100.14.19 driver. The 3D acceleration performance of the card , however, seems to be OK - 16000 fps for glxgears and around 40 - 90 fps in 3D games like quake 4.

I recently noticed a strange behaviour in connection with compiz-fusion:

When moving windows around with compiz activated everything is handled smoothly with the exception of the vertical window edges. Their rendering during left-right window movements seems to proceed rather slowly - resulting in an annoying flickering of the vertical window borders.
This effect is already there without compiz, but not as strong. I just had it ignored it up to now. However, it seems as if a major rendering deficit is enhanced by compiz-fusion.

The really strange thing is that the rendering of moving window edges gets perfectly (!!!) smooth when one activates the performance test of compiz-fusion (a standard plugin). The rendering speed and quality for moving windows then is even by far better than in a standard situation without compiz (i.e. just KDE kwin running). (CPU utilization on one core is rather high during the test). By the way, the test shows a 60 fps rate.

I have no idea why starting a performance test of compiz should change the rendering quality of the nvidia card so dramatically for the better. Believe me, the difference is like day and night. As soon as I deactivate the test the rendering quality of vertical window edges drops at once.

Can anyone explain that to me? What is so special about the Compiz-fusion performance test ? Have I missed some decisive nvidia or X11 parameters to turn on or off? After this experience I have the feeling that the potential of the card is much higher and better than what I normally get out of it. But how to use it?

Regards Ralph
moenchmeyer is offline   Reply With Quote
Old 10-30-07, 07:40 PM   #2
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Rendering of edges of moving windows not smooth

Compiz has logic to try to match the screen's refresh rate, but it unfortunately reads this rate from the RandR extension, which interacts badly with DynamicTwinview. You can try disabling DynamicTwinview or Compiz's sync-to-vblank option, which may improve smoothness.
AaronP is offline   Reply With Quote
Old 10-31-07, 07:52 AM   #3
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

I had already tried to deactivate VBlank synchronization in Compiz-fusion's basic settings. In addition I played around with the VBlank synchr. parameters in Nvidias X Server settings tool. All this does not lead to major difference.

I should add that the flicker problem at the window edges is only a problem for the vertical edges. The upper and lower edges behave perfectly when moving windows in vertical direction. This is true both with Compiz-fusion activated as well as with a standard KDE window manager running.

After playing around I get the impression that the problems of a slow or delayed rendering of vertical edges already exist on the plain X11 level. The unsmooth redraw behaviour for vertical window edges appears both under KDE and Gnome when you move windows with some speed in horizontal direction.
The effect depends on the vertical size of a window and is stronger for complex windows as Openoffice and Konqueror. However - even for these applications the flickering (due to delayed redrawing of the edges) disappears completely when the Compiz test is activated. And the improvement is dramatic.

So what is wrong? Is it a basic problem of the Nvidia drivers ? Would you need output from glxinfo and the xorg.conf file to better analyze the situation?
moenchmeyer is offline   Reply With Quote
Old 10-31-07, 10:40 AM   #4
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Rendering of edges of moving windows not smooth

Without a composite manager, X rendering is not synchronized to vblank, which means there will be tearing. This is just fundamentally the way X works. With a composite manager running, tearing can be reduced if it uses OpenGL to synchronize its rendering to vblank. However, as I mentioned, compiz does funny tricks involving the refresh rate that aren't guaranteed to eliminate tearing.

Did you try disabling DynamicTwinview?
AaronP is offline   Reply With Quote
Old 11-01-07, 10:34 AM   #5
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

I tried disabling DynamicTwinView by setting
Option "DynamicTwinView" "0"
in /etc/X11/xorg.conf.

Absolutely no change of the behaviour after a restart of the X server.

So I give up, this hurts my eyes. I'll deactivate the 3D desktop and wait some months for general improvements of the compiz-fusion output. But thanks nevertheless for your help.

I should mention that I ran Beryl before and had a much better impression of the 3D desktop there - I never noticed the "tearing" there, so I assume it was handled much better by Beryl than by compiz-fusion. At least in combination with Nvidia cards.
moenchmeyer is offline   Reply With Quote
Old 11-02-07, 10:05 AM   #6
pferraro
Registered User
 
Join Date: Aug 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

Quote:
Originally Posted by AaronP
Compiz has logic to try to match the screen's refresh rate, but it unfortunately reads this rate from the RandR extension, which interacts badly with DynamicTwinview. You can try disabling DynamicTwinview or Compiz's sync-to-vblank option, which may improve smoothness.
IMO, a better solution is to disable compiz's refresh rate auto-detection and set its value manually. This can be done vie the CompizConfig Settings Manager. That way you can enjoy the smoothness provided by sync-to-vblank without losing your dynamic twin view functionality.
pferraro is offline   Reply With Quote
Old 11-02-07, 11:20 AM   #7
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

I had tried this, too, and a lot more reasonable variations of parameters. I changed my TFT to 75 Hz and adjusted both nvidia and compiz parameters manually. No changes, however.

The tearing effects under Compiz-fusion do not really disappear and window edge rendering does not get as smooth as with Beryl.

During some more extensive tests, I saw in addition another artefact:

Sometimes in the course of using complex windows, switching tabs and resizing the contents you get an artificial white (transparent) diagonal stretching from the upper left corner of a window down to the lower right corner whilst moving the window. This never happens with plain kwin as window manager. Under compiz-fusion the artefact appears both for emerald themes and the KDE window decorator.

I could reproduce this artefact on a completely different system, a Dell precision laptop with a Nvidia Quadro FX graphics card and a Gnome Desktop.

In my opinion this, too, indicates that something is suboptimal with the calculation and rendering of the x- and y-dimensions of window borders in Compiz-fusion - at least in comparison to Beryl.
moenchmeyer is offline   Reply With Quote
Old 11-02-07, 04:48 PM   #8
bearoso
Registered User
 
Join Date: Sep 2003
Posts: 57
Default Re: Rendering of edges of moving windows not smooth

Make sure you're using direct rendering. Either by not using the --indirect-rendering parameter if you're using it, or by specifying the --direct-rendering parameter to compiz.

Compiz uses GLX_SGI_video_sync for synchronization, and it isn't available on indirect-rendering contexts. Even then, we're all on multitasking operating systems, and task-switching with GLX_SGI_video_sync will inevitably leave you with a consistent vertical tear somewhere on your screen.

Real Solution: Try to get those Compiz developers to switch to GLX_SGI_swap_control, as that's the extension the nvidia control panel forces, and it's more widely recommended and consistent. Apparently, though, we'll need a threaded GLX driver to prevent the server from blocking and causing hiccups.
bearoso is offline   Reply With Quote

Old 11-02-07, 07:42 PM   #9
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

I am using direct rendering. I switched between direct and indirect rendering a few times but never saw any big difference.

However, the following points should be interesting for Nvidia:

1) I am not the only one who sees the smoothing effect of the compiz benchmark plugin on the rendering of moving windows. See e.g. http://forum.compiz-fusion.org/showthread.php?t=5255

2) I just installed driver NVIDIA-Linux-x86_64-100.14.23. Otherwise I did not neither change the system configuration nor the nvidia, nor the compiz configuration. Interestingly, the benchmark plugin then nevertheless leads to a completely different behaviour of the system (compared to driver ...100.14.19):
First of all the fps values shown by the benchmark are different (much worse than with driver 100.14.19). In addition, limiting the fps by setting the appropriate compiz parameter affects the stiffness of wobbling windows. That does not happen with driver 100.14.19!

And thirdly, the phantastic rendering of moving windows seen in compiz with driver version 100.14.19 + compiz benchmark running can no longer be reproduced!

The last point at least proves that the Nvidia drivers do have a significant influence on the quality of rendering under certain compiz conditions! It should be worthwhile to let the driver developers investigate this point more closely.

What is different between driver 100.14.19 and 100.14.23 and why does this difference influence the rendering quality of moving windows when the compiz benchmark is running? What can one learn from that in general to improve the rendering quality?

(Final remark: I tested this on two different systems: One is a PC with an AMD X2 4800+ processor and an Nvidia 7800 GTX card. The other system is a Dell precision M90 laptop with an Intel Dual core T7400 and a Nvidia Quadro FX 1500M. The difference between the 100.14.23 and the 100.14.19 driver appears somewhat more pronounced on the laptop but is basically the same as on the PC.)
moenchmeyer is offline   Reply With Quote
Old 11-03-07, 01:09 AM   #10
bearoso
Registered User
 
Join Date: Sep 2003
Posts: 57
Default Re: Rendering of edges of moving windows not smooth

Ok, apply this patch from the attached tarball to a source tree of compiz-0.6.2, build it and install it. This emulates the behavior of Beryl and the benchmark plugin--it damages the whole screen instead of regions, and forces buffer swapping. Then, disable compiz's vertical sync option and enable nvidia's. Be sure to restart compiz after making these changes.
Attached Files
File Type: gz compiz-patch.tar.gz (357 Bytes, 303 views)
bearoso is offline   Reply With Quote
Old 11-05-07, 11:31 AM   #11
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

Looks significantly better !

I applied the patch, build a new rpm and installed it. I then disabled the compiz sync option and activated NVidias "sync to vblank".
The result is up to what I remember from Beryl times. Much smoother. This is really a better way to handle things!

Probably I had Nvidias sync option activated in the past when I used Beryl. I just do not remember ....

However, the funny thing is that an activation of the compiz benchmark still has an additional (!) smoothing effect on the window rendering ! It is like going from something already soft to silk! So there still seems to be some potential for improvement.

But what is to be done next? What happens with your patch? How will it be used for a future version of Compiz-fusion? Who informs the compiz-developers ?

Maybe it would be a good thing to offer an option in the compiz-settings that corresponds to the patch's way of damaging the screen and forcing buffer swapping? This would probably require a lot more reprogramming of compiz, but it would be a nice for the users to have an option ....... Or is that completely impossible?
moenchmeyer is offline   Reply With Quote
Old 11-05-07, 06:24 PM   #12
moenchmeyer
Registered User
 
Join Date: Oct 2007
Posts: 30
Default Re: Rendering of edges of moving windows not smooth

An additional remark:

There is a disadvantage of the patch. I found that applications which change a lot - like Amarok - lead to a substantial rise of CPU consumption when "compiz" is running.

With "kwin " as window manager Amarok has nearly no impact on the CPU load. With compiz running the CPU load on one of my two cores rises upt to 30 %. Minimizing Amarok reduces the load below 2% to 3%.
Is there a remedy for this effect ? Can't remember it from Beryl!
moenchmeyer 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
Why Windows 8 could be the next Vista News Archived News Items 0 06-15-12 10:30 AM
Like XP or Vista: how will businesses treat Windows 8? News Archived News Items 0 06-06-12 09:10 AM
NVIDIA Brings 18 Years of Experience to Windows 8 News Archived News Items 0 06-03-12 06:20 AM
Sync it up: Hands on with the preview of Windows 8's cloud sync service News Archived News Items 0 06-02-12 08:30 PM
$15 Windows 8 upgrades available from Microsoft through January 2013 News Archived News Items 0 06-01-12 11:50 AM

All times are GMT -5. The time now is 12:19 PM.


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