nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Suggestion KDE 4.3 rendering speedup 190.36 (http://www.nvnews.net/vbulletin/showthread.php?t=139679)

TaintedKernel 10-04-09 04:32 PM

Suggestion KDE 4.3 rendering speedup 190.36
Hi all together.
I want to share my experience with the slow 2d part of the nvidia driver in the usability context of KDE 4.3. After almost trying anything to get a better, more snappier GUI experience. There is a acceptable KDE 4.3 setup for my preferences.
(I don't like the visibility of drawing-events when e.g. starting a new konqueror window (maybe in the order of milliseconds or laggy openoffice redraw, ...), so the only solution which eliminates that, was to use compiz. -But several problems like the resize-choppyness remained.)
I've found a good setting to get a even more (preliminary, till there a bugfixes by nvidia) faster 2d-setup for KDE 4.3 with Kwin.

everybody is welcome to try the settings:

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9800 GT"
Option "NvAgp" "0"
Option "NoLogo" "true"
Option "PixmapCacheSize" "9000000"
Option "Coolbits" "4"
Option "RenderAccel" "true"
Option "OnDemandVBlankInterrupts" "true"
Option "AllowIndirectPixmaps" "true"
Option "AllowSHMPixmaps" "false"
Option "AllowGLXWithComposite" "true"
Option "UseCompositeWrapper" "true"
#Option "UseEvents" "true" #disabled for 190 drivers!
Option "BackingStore" "on"
Option "DamageEvents" "true"
Option "TripleBuffer" "false"
Option "AddARGBGLXVisuals" "true"
Section "Extensions"
Option "Composite" "on"
Option "RENDER" "true"
Option "DAMAGE" "true"
Option "MIT-SHM" "true"

I written a startup script, that is doing the nvidia-setting at login:
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 -a PixmapCacheRoundSizeKB=1024

The essential thing is the setting of the Kwin window manager:
Composite type: XRender (really true, not the opengl setting!)

I've not experienced any more CPU usage, because of not using opengl for the window drawing (I guess that the RenderAccel option gets involved here?). Nevertheless it's the fastest 2d-rendering qualitatively tested and quantitatively verified with qgears2 and gtkperf.
The main point is that windows appears like a flash (completely drawn graphic elements) on the screen. The resize is as fast as on my notebook with an intel on metacity. (not a joke intel is a lame duck on 3d-part but the 2d is much better). Only when keep wildly resizing on for about 10...15 s it goes to down like we used to).

You can also test the more fluid behavior of qt4 elements e.g. when dragging a firstly detached playlist-window of the smplayer (keep playing on a movie) back into the main-window or by the text rendering in lyx and so on.

System keywords:
CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
RAM: 4 gibi
GPU: 9800 gt, 512 mibi

Software (openSUSE x64)
X-Server: 1.6.4 (10604000)
KDE: Version 4.3.1 (KDE 4.3.1) "release 162"
Driver: 190.36 (x64)
Kernel: Linux-x86_64 Kernel (custom baked: low latency Desktop preemption (no rt-patch), Tickrate 1000 Hz, and some other setting for the elephant SUSE; compiled with GCC 4.4)

Keep on working nvidia. We don't need such things like vdpau (unless it's working like a charm for me) but a good 2d composite speed. -Business before pleasure.

gnufied 10-05-09 02:37 PM

Re: Suggestion KDE 4.3 rendering speedup 190.36
Isn't it that couple of options that you are suggesting are default for newer drivers?


nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 -a PixmapCacheRoundSizeKB=1024
I thought above setting was not needed in newer drivers.

Although 190.36 driver is working well enough for me, but I had various issues while resizing and some general slowdown when I have lots of apps open. I am trying out with your setting and Xrender and do not see some marked improvement yet (holding out on judgement).

May be, other guys can chime in.

TaintedKernel 10-05-09 06:45 PM

Re: Suggestion KDE 4.3 rendering speedup 190.36
You are totally right,
most of the options are out dated in the newer drivers. (But I keep on switching the driver versions often to older ones to keep on examine which settings / driver combinations leads to a better performance on the workspace.)

So the posting should have been the other way round:
I'm wondering why my system responding faster with the Xrender path of Kwin?

The opengl-part of nvidias drivers (at least in 3d) are impressive fast.
But the RenderAccel option seems to provide more speed to 2d rendering, than the millions of transistors available for opengl rendering?
At least, is there any gpu-acceleration in the combination of Xrender path with the RenderAccel option at all?

Quintessence of the posting is to encourage the people to share their experience
- with the options nvidia makes us community for testing available.
- In order to get rid of the KDE sluggishness.
- Additionally providing the nvidia programmers with testing feedback (in our own interest, since we deal with a closed driver, it's the only thing we can provide).

Slow 2d rendering is very annoying at daily work! Snappy like windos in safemode with 50% cpuload. :(

To support the (hopefully) hard working people at nvidia:

Would it not be a much more effective promotion for your linux market to provide such basic things and not to claim such more dispensable things like fancy video acceleration?
To the geezers in your publicity agency. “There are other topics to work on rather than the advertiseable slogans on the website. -More teammates and more free coffee and chocolate to support the linux driver programmers!” ;)

packermann 10-06-09 01:48 AM

Re: Suggestion KDE 4.3 rendering speedup 190.36
I'm on gnome, but your settings gave me an improvement, especialy on resizing terminal-windows. I had a huge slowdown (5-7 sec) when resizing gnome-terminal or rox-term. After aplying your settings, this is now much faster. The problem isn't gone completely (still slowdown when having 3-4 terminals open and trying to amximise...), but it is much better. Thx for posting.

hl_ 10-06-09 05:26 AM

Re: Suggestion KDE 4.3 rendering speedup 190.36
I'm not sure whether performance problems exist that only some configurations suffer from. I can only tell you that NVidia's drivers provide excellent 2D acceleration, without "tweaking" anything on my systems.


At least, is there any gpu-acceleration in the combination of Xrender path with the RenderAccel option at all?
NVidia's drivers accelerate almost all XRender operations and it's enabled by default for a long time already, no need for that option. In fact, IIRC NVidia's XRender acceleration performed best in some benchmarks (ask linuxhippy).

Dragoran 10-06-09 08:26 AM

Re: Suggestion KDE 4.3 rendering speedup 190.36

Option "NvAgp" "0"
Useless on a PCI-E card.


Option "RenderAccel" "true"
Has been the default for a while now.


Option "AllowIndirectPixmaps" "true"
Option "AllowSHMPixmaps" "false"
Option "AllowGLXWithComposite" "true"

Also are default settings now.

Option "BackingStore" "on"

Option "DamageEvents" "true"
Option "TripleBuffer" "false"
Option "AddARGBGLXVisuals" "true"

Same here ....

StringCheesian 10-06-09 07:42 PM

Re: Suggestion KDE 4.3 rendering speedup 190.36
So that leaves:
Option "PixmapCacheSize" "9000000"
Option "Coolbits" "4"
Option "OnDemandVBlankInterrupts" "true"
Option "UseCompositeWrapper" "true"

and the part about changing KDE's compositing from opengl to xrender as possible causes for the change.

Zephiris 10-06-09 08:50 PM

Re: Suggestion KDE 4.3 rendering speedup 190.36
XRender runs fast, but is fairly useless on LCD since it'll tear on most drawing. Any combination of OpenGL on Kwin with Indirect or vsync disabled should produce distinctly similar results, it certainly does for me.

Coolbits wouldn't affect rendering speed (obviously), on demand vblanks could only slow it down. X11 Composite wrapper and PixmapCacheSize might, but direct synchronized (needed to avoid tearing due to lack general windowed vsync equivalent) vs indirect or unsynchronized rendering is the largest difference for me.

Nvidia probably won't bother much trying to optimize for the 'touch twice' overhead (which affects particularly fast drawing things), since it doesn't affect real world 2D or 3D very significantly, and improvements to kwin and compiz are likely to produce less overhead for most common operations and cases over time, as they have in the past.

Also, slow Qt4/KDE performance can be affected due to Qt's GUI component not being compiled to use 'raster' mode by default, which significantly improves performance over X11.
Try launching the slow Qt4/KDE4 apps (but not kwin) with --graphicssystem raster command line option (requires Qt 4.5 or better) and see if that helps. It should.

TaintedKernel 10-07-09 04:43 PM

Re: Suggestion KDE 4.3 rendering speedup
Oops, OK I guess there are no special options left. :(

Only the behavior of the “XRender setting” of Kwin is better (at least on my system).

I tested the settings with the combinations of direct/indirect rendering with vsync on and off (kwin opengl):
In comparison to Xrender all of these are definite slower on window drawing @ resizing and the "initial appearing" on the screen when opening a application.
To remind (you have to watch carefully an no fading or such things): There are visible
drawing events in the sense that not all elements appear at the same time.

If it would be a only Qt related problem, then:
1) why not with compiz (except in this case the resize is also laggy)?
2) why also on gtk apps with metacity or gtk apps with kwin?
3) why there are not such problems on an almost identically configured system with an
i915 in combination with a much slower CPU?
(Despite there are other problems for i915 there, due to the outdated chip. But resize is faster, also all elements of a window appear like a flash.)

So I guess it would not be fair to claim it only a Qt-Problem!!?!
(Despite gnome on cairo is definitely snappier on drawing than kde 4.3 on Qt. And Qt should care about the much more advanced fontrendering on cairo :( ...but that's a other topic...

I will keep on hoping for 2d bugfixing by nvidia anyway. First the basics than the more hype things!

All times are GMT -5. The time now is 02:39 AM.

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