Archive:GPU-Performance: Difference between revisions

From KDE Wiki Sandbox
(added a user comment)
No edit summary
 
(38 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{Template:I18n/Language Navigation Bar|GPU-Performance}}
__NOINDEX__
 
<languages />
 
{{Remember|3=Warning!  Warning!!|1=This page is obsolete and the contents may be harmful to your system}}
 
<!--T:1-->
{{warning|Before making any changes to your system, please read everything carefully and try to understand what you are doing. If you're modifying any files on your system, keep copies of the unmodified version and be sure you can revert to those old version - even if your Xserver is not starting any longer.}}
{{warning|Before making any changes to your system, please read everything carefully and try to understand what you are doing. If you're modifying any files on your system, keep copies of the unmodified version and be sure you can revert to those old version - even if your Xserver is not starting any longer.}}


<!--T:2-->
{{warning|Some of the changes mentioned below are said to '''increase the temperature of your GPU'''. In any case, monitor your graphic card to make sure it isn't getting too hot!}}
{{warning|Some of the changes mentioned below are said to '''increase the temperature of your GPU'''. In any case, monitor your graphic card to make sure it isn't getting too hot!}}


= Primer =
== Primer == <!--T:3-->


Several popular graphics cards out there - especially NVIDIA ones - exhibit performance problems with KDE4. These performance hits mostly concern [[Projects/Plasma|Plasma]] - the KDE4 desktop - and [[Projects/KWin|KWin]] - the KDE window-manager. Generally speaking this isn't due to KDE4 being unoptimized but a problem with the cards' graphics drivers. This page encompasses certain problems that might arise and how to get rid of them.
<!--T:4-->
Several popular graphics cards out there - especially NVIDIA ones - exhibit performance problems with KDE4. These performance hits mostly concern [[Special:myLanguage/Plasma|Plasma]] - the KDE4 desktop - and [[Special:myLanguage/KWin|KWin]] - the KDE window-manager. Generally speaking this isn't due to KDE4 being unoptimized but a problem with the cards' graphics drivers.  Recent Intel laptops also have serious problems at the moment. This page encompasses certain problems that might arise and how to get rid of them.


= General hints =
== General hints == <!--T:5-->


== Graphics driver ==
=== Graphics drivers === <!--T:6-->
For both of the ''big'' graphics chip manufacturers there's 2 seperate graphics drivers each:


* For NVIDIA cards there's the free '''nv''' and the proprietary '''nvidia''' driver. While KDE4 should work fine with the former, it doesn't offer 3D acceleration, so the latter may be your only choice. <s>All</s> Most NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called ''nouveau'' that's currently being written. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.
<!--T:7-->
For both of the ''big'' graphics chip manufacturers there different graphics drivers that can be used for each:


'''Update:''' Nvidia has recently issued a new beta driver which is supposed to address most of the performance problems seen with KDE4. It can be downloaded in [http://www.nvidia.com/object/linux_display_amd64_177.67.html] 64bit and [http://www.nvidia.com/object/linux_display_ia32_177.67.html] 32bit. You need to add some options to your xorg.conf and enable certain feature at runtime, see [http://www.nvnews.net/vbulletin/showthread.php?t=118088] this post on the NvNews forums for details. '''Note:''' Only install beta drivers if you know what you are doing.
<!--T:8-->
* For NVIDIA cards there's the free '''nv''' and the proprietary '''nvidia''' driver. While KDE4 should work fine with the former, it doesn't offer 3D acceleration, so the latter may be your only choice. <s>All</s> Most NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called '''nouveau''' that's currently under development. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.
** ''Update:'' Nvidia has recently issued a new beta driver which is supposed to address most of the performance problems seen with KDE4. It can be downloaded in [http://www.nvidia.com/object/linux_display_amd64_177.67.html 64bit] and [http://www.nvidia.com/object/linux_display_ia32_177.67.html 32bit] versions. You need to add some options to your ''xorg.conf'' and enable certain feature at runtime, see [http://www.nvnews.net/vbulletin/showthread.php?t=118088 this post] on the NvNews forums for details. '''Note:''' Only install beta drivers if you know what you are doing.
** ''Update 2:'' NVIDIA have released a new version 177.68 of beta drivers which fixes a couple of bugs and should improve performance with the KDE 4 '''OpenGL''' compositing manager. More info and downloads [http://www.nvnews.net/vbulletin/showthread.php?t=118244 here]. The latest beta version is 177.70 and it should enhance performance when dragging '''Plasma''' applets and fix some text rendering performance and corruptions. More info [http://www.nvnews.net/vbulletin/showthread.php?t=118602 here].
** ''Update 3:'' NVIDIA's 177.70 version of beta drivers has improved support for RENDER operations with the same source, and destination; this should enhance performance in some situations, e.g. when dragging '''Plasma''' applets in KDE4. More info [http://www.nvnews.net/vbulletin/showthread.php?t=118602 here].
** ''Update 4:'' NVIDIA's 177.80 version of beta drivers out [http://www.nvnews.net/vbulletin/showthread.php?t=120679 here]; some performance problem were fixed.
** ''Update 5:'' NVIDIA's 180.08 version of beta drivers out [http://www.nvnews.net/vbulletin/showthread.php?p=1847941 here]; some performance problem were fixed. Also check [http://www.nvnews.net/vbulletin/showthread.php?t=122606 here] for the latest version of beta drivers.


'''Update 2:''' NVIDIA have released a new version 177.68 of beta drivers which fixes a couple of bugs and should improve performance with the KDE 4 OpenGL compositing manager. More info and downloads [http://www.nvnews.net/vbulletin/showthread.php?t=118244 here]. The latest beta version is 177.70 and it should enhance performance when dragging Plasma applets and fix some text rendering performance and corruptions. More info [http://www.nvnews.net/vbulletin/showthread.php?t=118602 here].
<!--T:9-->
* For AMD/ATI cards you also have a few options. There are the free "ati" and "radeonhd" drivers for X.org ("ati" is also referred to as "radeon", without "hd", but most xorg driver packages I've seen seem to call it "ati"). Most distributions seem to default to "ati" which is compatible with cards from the earliest Radeons onwards; "RadeonHD", as the name suggests, is only for R500 and later generation cards - in retail model numbers that's the X1300 and later. Both basically should run OK for a standard desktop and they share the same 3D code in mesa so should be similar for desktop effects (note, 3D support for cards newer than R300 is considered unstable and for R600 and later is very experimental). Nonetheless, if you have an X1300 or later card (i.e. one that should be supported by both drivers) and you run in to problems with one it may be worth trying out the other. You also have the option of trying the proprietary fglrx driver, though this has limited support for older cards - there's more on the AMD/ATI website about this option. Some distributions package this or have third party repos that package it and this is likely to be easier than downloading from AMD directly.


'''Update 3:''' NVIDIA's 177.70 version of beta drivers has improved support for RENDER operations with the same source, and destination; this should enhance performance in some situations, e.g. when dragging Plasma applets in KDE4. More info [http://www.nvnews.net/vbulletin/showthread.php?t=118602 here].
<!--T:10-->
It's usually advisable to stay up-to-date as improvements are being made in the drivers. Thus a first step in improving your KDE4 experience should be checking your current driver and updating if it's outdated. Please refer to your distribution's documentation on how to do that.


{{note|TODO: section about radeonhd and fglrx driver - I don't own an ATI card [[User:Lemma|Lemma]]}}
<!--T:11-->
While it might further increase performance, I do '''NOT''' recommend installing beta quality drivers because your system's stability will most likely suffer.


It's usually advisable to stay up-to-date as improvements are being made in the drivers. Thus a first step in improving your KDE4 experience should be checking your current driver and updating if it's outdated. Please refer to your distribution's documentation on how to do that.
=== nvidia-settings === <!--T:12-->
 
<!--T:13-->
Attributes set using the ''nvidia-settings'' utility aren't permanently saved unless it is started as a root user. Login as root in the terminal and start with
:{{Input|1=nvidia-settings&}}
Otherwise you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your ''~/.xinitrc''
 
===nvidia - black window problem=== <!--T:14-->
 
<!--T:15-->
It seems that ''older'' NVidia cards run into the problem that newly opened windows just are drawn as black windows or do not refresh properly anymore. This happens if composite is activated and '''openGL''' is used with many windows opened. Maybe the cards are running out of video memory? (The problem does occur with the '''compiz''' window manager as well.) In KDE4 you can deactivate composite/effects with <keycap>Shift + Alt + F12</keycap> to continue your work with the desktop normally.


While it might further increase performance, I do '''NOT''' recommend installing beta quality drivers because your system's stability will most likely suffer.
<!--T:16-->
The problem is that drawing of the window decorations does become very slow if no composite is activated (tested with KDE4.3). As alternative to using '''openGL''' as composite engine it is recommended to use '''XRender''' in this case. Because moving effects become very slow with '''XRender''' you should turn animation speed to instant.  


== nvidia-settings ==
=== System Settings === <!--T:17-->
Attributes set using the ''nvidia-settings'' utility aren't permanently saved. Thus you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your <tt>~/.xinitrc</tt>.


== systemsettings ==
<!--T:18-->
KDE4's ''systemsettings'' allows you to tweak some kwin settings as well. You can find the settings in ''Desktop -> Desktop Effects -> Advanced Options''. Depending on your card either '''OpenGL''' or '''XRender''' might work better. For OpenGL changing the '''OpenGL mode''' might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.
KDE4's '''systemsettings''' allows you to tweak some kwin settings as well. You can find the settings in <menuchoice>Desktop -> Desktop Effects -> Advanced Options</menuchoice>. Depending on your card either '''OpenGL''' or '''XRender''' might work better. For '''OpenGL''' changing the ''OpenGL mode'' might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.


(note from user): XRender mode helped A LOT on a 6800 GT (agp) with the proprietary driver, especially while looking at videos (177.80).
<!--T:19-->
(Note from user): XRender mode helped A LOT on a 6800 GT (agp) with the proprietary driver, especially while looking at videos (177.80).


Example:
<!--T:20-->
Examples:
* Setting ''InitialPixmapPlacement'' to 2 might improve plasma's performance but might make kwin hang sometimes.
* Setting ''InitialPixmapPlacement'' to 2 might improve plasma's performance but might make kwin hang sometimes.
* Setting ''OpenGL mode'' to ''Shared Memory'' might make kwin more responsive again.
* Setting ''OpenGL mode'' to ''Shared Memory'' might make kwin more responsive again.
(note from a user)* Not selecting "Use Vsync" helped a lot in a gforce 6800 (and also on a GeForce 8400M GT).
* (note from a user) Not selecting "Use Vsync" helped a lot in a gforce 6800 (and also on a GeForce 8400M GT).
 
<!--T:21-->
If for some reason your '''Xserver''' hangs after hitting the <menuchoice>Apply</menuchoice> button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in ''~/.kde4/share/config/kwinrc''.


If for some reason your Xserver hangs after hitting the ''Apply'' button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in <tt>~/.kde4/share/config/kwinrc</tt>.
=== XGL === <!--T:22-->


= Problems =
<!--T:23-->
If after installing the NVIDIA's 177.80 versions beta drivers you're still experiencing bad performance (especially on 8xxx-9xxx series) you can install [http://silentcoder.co.za/silentcoder/?p=333 XGL] xserver. Please refer to your distribution's documentation on how to do that.


<!--T:24-->
{{Note|1= XGL has *a lot* of issues regarding 3d applications, xvideo and keyboard layout but, with certain video cards, is now the unique way to enjoy KDE4 at full speed.  XGL actually 'bypass' the nvidia driver using the mesa library to render the desktop. OpenGL-based desktop effects cannot be run on XGL.}}
=== Fedora 10 (and later) and xorg.conf (for some users) === <!--T:25-->
<!--T:26-->
Some of the tweaks mentioned in this article are targeted at a file normally found in most distros at ''/etc/X11/xorg.conf''
<!--T:27-->
Some users on Fedora 10, however, may find that this file is no longer present by default (depending on their card- anyone with more details on this please feel free to elaborate), and so it must be re-created. To do this, either:
==== GUI-friendlier method: ==== <!--T:28-->
<!--T:29-->
* install and run the 'system-config-display' package (hitting <menuchoice>OK </menuchoice> after you're done configuring will generate the ''xorg.conf'' file).
==== Less GUI-friendly method: ==== <!--T:30-->
<!--T:31-->
# open a command prompt
# switch to runlevel 1 by running the command (as root):  {{Input|1=init 1}}
# run {{Input|1=Xorg -configure}} as root (once you're done, this will generate the ''xorg.conf'' file), or you can do {{Input|1=sudo Xorg -configure :1}}without switching runlevel
== Problems == <!--T:32-->
<!--T:33-->
This section summarizes several symptoms you might encounter and tries to explain possible causes.
This section summarizes several symptoms you might encounter and tries to explain possible causes.


== Resizing certain windows is choppy ==
=== Resizing certain windows is choppy === <!--T:34-->
;Explanation : This might be due to your card advertising ''ARGB Visuals'' (basically translucency) without having proper support for them. Applications/windows concerned are the plasma desktop, the krunner dialog (Alt+F2), plasma's ''Add new widget'' dialog or a konsole window.
 
<!--T:35-->
* Explanation : This might be due to your card advertising ''ARGB Visuals'' (basically translucency) without having proper support for them. Applications/windows concerned are the '''Plasma Desktop''', the '''KRunner''' dialog (<keycap>Alt + F2</keycap>), Plasma's <menuchoice>Add new widget</menuchoice> dialog or a [[Special:myLanguage/Konsole|konsole]] window.
 
<!--T:36-->
* Test : If you want to make sure this issue is a problem for you, run {{Input|1= XLIB_SKIP_ARGB_VISUALS=1 konsole}}on the command-line and try to resize the new konsole window (setting the environment variable <tt>XLIB_SKIP_ARGB_VISUALS</tt> turns off ''ARGB visuals''). If it resizes without problems, then this is certainly one of the problems you're facing.
 
<!--T:37-->
{{Note|1= I have found that this fixes Dolphin's preview delay too for me. Please confirm. --[[User:Dpalacio|dpalacio]] 17:33, 27 July 2008 (CEST)}}


;Test : If you want to make sure this issue is a problem for you, run <pre>$ XLIB_SKIP_ARGB_VISUALS=1 konsole</pre> on the command-line and try to resize the new konsole window (setting the environment variable <tt>XLIB_SKIP_ARGB_VISUALS</tt> turns off ''ARGB visuals''). If it resizes without problems, then this is certainly one of the problems you're facing.
===Your graphics card struggles with Flash video=== <!--T:95-->
If you have an older graphics card, hardware acceleration may be a struggle for it. This may be particularly obvious when watching flash videos such as Youtube videos. This may help:


Note: I have found that this fixes Dolphin's preview delay too for me. Please confirm. --[[User:Dpalacio|dpalacio]] 17:33, 27 July 2008 (CEST)
<!--T:96-->
:* While viewing a 'Flash' video right-click on the video 'screen'.
:* A menu will appear with 'settings' and 'check-boxes'.


=== General ===
<!--T:97-->
[[Image:FlashOff1.png|center|500px|thumb]]


<!--T:98-->
:* If you choose the 'global settings' (near the bottom) it takes you a box for the 'global settings'.
:* There you can turn off hardware acceleration for Flash
<!--T:99-->
[[Image:FlashOff2.png|center|500px|thumb]]
=== General === <!--T:38-->
<!--T:39-->
* You can set the BackingStore options in your xorg.conf:
* You can set the BackingStore options in your xorg.conf:
<pre>Section "Device"
In the Section "Device"
    ...
:{{Input|1=<nowiki>    ...
     Option "BackingStore" "true"
     Option "BackingStore" "true"
     ...
     ...
EndSection "Device"</pre>This works for some (eg. konsole) but unfortunately not all windows.
EndSection "Device"</nowiki>}}This works for some (eg. '''konsole''') but unfortunately not all windows.
 


* As a last resort you can try setting <tt>XLIB_SKIP_ARGB_VISUALS=1</tt> in your <tt>~/.xinitrc</tt> but this isn't pretty.
<!--T:40-->
* As a last resort you can try setting {{Input|1=XLIB_SKIP_ARGB_VISUALS=1}}in your ''~/.xinitrc'' but this isn't pretty.


=== NVIDIA ===
==== NVIDIA ==== <!--T:41-->


* You can set the ''IntialPixmapPlacement'' with the ''nvidia-settings'' utility: <pre>$ nvidia-settings -a InitialPixmapPlacement=2</pre> This works for some (but unfortunately not all) NVIDIA cards.
<!--T:42-->
* You can set the ''IntialPixmapPlacement'' with the ''nvidia-settings'' utility:  
:{{Input|1=$ nvidia-settings -a InitialPixmapPlacement=2}}This works for some (but unfortunately not all) NVIDIA cards.


=== NV ===
==== NV/Intel ==== <!--T:43-->


* You can enable EXA Acceleration
<!--T:44-->
<pre>Section "Device"
* You can enable EXA Acceleration in the ''xorg.conf''
:{{Input|1=<nowiki>Section "Device"
     ...
     ...
     Option "AccelMethod" "EXA"
     Option "AccelMethod" "EXA"
Line 78: Line 162:
#    Option "MigrationHeuristic" "greedy"  
#    Option "MigrationHeuristic" "greedy"  
     ...
     ...
EndSection "Device"</pre>
EndSection "Device"</nowiki>}}


<!--T:45-->
Performance will be somewhat better on older X servers (<=1.4.2) and significantly better on the latest prerelease X servers (>=1.4.99.901) with this option.
Performance will be somewhat better on older X servers (<=1.4.2) and significantly better on the latest prerelease X servers (>=1.4.99.901) with this option.


=== ATI ===
<!--T:46-->
* The problem with poor effects performance also can be overcome by using Intel video drivers 2.6.3.1 ( in my case deb based distro ) or higher, with kernel 2.6.30-rc1 or higher verion, with enabled UXA in xorg.conf like this :
 
<!--T:47-->
NOTE: If you use kernel 2.6.29, there is many bugs and xorg freeze randomly with enabled UXA extension.
 
<!--T:48-->
:{{Input|1=<nowiki>Section "Device"
        Identifier      "Generic Video Card"
        Driver          "intel"
        Option "AccelMethod" "UXA"
EndSection</nowiki>}}
 
<!--T:49-->
With this config, my i945G with PentiumD820, makes 350-500 FPS in Glxgears, and all effects runs perfect with Opengl render.
 
==== ATI ==== <!--T:50-->


<!--T:51-->
TODO
TODO


== Plasma performance is bad ==
=== Plasma performance is bad === <!--T:52-->


;Explanation : Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.
<!--T:53-->
* Explanation : Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.


;Test : Usually plasma performance problems can be seen best on the ''Folder View'' plasmoid. Moving it or scrolling inside the folder might be pretty slow.
<!--T:54-->
* Test : Usually plasma performance problems can be seen best on the ''Folder View'' plasmoid. Moving it or scrolling inside the folder might be pretty slow.


=== General ===
==== General ==== <!--T:55-->


* Please make sure this is not (only) related to the '''ARGB Visuals''' mentioned in the above section.
<!--T:56-->
* Please make sure this is not (only) related to the ''ARGB Visuals'' mentioned in the above section.


=== NVIDIA ===
==== NVIDIA ==== <!--T:57-->


* You can set the ''IntialPixmapPlacement'' and the ''GlyphCache'' option with the ''nvidia-settings'' utility: <pre>$ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1</pre> This works for some (but unfortunately not all) NVIDIA cards. Some cards reportedly work better using <tt>InitialPixmapPlacement=1</tt> (or maybe even <tt>3</tt>)
<!--T:58-->
* You can set the ''IntialPixmapPlacement'' and the ''GlyphCache'' option with the '''nvidia-settings''' utility: {{Input|1=$ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1}}This works for some (but unfortunately not all) NVIDIA cards. Some cards reportedly work better using {{Input|1=InitialPixmapPlacement=1}}or maybe even {{Input|1=InitialPixmapPlacement=3}}


<!--T:59-->
* Options that are said to work well on 8xxx cards but are untested (by me)
* Options that are said to work well on 8xxx cards but are untested (by me)
** Option "RenderAccel" "True"
** Option "RenderAccel" "True"
Line 118: Line 225:
*** only fire VBlank interrupts in modes where they are needed
*** only fire VBlank interrupts in modes where they are needed


=== ATI ===
==== ATI ==== <!--T:60-->


<!--T:61-->
TODO
TODO


== Folder View and other plasmoids look badly rendered ==
=== Folder View and other plasmoids look badly rendered === <!--T:62-->
 
<!--T:63-->
* Explanation : ''Folder View''' and some other widgets use hardware accelerated rendering. There are two methods to do this, and '''Plasma''' requires the newer EXA method.
 
<!--T:64-->
* Test : This is best seen on the Folder View widget, which will appear as a distorted and seemingly random region on the screen.
 
==== Open Source radeon driver ==== <!--T:65-->
 
<!--T:66-->
The Open Source '''radeon''' driver uses the XAA acceleration method by default. So you need to change the acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your ''xorg.conf'' file, bear in mind that if you make an error, it may result in X not starting on your system, so first save a copy of the existing xorg.cong file.
 
<!--T:67-->
To make the switch, edit your xorg.conf file.  Locate the Device section for your graphics card. Before the "EndSection" line, add{{Input|1=Option "AccelMethod" "EXA"}}<br />
If there is already a line with ''AccelMethod'', change it from XAA to EXA. Save the file and restart the X server.
Note that using EXA may result in some older applications, such as some KDE3 programs being rendered incorrectly.
 
<!--T:68-->
When using EXA it is strongly recommended to use a recent X server, at least 1.6.x or even better the new 1.7 release -- perhaps best to wait for 1.7.1.
 
<!--T:69-->
If you have an AGP-based card then you may also want to add the following line at the same location into the configuration file.
{{Input|1=Option "AccelDFS"    "true"}}
 
<!--T:70-->
This should accelerate the driver even more, but may get you a hardlock when starting X. So be cautious with this option. See [http://tsdgeos.blogspot.com/2007/10/performance-of-radeon-free-drivers.html this article] for more information on this topic.
 
===Some things that may speed up any card's performance=== <!--T:71-->
 
<!--T:72-->
The first one refers particularly to systems running KDE prior to 4.3.1 -
 
<!--T:73-->
* Try to avoid using many widgets on your desktop, particularly if they are of the dynamic updating type.
 
<!--T:74-->
* Turn off transparency/translucency, choosing themes that don't use it.
 
<!--T:75-->
* Use a theme with transparency, but change the configuration.  Set the fade time to zero.
** There are two ways to do this, both in the <menuchoice>desktop-effects</menuchoice> '''systemsettings''' dialog.  One, on the <menuchoice>General</menuchoice> tab, set animation speed to <menuchoice>Instant</menuchoice>. 
** Two, on the <menuchoice>All Effects</menuchoice> tab, find ''translucency'', configure it, and set fading duration to 0 to 10 or so.  (The spinner increments are 100 ms, so the 10 ms suggestion is only a tenth of that.)
 
<!--T:76-->
These hints won't turn an old graphics card into a fast one, but they will make Desktop Effects a feasibility on many older cards.


;Explanation : Folder View and some other plasmoids use hardware accelerated rendering. There are two methods to do this, and Plasma requires the newer EXA method.
===Desktop Effects causes random freezes=== <!--T:77-->


;Test : This is best seen on the ''Folder View'' widget, which will appear as a distorted and seemingly random region on the screen.
<!--T:78-->
This seems to affect Intel and ATi cards.  AccelMethod seems to be the culprit.  The default acceleration path for most drivers right now
is the outdated and slower XAA (Option "AccelMethod" "XAA") which is not
recommended anymore, especially with compositing.  Unfortunately, the
proprietary binary blobs of ATI and NVidia still only support XAA


=== Open Source radeon driver ===
===ATi=== <!--T:79-->


The Open Source radeon driver uses the older XAA hardware acceleration method. To work around this issue, you have to change the 2D acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that such a modification may damage your system. ''Do it at your own risk''.
<!--T:80-->
Try enabling EXA acceleration by adding these two lines to xorg.conf


To make the switch, edit your xorg.conf file (make a backup just in case) and locate the Device section for your graphics card. Add the line
<!--T:81-->
{{Input|1=Section "Device"
  Option      "UseAtomBIOS" "true"
  Option      "AccelMethod" "EXA"
  # ...
EndSection}}


<pre>Option "AccelMethod" "EXA"</pre>
<!--T:82-->
This works with both the '''radeon''' as well as the '''radeonhd''' driver but only with cards up to an X1950.  HD2xxx and above aren't supported yet.


before the "EndSection" line. If there is already a line with AccelMethod, change it from XAA to EXA. Save the file and restart the X server.
<!--T:83-->
Notice that EXA is still marked as unstable, and that some other applications such as some KDE3 programs may render incorrectly.
''AtomBIOS'' is automatically used by the '''radeon''' driver, so that line will need to be commented out. If you have the '''radeonhd''' driver, however, you will need it.  EXA is expected to become the default in the near future, but having it specified here is unlikely to cause any problems even then. 3D and EXA support for HD2xxx and above is expected later this year (2009) as they are already in an experimental branch.


When using EXA it is strongly recommended to use a recent X server, at least 1.4.2 or even better the 1.5 release candidates.
===Intel=== <!--T:84-->


If you have an AGP-based card then you may also want to add the line
<!--T:85-->
It's worth checking Xorg.0.log for mention of EXA.  If you don't find it (or UXA) try adding the EXA line as described in the ATi section.  UXA is an experimental option, but only supported by a few drivers.  It's likely that the best bits will be merged into EXA soon.


<pre>Option "AccelDFS"    "true"</pre>
<!--T:86-->
[http://www.phoronix.com/forums/ Phoronix forums] is a good place to read more about this.


at the same location into the configuration file. This should accelerate the driver even more, but may get you a hardlock when starting X. So be cautious with this option. See [http://tsdgeos.blogspot.com/2007/10/performance-of-radeon-free-drivers.html] for more information on this topic.
=== KRunner (Alt+F2) looks strange === <!--T:87-->
== KRunner (Alt+F2) looks strange ==


=== NVIDIA ===
==== NVIDIA ==== <!--T:88-->


<!--T:89-->
[[Image:krunner-madness.png|right|200px|KRunner display problems]]
[[Image:krunner-madness.png|right|200px|KRunner display problems]]
On NVIDIA cards krunner's dialog might appear several times below each other (with only the topmost one editable). This is related to setting <i>InitialPixmapPlacement=1</i> as recommended above. There's currently no known way to remedy this problem.
On NVIDIA cards '''krunner's''' dialog might appear several times below each other (with only the topmost one editable). This is related to setting <i>InitialPixmapPlacement=1</i> as recommended above. There's currently no known way to remedy this problem. However, it only appears on one relatively early version of KDE 4.
 
===Most of the icons in your SysTray have disappeared=== <!--T:90-->
 
<!--T:91-->
At some point you may have been told to add KDE_SKIP_ARGB_VISUALS to either ~/.bash_profile, /etc/profile or in ~/.profile.  If that rings a bell for you, hunt for it and comment it out.  You may find that they magically re-appear.
Otherwise, check the Qt4 libraries you are using. In my case I needed Qt 4.4.3 together with KDE 4.2.
 


= Links/References =
==Links/References == <!--T:92-->


* [http://www.nvnews.net/vbulletin/showthread.php?t=118088] -- Performance tweaks to the 177.67 Nvidia beta driver
<!--T:93-->
* [http://www.nvnews.net/vbulletin/showthread.php?t=115916] -- Thread about graphics issues on the NVIDIA forums.
:[http://www.nvnews.net/vbulletin/showthread.php?t=118088 -- Performance tweaks to the 177.67 Nvidia beta driver]
:[http://www.nvnews.net/vbulletin/showthread.php?t=115916 -- Thread about graphics issues on the NVIDIA forums.]
:[[Special:myLanguage/GPU-Performance/External_Sound_Cards|Notes on using External Sound Cards]]

Latest revision as of 12:50, 9 December 2011



Remember
This page is obsolete and the contents may be harmful to your system


Warning
Before making any changes to your system, please read everything carefully and try to understand what you are doing. If you're modifying any files on your system, keep copies of the unmodified version and be sure you can revert to those old version - even if your Xserver is not starting any longer.


Warning
Some of the changes mentioned below are said to increase the temperature of your GPU. In any case, monitor your graphic card to make sure it isn't getting too hot!


Primer

Several popular graphics cards out there - especially NVIDIA ones - exhibit performance problems with KDE4. These performance hits mostly concern Plasma - the KDE4 desktop - and KWin - the KDE window-manager. Generally speaking this isn't due to KDE4 being unoptimized but a problem with the cards' graphics drivers. Recent Intel laptops also have serious problems at the moment. This page encompasses certain problems that might arise and how to get rid of them.

General hints

Graphics drivers

For both of the big graphics chip manufacturers there different graphics drivers that can be used for each:

  • For NVIDIA cards there's the free nv and the proprietary nvidia driver. While KDE4 should work fine with the former, it doesn't offer 3D acceleration, so the latter may be your only choice. All Most NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called nouveau that's currently under development. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.
    • Update: Nvidia has recently issued a new beta driver which is supposed to address most of the performance problems seen with KDE4. It can be downloaded in 64bit and 32bit versions. You need to add some options to your xorg.conf and enable certain feature at runtime, see this post on the NvNews forums for details. Note: Only install beta drivers if you know what you are doing.
    • Update 2: NVIDIA have released a new version 177.68 of beta drivers which fixes a couple of bugs and should improve performance with the KDE 4 OpenGL compositing manager. More info and downloads here. The latest beta version is 177.70 and it should enhance performance when dragging Plasma applets and fix some text rendering performance and corruptions. More info here.
    • Update 3: NVIDIA's 177.70 version of beta drivers has improved support for RENDER operations with the same source, and destination; this should enhance performance in some situations, e.g. when dragging Plasma applets in KDE4. More info here.
    • Update 4: NVIDIA's 177.80 version of beta drivers out here; some performance problem were fixed.
    • Update 5: NVIDIA's 180.08 version of beta drivers out here; some performance problem were fixed. Also check here for the latest version of beta drivers.
  • For AMD/ATI cards you also have a few options. There are the free "ati" and "radeonhd" drivers for X.org ("ati" is also referred to as "radeon", without "hd", but most xorg driver packages I've seen seem to call it "ati"). Most distributions seem to default to "ati" which is compatible with cards from the earliest Radeons onwards; "RadeonHD", as the name suggests, is only for R500 and later generation cards - in retail model numbers that's the X1300 and later. Both basically should run OK for a standard desktop and they share the same 3D code in mesa so should be similar for desktop effects (note, 3D support for cards newer than R300 is considered unstable and for R600 and later is very experimental). Nonetheless, if you have an X1300 or later card (i.e. one that should be supported by both drivers) and you run in to problems with one it may be worth trying out the other. You also have the option of trying the proprietary fglrx driver, though this has limited support for older cards - there's more on the AMD/ATI website about this option. Some distributions package this or have third party repos that package it and this is likely to be easier than downloading from AMD directly.

It's usually advisable to stay up-to-date as improvements are being made in the drivers. Thus a first step in improving your KDE4 experience should be checking your current driver and updating if it's outdated. Please refer to your distribution's documentation on how to do that.

While it might further increase performance, I do NOT recommend installing beta quality drivers because your system's stability will most likely suffer.

nvidia-settings

Attributes set using the nvidia-settings utility aren't permanently saved unless it is started as a root user. Login as root in the terminal and start with

nvidia-settings&

Otherwise you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your ~/.xinitrc

nvidia - black window problem

It seems that older NVidia cards run into the problem that newly opened windows just are drawn as black windows or do not refresh properly anymore. This happens if composite is activated and openGL is used with many windows opened. Maybe the cards are running out of video memory? (The problem does occur with the compiz window manager as well.) In KDE4 you can deactivate composite/effects with Shift + Alt + F12 to continue your work with the desktop normally.

The problem is that drawing of the window decorations does become very slow if no composite is activated (tested with KDE4.3). As alternative to using openGL as composite engine it is recommended to use XRender in this case. Because moving effects become very slow with XRender you should turn animation speed to instant.

System Settings

KDE4's systemsettings allows you to tweak some kwin settings as well. You can find the settings in Desktop -> Desktop Effects -> Advanced Options. Depending on your card either OpenGL or XRender might work better. For OpenGL changing the OpenGL mode might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.

(Note from user): XRender mode helped A LOT on a 6800 GT (agp) with the proprietary driver, especially while looking at videos (177.80).

Examples:

  • Setting InitialPixmapPlacement to 2 might improve plasma's performance but might make kwin hang sometimes.
  • Setting OpenGL mode to Shared Memory might make kwin more responsive again.
  • (note from a user) Not selecting "Use Vsync" helped a lot in a gforce 6800 (and also on a GeForce 8400M GT).

If for some reason your Xserver hangs after hitting the Apply button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in ~/.kde4/share/config/kwinrc.

XGL

If after installing the NVIDIA's 177.80 versions beta drivers you're still experiencing bad performance (especially on 8xxx-9xxx series) you can install XGL xserver. Please refer to your distribution's documentation on how to do that.

Note
XGL has *a lot* of issues regarding 3d applications, xvideo and keyboard layout but, with certain video cards, is now the unique way to enjoy KDE4 at full speed. XGL actually 'bypass' the nvidia driver using the mesa library to render the desktop. OpenGL-based desktop effects cannot be run on XGL.


Fedora 10 (and later) and xorg.conf (for some users)

Some of the tweaks mentioned in this article are targeted at a file normally found in most distros at /etc/X11/xorg.conf

Some users on Fedora 10, however, may find that this file is no longer present by default (depending on their card- anyone with more details on this please feel free to elaborate), and so it must be re-created. To do this, either:

GUI-friendlier method:

  • install and run the 'system-config-display' package (hitting OK after you're done configuring will generate the xorg.conf file).

Less GUI-friendly method:

  1. open a command prompt
  2. switch to runlevel 1 by running the command (as root):
    init 1
  3. run
    Xorg -configure
    as root (once you're done, this will generate the xorg.conf file), or you can do
    sudo Xorg -configure :1
    without switching runlevel

Problems

This section summarizes several symptoms you might encounter and tries to explain possible causes.

Resizing certain windows is choppy

  • Explanation : This might be due to your card advertising ARGB Visuals (basically translucency) without having proper support for them. Applications/windows concerned are the Plasma Desktop, the KRunner dialog (Alt + F2), Plasma's Add new widget dialog or a konsole window.
  • Test : If you want to make sure this issue is a problem for you, run
    XLIB_SKIP_ARGB_VISUALS=1 konsole
    on the command-line and try to resize the new konsole window (setting the environment variable XLIB_SKIP_ARGB_VISUALS turns off ARGB visuals). If it resizes without problems, then this is certainly one of the problems you're facing.
Note
I have found that this fixes Dolphin's preview delay too for me. Please confirm. --dpalacio 17:33, 27 July 2008 (CEST)


Your graphics card struggles with Flash video

If you have an older graphics card, hardware acceleration may be a struggle for it. This may be particularly obvious when watching flash videos such as Youtube videos. This may help:

  • While viewing a 'Flash' video right-click on the video 'screen'.
  • A menu will appear with 'settings' and 'check-boxes'.
  • If you choose the 'global settings' (near the bottom) it takes you a box for the 'global settings'.
  • There you can turn off hardware acceleration for Flash

General

  • You can set the BackingStore options in your xorg.conf:

In the Section "Device"

    ...
    Option "BackingStore" "true"
    ...
EndSection "Device"
This works for some (eg. konsole) but unfortunately not all windows.
  • As a last resort you can try setting
    XLIB_SKIP_ARGB_VISUALS=1
    in your ~/.xinitrc but this isn't pretty.

NVIDIA

  • You can set the IntialPixmapPlacement with the nvidia-settings utility:
$ nvidia-settings -a InitialPixmapPlacement=2
This works for some (but unfortunately not all) NVIDIA cards.

NV/Intel

  • You can enable EXA Acceleration in the xorg.conf
Section "Device"
    ...
    Option "AccelMethod" "EXA"
# optional, may improve performance but introduce visible artifacts
#    Option "MigrationHeuristic" "greedy" 
    ...
EndSection "Device"

Performance will be somewhat better on older X servers (<=1.4.2) and significantly better on the latest prerelease X servers (>=1.4.99.901) with this option.

  • The problem with poor effects performance also can be overcome by using Intel video drivers 2.6.3.1 ( in my case deb based distro ) or higher, with kernel 2.6.30-rc1 or higher verion, with enabled UXA in xorg.conf like this :

NOTE: If you use kernel 2.6.29, there is many bugs and xorg freeze randomly with enabled UXA extension.

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "intel"
        Option "AccelMethod" "UXA"
EndSection

With this config, my i945G with PentiumD820, makes 350-500 FPS in Glxgears, and all effects runs perfect with Opengl render.

ATI

TODO

Plasma performance is bad

  • Explanation : Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.
  • Test : Usually plasma performance problems can be seen best on the Folder View plasmoid. Moving it or scrolling inside the folder might be pretty slow.

General

  • Please make sure this is not (only) related to the ARGB Visuals mentioned in the above section.

NVIDIA

  • You can set the IntialPixmapPlacement and the GlyphCache option with the nvidia-settings utility:
    $ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1
    This works for some (but unfortunately not all) NVIDIA cards. Some cards reportedly work better using
    InitialPixmapPlacement=1
    or maybe even
    InitialPixmapPlacement=3
  • Options that are said to work well on 8xxx cards but are untested (by me)
    • Option "RenderAccel" "True"
      • enabled by default
    • Option "TripleBuffer" "True"
      • Enables triple buffering. "Decreases the time an application stalls while waiting for vblank events, but increases latency slightly" (NVIDIA Readme)
    • Option "DamageEvents" "True"
      • Recommended by NVIDIA if running composite+glx, increases performance, enabled by default
    • Option "UseCompositeWrapper" "True"
      • Enables the X server's composite wrapper instead of the builtin one.
    • Option "AllowIndirectPixmaps" "True"
      • Could improve hardware rendering on G80+ cards with more than 256 MB of video memory.
    • Option "BackingStore" "True"
      • Cache overlayed areas in case they get redisplayed later
    • Option "PixmapCacheSize" "200000"
      • allocate said number of pixels for pixmap caches
    • Option "OnDemandVBlankInterrupts" "True"
      • only fire VBlank interrupts in modes where they are needed

ATI

TODO

Folder View and other plasmoids look badly rendered

  • Explanation : Folder View' and some other widgets use hardware accelerated rendering. There are two methods to do this, and Plasma requires the newer EXA method.
  • Test : This is best seen on the Folder View widget, which will appear as a distorted and seemingly random region on the screen.

Open Source radeon driver

The Open Source radeon driver uses the XAA acceleration method by default. So you need to change the acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that if you make an error, it may result in X not starting on your system, so first save a copy of the existing xorg.cong file.

To make the switch, edit your xorg.conf file. Locate the Device section for your graphics card. Before the "EndSection" line, add

Option "AccelMethod" "EXA"


If there is already a line with AccelMethod, change it from XAA to EXA. Save the file and restart the X server.

Note that using EXA may result in some older applications, such as some KDE3 programs being rendered incorrectly.

When using EXA it is strongly recommended to use a recent X server, at least 1.6.x or even better the new 1.7 release -- perhaps best to wait for 1.7.1.

If you have an AGP-based card then you may also want to add the following line at the same location into the configuration file.

Option "AccelDFS"    "true"

This should accelerate the driver even more, but may get you a hardlock when starting X. So be cautious with this option. See this article for more information on this topic.

Some things that may speed up any card's performance

The first one refers particularly to systems running KDE prior to 4.3.1 -

  • Try to avoid using many widgets on your desktop, particularly if they are of the dynamic updating type.
  • Turn off transparency/translucency, choosing themes that don't use it.
  • Use a theme with transparency, but change the configuration. Set the fade time to zero.
    • There are two ways to do this, both in the desktop-effects systemsettings dialog. One, on the General tab, set animation speed to Instant.
    • Two, on the All Effects tab, find translucency, configure it, and set fading duration to 0 to 10 or so. (The spinner increments are 100 ms, so the 10 ms suggestion is only a tenth of that.)

These hints won't turn an old graphics card into a fast one, but they will make Desktop Effects a feasibility on many older cards.

Desktop Effects causes random freezes

This seems to affect Intel and ATi cards. AccelMethod seems to be the culprit. The default acceleration path for most drivers right now is the outdated and slower XAA (Option "AccelMethod" "XAA") which is not recommended anymore, especially with compositing. Unfortunately, the proprietary binary blobs of ATI and NVidia still only support XAA

ATi

Try enabling EXA acceleration by adding these two lines to xorg.conf

Section "Device"
   Option      "UseAtomBIOS" "true"
   Option      "AccelMethod" "EXA"
   # ...
EndSection

This works with both the radeon as well as the radeonhd driver but only with cards up to an X1950. HD2xxx and above aren't supported yet.

AtomBIOS is automatically used by the radeon driver, so that line will need to be commented out. If you have the radeonhd driver, however, you will need it. EXA is expected to become the default in the near future, but having it specified here is unlikely to cause any problems even then. 3D and EXA support for HD2xxx and above is expected later this year (2009) as they are already in an experimental branch.

Intel

It's worth checking Xorg.0.log for mention of EXA. If you don't find it (or UXA) try adding the EXA line as described in the ATi section. UXA is an experimental option, but only supported by a few drivers. It's likely that the best bits will be merged into EXA soon.

Phoronix forums is a good place to read more about this.

KRunner (Alt+F2) looks strange

NVIDIA

KRunner display problems
KRunner display problems

On NVIDIA cards krunner's dialog might appear several times below each other (with only the topmost one editable). This is related to setting InitialPixmapPlacement=1 as recommended above. There's currently no known way to remedy this problem. However, it only appears on one relatively early version of KDE 4.

Most of the icons in your SysTray have disappeared

At some point you may have been told to add KDE_SKIP_ARGB_VISUALS to either ~/.bash_profile, /etc/profile or in ~/.profile. If that rings a bell for you, hunt for it and comment it out. You may find that they magically re-appear. Otherwise, check the Qt4 libraries you are using. In my case I needed Qt 4.4.3 together with KDE 4.2.


Links/References

-- Performance tweaks to the 177.67 Nvidia beta driver
-- Thread about graphics issues on the NVIDIA forums.
Notes on using External Sound Cards