Archive:GPU-Performance/ca

From KDE Wiki Sandbox
Revision as of 10:35, 19 March 2011 by Abella (talk | contribs) (Created page with "En general és aconsellable mantenir-se al dia com estan introduint millores en els controladors. Així, en un primer pas per millorar l'experiència de KDE4 s'ha de comprovar el...")


Atenció
Abans de realitzar qualsevol canvi en el vostre sistema, si us plau, llegiu tot acuradament i mireu d'entendre el que fareu. Si esteu modificant qualsevol fitxer en el sistema, manteniu còpies de la versió sense modificar i assegureu-vos que podeu tornar a la versió anterior -per si el servidor X no s'inicia més endavant-.


Atenció
En alguns dels canvis esmentats a continuació es diu que incrementa la temperatura de la GPU. En qualsevol cas, mireu el monitor de la targeta gràfica per assegurar-vos que no es calenta massa!


Primer

Diverses targetes de gràfics populars -en especial les de NVIDIA- presenten problemes de rendiment amb KDE4. Aquests consells sobre rendiment es refereixen principalment a Plasma -l'escriptori de KDE4- i KWin -el gestor de finestres del KDE-. En general això no es deu a que KDE4 vingui sense optimitzar, però sí a un problema amb els controladors de les targetes gràfiques. Els últims portàtils d'Intel també tenen greus problemes en aquest moment. Aquesta pàgina inclou alguns problemes que podrien sorgir i com desfer-se'n.

Consells generals

Controladors de gràfics

Per als dos majors fabricants de xips gràfics hi ha diferents controladors de gràfics que es poden utilitzar per a cadascun:

  • Per a les targetes de NVIDIA que hi ha un controlador nv lliure i nvidia propietari. Mentre KDE4 hauria de funcionar bé amb l'antic, aquest no ofereix acceleració 3D, pel que aquest podria ser la única opció. Totes La majoria de les subseccions de NVIDIA en aquest document només es refereixen al controlador propietari. (També hi ha un tercer controlador lliure anomenat nouveau que es troba actualment en fase de desenvolupament. Lamentablement no sé com d'utilitzable és fins a la data). A causa de restriccions de llicència la majoria de les distribucions no instal·len per omissió el controlador propietari. Si us plau, consulteu la vostra distribució per obtenir informació sobre com instal·lar-lo.
    • Actualització 1: Nvidia ha publicat recentment una nova versió beta del controlador la qual es suposa fa front a la majoria dels problemes de rendiment observat amb KDE4. Es pot descarregar a 64 bits i 32 bits. Cal afegir algunes opcions a xorg.conf i activar certes característiques en temps d'execució, vegeu aquest missatge en els fòrums de nvnews per més detalls. Nota: Només instal·lar els controladors beta si sabeu el que esteu fent.
    • Actualització 2: NVIDIA ha llançat una nova versió 177.68 dels controladors beta que corregeix un parell d'errors i ha de millorar el rendiment amb el gestor de composició OpenGL de KDE 4. Més informació i descàrrega aquí. L'última versió beta és 177.70 i ha de millorar el rendiment en arrossegar miniaplicacions de Plasma i algunes solucions en el rendiment i la corrupció en presentar text. Més informació aquí.
    • Actualització 3: La versió beta 177.70 de NVIDIA dels controladors ha millorat el suport per a les operacions RENDER amb la mateixa font i destí; el que hauria de millorar el rendiment en algunes situacions, per exemple, quan s'arrosseguen les miniaplicacions de Plasma a KDE4. Més informació aquí.
    • Actualització 4: A sortit la versió beta 177.80 de NVIDIA dels controladors aquí; amb el qual s'han solucionat alguns problemes de funcionament.
    • Actualització 5: A sortit la versió beta 180.08 de NVIDIA dels controladors aquí; amb el qual s'han solucionat alguns problemes de funcionament. També podeu veure aquí per a l'última versió dels controladors beta.
  • Per a targetes AMD/ATI també hi ha algunes opcions. Aquí estan els controladors lliures «ati»" i «radeonhd» per a X.org («ATI» també és coneguda com «radeon», sense «HD», però la majoria paquets de controladors de xorg que he vist sembla que en diuen «ati»). La majoria de les distribucions s'en refereixen per omissió com a «ATI», el qual és compatible amb les targetes des de les primeres Radeon en endavant; «RadeonHD», com el seu nom indica, és només per a generació de targetes R500 i posteriors -en el número de model del venedor és el X1300 i posteriors-. Totes dues, bàsicament, s'han d'executar bé a un escriptori estàndard i comparteixen el mateix codi 3D pel que han de ser similars per als efectes d'escriptori (nota, el suport 3D per a targetes R300 més recents es considera inestable i per R600 i posteriors és molt experimental). No obstant, si teniu una targeta X1300 o posterior (és a dir, que hauria d'estar suportada pels dos controladors) i s'executa amb problemes pot valer la pena provar l'altre. També teniu l'opció de provar el controlador propietari fglrx, encara que aquest limita el suport a les targetes antigues -hi ha més al lloc web de AMD/ATI sobre aquesta opció-. Algunes distribucions tenen repositoris de terceres parts i és probable que sigui més fàcil que la descàrrega directa des de AMD.

En general és aconsellable mantenir-se al dia com estan introduint millores en els controladors. Així, en un primer pas per millorar l'experiència de KDE4 s'ha de comprovar el controlador actual i la vostra instal·lació ja és obsoleta. Si us plau, consulteu la documentació de la vostra distribució sobre la manera de fer-ho.

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: Problema de finestra en negre

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.

Arranjament del sistema

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 (i posteriors) i xorg.conf (per a alguns usuaris)

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:

Mètode IGU amigable:

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

Mètode IGU menys amigable:

  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

Problemes

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

En canviar la mida d'algunes finestres es veu entretallat

  • 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)


La vostra targeta gràfica lluita amb el vídeo Flash

Si teniu una targeta gràfica antiga, l'acceleració de maquinari pot ser una lluita per a això. Això pot ser particularment evident en veure vídeos flash com els vídeos de Youtube. Això us pot ajudar:

  • 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

  • Podeu activar l'acceleració EXA al fitxer 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

El rendiment de plasma és dolent

  • 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

La Vista de carpeta i altres plasmoides es presenten malament

  • 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.

El controlador radeon Open Source

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.

Algunes coses que poden accelerar el rendiment de qualsevol targeta

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.

Els efectes d'escriptori causen bloqueigs aleatoris

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) té un aspecte estrany

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.

La majoria de les icones en la vostra safata del sistema han desaparegut

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.


Enllaços/referències

-- Ajustos de rendiment per al controlador beta de Nvidia 177.67
-- Fil sobre els problemes gràfics en els fòrums de NVIDIA.
Notes sobre l'ús de targetes de so externes.