Archive:GPU-Performance/da: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
(Importing a new version from external source)
Line 43: Line 43:
=== Systemindstillinger ===
=== Systemindstillinger ===


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.
I KDE 4 lader '''systemindstillinger''' dig også justere nogle indstillinger af kwin. Du kan finde indstillingerne i <menuchoice>Skrivebord -> Skrivebordseffekter -> Avanceret</menuchoice>. Om '''OpenGL''' eller '''XRender''' virker bedre afhænger af dit kort. For '''OpenGL''' kan ''Indstillingerne for OpenGL'' også have en effekt på ydelsen. Husk, at nogle af de førnævnte justeringer kan nødvendiggøre ændringer i dine indstillinger.


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

Revision as of 08:44, 12 October 2010

Template:I18n/Language Navigation Bar


Advarsel

Før du foretager nogen ændringer af dit system, så læs det hele omhyggeligt og prøv at forstå, hvad du gør. Hvis du ændrer en fil, så behold en kopi af den oprindelige version og vær sikker på, at du kan få den gamle udgave tilbage igen - selv hvis din Xserver ikke længere starter.


Advarsel

Nogle af de nedenfor omtalte ændringer siges at hæve temperaturen af din GPU. Under alle omstændigheder bør du overvåge dit grafikkort for at sikre dig, at det ikke bliver for varmt!


Introduktion

Adskillige populære grafikkort - især fra NVIDIA - har problemer med ydelsen under KDE 4. Disse ydelsesproblemer påvirker især Plasma - skrivebordet i KDE 4 - og KWin - KDE's vinduesmanager. Generelt set sker dette ikke fordi KDE 4 ikke er optimeret; det er et problem med grafikkortenes drivere. Nyere bærbare med Intel-chips har også alvorlige problemer i øjeblikket. Denne side omhandler nogle problemer, som kan opstå og hvordan man kommer dem til livs.

Almindelige tips

Grafikdrivere

For begge de to store grafikchip-producenter er der forskellige grafikdrivere, som kan bruges:

  • For NVIDIA-kort er der den frie drive nv og den ophavsretsbeskyttede driver nvidia. Selv om KDE 4 skulle fungere fint med nv, så har den ikke 3D-acceleration, så nvidia er måske din eneste valfmulighed. Alle De fleste afsnit her refererer til driveren nvidia (der er også en tredje mulighed - den fri driver nouveau, som er under udvikling i øjeblikket. Jeg ved desværre ikke hvor brugbar den er endnu). På grund af licensbetingelserne installerer de fleste distributioner ikke nvidia som standard. Få information om installatiun af den fra din distribution.
    • Nyt: Nvidia har fornylig udsendt en ny driver i beta, som skulle tage hånd om de fleste ydelsesproblemer som der har været med KDE 4. Den kan downloades i 64bit og 32bit versioner. Du skal tilføje nogle tilvalg til xorg.conf og aktivere visse funktioner ved opstart, se detaljerne i denne meddelelse på NvNews-forummet. Bemærk: Du skal kun installere beta-drivere, hvis du ved, hvad du gør.
    • Nyt 2: NVIDIA har udgivet en ny udgave 177.68 af beta-driveren, som retter et par fejl og skulle forbedre ydelsen med KDE 4's OpenGL compositing-manager. Mere information og downloads her. Den seneste beta-udgave er 177.70 og den skulle forøge ydelsen når du trækker appletter i Plasma og løse nogle problemer med ydelse og forvanskning ved tekstvisning. Mere information her.
    • Nyt 3: NVIDIA's version 177.70 af beta-driveren har forbedret understøttelse af RENDER-operationer med samme kilde so destination; dette skulle forbedre ydelsen i nogle situationer, fx nå man trækker appletter i Plasma. Mere information her.
    • Nyt 4: NVIDIA's version 177.80 af beta-driveren er udgivet her; nogle problemer med ydelse er blevet løst.
    • Nyt 5: NVIDIA's version 180.08 af beta-driveren er udgivet her; nogle problemer med ydelse er blevet løst. Se også her for den seneste udgave af beta-driveren.
  • For AMD/ATI-kort kar du også et par muligheder.Der er de frie drivere "ati" og "radeonhd" til X.org ("ati" omtales også som "radeon" uden "hd", men de fleste xorg-driverpakker, som jeg har set kalder den "ati"). De fleste distributioner synes at bruge "ati" som standard; den er kompatibel med kort fra de tidligste Radeoner og frem; "RadeonHD" er, som navnet antyder, kun til R500 og senere kort - det vil sige med produktnumre fra X1300 og opefter. Begge drivere skulle i bund og grund være brugbare til et almindeligt skrivebord, og de har den samme 3D-kode i mesa, så de skulle opføre sig ens i forhold til skrivebordeseffekter (bemærk, at understøttelse af 3D for kort nyere end R300 betragtes som ustabil og fra R600 er det helt eksperimentelt). Men hvis du har et X1300 eller senere kort og løber ind i problemer med den ene driver, så kan det ikke desto mindre være værd at prøve den anden. Du har også mulighed for at prøve den ophavsretsbeskyttede driver fglrx; den har dog begrænset understøttelse af ældre kort - læs mere om denne mulighed på AMD/ATI's hjemmeside. Nogle distributioner har denne driver i pakkearkiverne eller har den i pakkearkiver fra andre udbydere, og de er nok lettere at bruge end at downloade direkte fra AMD.

Det er sædvanligvis en god ide at holde sig up-to-date med forbedringer til driverne. Således er et første skridt til at forbedre din oplevelse med KDE 4 at checke dine drivere og opdatere dem, hvis de er forældede. Se mere i dokumentationen for din distribution om, hvordan du gør det.

Selvom det kan forbedre ydelsen yderligere, så anbefaler jeg ikke at installere beta-drivere, da det sandsynligvis vil gå ud over stabiliteten af dit system.

indstillinger af nvidia

Tilvalg, som du foretager i programmet nvidia-settings bliver ikke gemt permanent med mindre du kører det som root-bruger. Log ind som root i en terminal og start med

nvidia-settings&

Ellser skal du vælge dem hver gang du genstarter din Xserver. Dette kan gøres bekvemt ved at tilføje linjerne til at indstille funktionerne i din ~/.xinitrc

nvidia - problemet med sorte vinduer

Tilsyneladende løber ældre Nvidia-kort ind i det problem, at nyåbnede vinduer er helt sorte eller at de ikke genopfriskes ordentligt mere. Dette sker hvis composite er aktiveret og openGL bruges med mange vinduer åbne. Måske er kortet ved at have brugt al videohukommelsen? (problemet optræder også med vinduesmanageren compiz.) I KDE 4 kan du deaktivere composite/effekter med Shift + Alt + F12 for at fortsætte dit arbejde med skrivebordet normalt.

Problemet er, at tegning af vinduesdekorationerne bliver meget langsom hvis composite ikke er aktiveret (testet med KDE 4.3). Som et alternativ til at bruge 'openGL til compositing anbefales det at bruge XRender i dette tilfælde. Da bevægende effekter bliver meget langsomme med XRender, bør du sætte animationshastigheden til øjeblikkelig.

Systemindstillinger

I KDE 4 lader systemindstillinger dig også justere nogle indstillinger af kwin. Du kan finde indstillingerne i Skrivebord -> Skrivebordseffekter -> Avanceret. Om OpenGL eller XRender virker bedre afhænger af dit kort. For OpenGL kan Indstillingerne for OpenGL også have en effekt på ydelsen. Husk, at nogle af de førnævnte justeringer kan nødvendiggøre ændringer i dine indstillinger.

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


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