Desktop Effects Performance/da: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
(Importing a new version from external source)
Line 85: Line 85:
Det kan forbedre ydelsen ved effekter som Præsentér vinduer at skifte fra Præcis til Glat.
Det kan forbedre ydelsen ved effekter som Præsentér vinduer at skifte fra Præcis til Glat.


== General Speed of Animations ==
== Generel hastighed af animationer ==


Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users.
Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users.

Revision as of 17:28, 2 April 2012

Ydelse for Skrivebordseffekter

KDE Plasma arbejdsfladers ydelse for skrivebordseffekter bestemmes hovedsaligt af samspillet mellem grafikhardwaren (GPU), dens driver og Compositoren (Kwin). Compositoren prøver at vælge de bedst mulige indstillinger for din GPU ved at forespørge driveren om, hvad hardwaren understøtter. Undertiden kan det forbedre ydelsen, hvis du hjælper KWin med at finder ud af, hvad hardwaren virkelig understøtter.

Vælg den korrekte driver

Find ud af hvilken driver, der bruges

Det er vigtigt at have den rigtige driver installeret og bruge den. Hvis ingen driver eller en forkert driver bruges, så falder skrivebordseffekterne tilbage på en ikke-accelereret motor (XRender).

Information om den anvendte driver findes i KInfoCenter. Klik på Grafikinformation -> OpenGL og studér informationen, som vises i dette modul. Den relevante information findes i afsnittet Driver, specielt Producent, Rendering og OpenGL/ES-version. Informationen kommer fra driveren og kan være vanskelig at forstå.

Information om OpenGL i KInfoCenter
Hvis der ud for Rendering står "Software Rastrerizer", så er der ikke installeret en driver. For alle andre drivere bør du tjekke om det er den rigtige der bruges.

Tilgængelige drivere

AMD/ATI

Der er to tilgængelige drivere til AMD/ATI: Den ikke-frie fglrx eller Catalyst og den frie Mesa (kendt som radeon, r300 eller r600). Driveren fglrx har ikke al funktionalitet tilgængelig og Mesa synes generelt at have en bedre ydelse. Bruger du skrivebordseffekter, så anbefales det altid at bruge Mesa-driveren. Hvis der står "Mesa" ved OpenGL/ES-version, så bruger du den frie driver og skal ikke gøre mere.

Mesa-driveren findes i en ældre og en nyere version. Sørg for, at du bruger den nyere version, hvilket du kan se ved, at ordet "Gallium" optræder ved Rendering.

Intel

Intel-hardware bruger den frie Mesa-driver. Der findes ingen alternativer.

NVIDIA

Der findes to drivere til NVIDIA: den ikke-fri NVIDIA-driver og den frie Mesa-driver (også kendt som nouveau). Den frie driver er stadig under intens udvikling og findes ikke i alle distributioner og for al hardware. Generelt anbefales den ikke-fri driver. Hvis der står NVIDIA ved OpenGL/ES-version, så bruger du den ikke-fri driver.

Installation af driveren

Det afhænger af din distribution, hvordan du installerer drivere. Se mere om dette i din distributions dokumentation.

OpenGL-version

KWin understøtter OpenGL 1.x og OpenGL 2.x. Som standard bruger KWin funktioner fra OpenGL 2, hvis de er tilgængelige. OpenGL 2 lader dig bruge flere effekter, men behøver kraftigere hardware. Det er vigtigt at vide, at selv hvis din driver kun understøtter fx OpenGL 1.4, så er det muligt, at KWin bruger funktioner fra OpegGL 2, som er tilgængelige via udvidelser til driveren.

Du kan se, hvilken version af OpenGL din driver udbyder ved "OpenGL/ES-version" i KInfoCenter som beskrevet ovenfor. Versionen defineres i de første to eller tre decimaler, fx 2.1.

Det er ikke let at finde ud af, om KWin bruger OpenGL 1 eller 2, da dette alene bestemmes ved opstarten. Den bedste måde at teste det er at bruge effekten Invertér, som kan aktiveres i Systemindstillinger -> Alle effekter. Når den er aktiveret, så skal skærmen inverteres når du bruger genvejen Meta + Ctrl + I. Hvis skærmen inverteres, så bruges OpenGL 2, men hvis der ikke sker noget, så bruges OpenGL 1.

Man kan tvinge KWin til at bruge OpenGL 1 ved at gå til Systemeindstillinger -> Skrivebordseffekter -> Avanceret og fravælge Brug OpenGL 2 shaders. Dette kan forbedre ydelsen for ældre hardware. Generelt er det helt sikkert at bruge OpenGL 2 shaders, hvis driveren har vesion 3.x (det er kun tilgængeligt for NVIDIA i øjeblikket).

Tip

Med moderne hardware giver OpegGL 2 shaders bedre ydelse en OpenGL 1. Det er ikke den bedste måde at opnå god ydelse at deaktivere denne mulighed.


kwin_gles

Beginning with KWin version 4.8 it is possible to use the separately built binary kwin_gles as a replacement for kwin. It behaves almost the same as the kwin executable in OpenGL2 mode with the slight difference that it uses egl instead of glx as the native platform interface.

Warning

This also means that if your normal kwin does not work in the OpenGL 2 mode it is unlikely that kwin_gles will.


To test kwin_gles you just have to run kwin_gles --replace in Konsole. Since this is a rather new feature it is not as thoroughly tested as the normal kwin and feedback is always welcome. Assuming that the test succeeded and you want to use kwin_gles on a regular basis you can add an executable script to ~/.kde4/env/ that exports the KDEWM=kwin_gles environment variable.

Skalering af miniaturer

Compositoren understøtter forskellige skaleringsmetoder til visning af miniaturer i opgavelinjen eller i effekter som Præsentér vinduer. Miniaturerne forsøges vist så præcist som muligt, hvilket selvfølgelig kræver flere ressourcer.

Skaleringsmetoden kan ændres i Systemindstillinger -> Skrivebordseffekter -> Avanceret -> Skaleringsmetode. Der er følgende valgmuligheder:

  • Klar
  • Glat
  • Præcis

Tabellen giver et overblik over, hvordan miniaturer ser ud med de forskellige indstillinger.

Overblik over, hvordan miniaturer ser ud med de forskellige indstillinger
Klar: Klar
Glat: Glat
Præcis: Præcis

Som standard bruges Præcis. På Intel-hardware bruges Præcis dog aldrig og kan ikke aktiveres medmindre miljøvariablen KWIN_FORCE_LANCZOS er sat til 1.

Det kan forbedre ydelsen ved effekter som Præsentér vinduer at skifte fra Præcis til Glat.

Generel hastighed af animationer

Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users.

The global animation duration level can be changed through Systemsettings -> Desktop Effects -> General Tab -> Animation speed selection list. It varies from "Extremely slow" to "Instant" which does not render any animations. By changing from "Normal" to "Fast" many users reported having a more snappy interface.

Qt Graphics System

Since 4.7 (Released July 2011) the Compositor can use the Qt graphics system raster instead of native (X11). This is only relevant for rendering the window decorations and is not related to the compositing backends (OpenGL/XRender).

Which graphics system is used depends on the distribution defaults. For the Compositor raster is recommended especially if the NVIDIA driver is used.

Window Decorations

Some Window Decorations perform animations when a window gets activated. This influences the performance of effects if during an animation the active window changes. The performance impact can be reduced by using the graphics system "raster" (see above).

The default window decoration Oxygen provides an option to disable the animations: Systemsettings -> Workspaces Appearance -> Window Decorations -> Configure Decoration... -> General tab Checkbox Enable animations. Disabling the animations can improve the performance.

All window decorations which can be downloaded through the Get New Decorations... dialog use such animations, but it is not possible to disable them. If there is an performance impact due to the theme, it is recommended to use a different one. In general the themed decorations are not optimized and provided to look good and not to be fast.

Another area of window decorations which can impact the performance are shadows. Again the default decoration Oxygen provides a setting to disable them in the same configuration dialog as described above in tab "Shadows" and the themed decorations do not provide an option to disable shadows.

Blur Effect

The Blur Effect is one of the most expensive effects provided by the Compositor. By default it gets enabled for all hardware except Intel hardware. The performance impact of the blur effect depends on the number of open and translucent windows. Especially translucent widget styles (e.g. Oxygen Translucent) and translucent window decorations (e.g. Aurorae Themes) have an impact on the performance. If such a theme is used and the performance is bad it is recommended to either change the theme or disable the Blur effect.

The performance of the Blur effect can be adjusted through Systemsettings -> Desktop Effects -> All Effects tab -> Configuration dialog of Blur effect. Moving the slider for strength to "Light" requires less resources while moving it towards "Strong" requires more resources. Since 4.8 (release January 2012) the intermediate rendering results can be kept (default) which improves the performance even with translucent themes.

Advanced Desktop Effects Settings

The Compositor provides some advanced settings under Systemsettings -> Desktop Effects -> Advanced tab. Some of the settings have already been explained. This section focuses on the remaining settings. Changing these settings in general do not improve the performance but make it worse. The Compositor uses the best possible settings.

Compositing type

The Compositing type allows choice of the compositing backend, either XRender or OpenGL. By default OpenGL is used which is hardware accelerated. XRender is available even if no OpenGL driver is installed (e.g. virtual machines) and uses mostly the CPU for rendering. Many effects are not available with XRender.

Information

If there is no good reason to change, the default OpenGL is the correct choice. If OpenGL is not available there is an automatic fallback to XRender.


Keep window thumbnails

This has hardly any influence on performance. It is an option to decide how long thumbnails are kept. Best is to not touch this setting.

Suspend desktop effects for fullscreen windows

This setting influences the performance of fullscreen windows such as games. The compositor is suspended as long as there is a fullscreen window. The disadvantage is that it causes flickering when a window appears on top of the fullscreen window (e.g. a context menu) and is too generic. As well on some distributions (e.g. Kubuntu 11.04) the Intel driver causes a crash when closing the fullscreen window.

If the compositor should be disabled while a fullscreen application such as games or video is used it is better to disable compositing either through the shortcut Alt + Shift + F12 or since 4.7 (Released July 2011) through a window specific rule for the window.

OpenGL mode

Warning

The setting is obsolete and has been removed in 4.7 (Released July 2011). Any setting except the default "Texture from Pixmap" is likely to break your desktop.


Enable direct rendering

Warning

The setting is obsolete and has been removed in 4.8 (Released January 2012).

The compositor determines by itself whether direct rendering can and has to be used. Changing this setting will most likely break functionality.

Use VSync

VSync allows you to synchronize the rendering with the screen. Unless there is good reason to change, this setting should be enabled. Even if the setting is disabled the Compositor tries to use the frame rate the screen supports and by default a frame rate of 60 Hz is used.

For multiple screens it is important to know that the rendering can only be synchronized with one screen. In case the screens have a different frame rate it might be valid to disable this option and to set a manual frame rate.