Desktop Effects Performance/it: Difference between revisions

From KDE UserBase Wiki
(Created page with "Quale sistema grafico sia usato dipende dalle impostazioni predefinite della distribuzione in uso. Per il Compositore raster è raccomandato, in particolare se si utilizzando i d...")
(Created page with "== Decorazioni Finestre ==")
Line 97: Line 97:
Quale sistema grafico sia usato dipende dalle impostazioni predefinite della distribuzione in uso. Per il Compositore raster è raccomandato, in particolare se si utilizzando i driver proprietari NVIDIA.
Quale sistema grafico sia usato dipende dalle impostazioni predefinite della distribuzione in uso. Per il Compositore raster è raccomandato, in particolare se si utilizzando i driver proprietari NVIDIA.


== Window Decorations ==
== Decorazioni Finestre ==


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

Revision as of 22:23, 2 June 2012

Performance di Effetti Desktop

Le performance degli "Effetti Desktop" in KDE Plasma Workspace sono determinate principalmente dall'interazione tra l'hardware grafico (la GPU), i relativi driver ed il "Compositore" di (Kwin). Il Compositore cerca di scegliere le migliori impostazioni disponibili per la tua GPU chiedendo al driver quali caratteristiche sono supportate dall'hardware. Talvolta aiutare KWin suggerendo le reali potenzialità del proprio hardware può migliorare le performance.

Scegliere il driver corretto

Determinare il driver in uso

E' importante avere il driver corretto installato ed in uso. Se non è utilizzato alcun driver, oppure se ne è usato uno errato gli effetti desktop ripiegano su un backend grafico non-accelerato (XRander).

Informazioni sul driver in uso sono disponibili attraverso KInfoCenter. Clicca su Informazioni Grafica -> OpenGL ed analizza le informazioni fornite dal modulo mostrato. Le informazioni principali riguardo al driver si trovano nella sezione Driver, in particolare le voce Vendor, Renderer e versione OpenGL/ES. Le informazioni sono quelle fornite dal driver e pertanto potrebbero essere difficili da decifrare.

OpenGL information in KInfoCenter
Se il Renderer riporta "Software Rasterizer" significa che nessun driver è installato. Per tutti gli altri driver controlla se è in uso quello corretto.

Driver disponibili

AMD (ex ATI)

Per le schede grafiche AMD/ATI sono disponibili due driver: fglrx o Catalyst ed i driver liberi Mesa (noti come radeon, r300, r600). Con i driver fglrx non sono disponibili tutte le funzionalità e le performance generali sembrano essere migliori con i driver Mesa. La raccomandazione è quindi di usare sempre i driver Mesa con gli effetti desktop. Se trovi l'informazione "Mesa" nella versione OpenGL/ES significa che stai già utilizzando i driver liberi e non devi fare nulla.

I driver Mesa esistono in versioni più e meno recenti. Dovresti assicurarti di stare usando una versione recente, cosa che può essere verificata dalla presenza della parola "Gallium" nella stringa del Renderer.

Intel

L'hardware intel usa i driver liberi Mesa. Non ci sono alternative disponibili.

NVIDIA

Per le schede grafiche NVIDIA sono disponibili due driver: i driver proprietari NVIDIA e quelli liberi Mesa (noti anche come nouveau). I driver liberi sono ancora sotto sviluppo e non sono disponibili su tutte le distribuzioni e per tutti gli hardware. In generale è raccomandabile usare i driver proprietari. Stai utilizzando i driver proprietari se la stringa Versione OpenGL/ES riporta NVIDIA.

Installare i driver

L'installazione dei driver è diversa a seconda della distribuzione linux utilizzata. Consulta la documentazione della tua distribuzione in materia.

Versione OpenGL

KWin supporta sia OpenGL 1.x sia OpenGL 2.x. Come impostazione predefinita KWin usa le potenzialità di OpenGL2 se queste sono disponibili. OpenGL 2 permette di usare più effetti, ma richiede hardware più recente. E' importante sapere che anche se il tuo driver supporta solo es. OpenGL 1.4 è possibile che KWin usi caratteristiche di OpenGL 2 che sono disponibili tramite estensioni al driver.

Puoi trovare la versione di OpenGL supportata dal tuo driver nella stringa "Versione OpenGL/ES" in KInfoCenter, come descritto sopra. La versione è definita dalle prime due o tre cifre, es. 2.1.

Non è banale definire se KWin utilizzi OpenGL 1 o 2 in quanto ciò è definito al momento dell'esecuzione. Il miglior test disponibile è utilizzare l'effetto Inversione che può essere abilitato nella scheda Impostazioni di Sistema -> Effetti Desktop -> Tutti gli effetti. In seguito all'abilitazione lo schermo dovrebbe invertirsi usando la scorciatoia da tastiera Meta + Ctrl + I. Se ciò avviene si sta usando OpenGL 2, se non accade nulla è in uso solo OpenGL 1.

E' possibile forzare KWin ad usare OpenGL 1 tramite la scheda Impostazioni di Sistema -> Effetti Dekstop -> Avanzate e deselezionando Utilizza gli shaders OpenGL 2 . Questo può migliorare le performance per schede video vecchie. In generale è completamente sicuro utilizzare OpenGL 2 anche se il driver riporta di supportare OpenGL 3.x (al momento della scrittura supportato solo dai driver NVIDIA).

Tip

Per schede video moderne gli Shaders OpenGL 2 portano a migliori performance rispetto a OpenGL 1. Disabilitare questa opzione non porterà a migliori performance.


kwin_gles

A partire dalla versione 4.8 di KWin è possibile utilizzare il binario compilato separatamente kwin_gles come sostituto di kwin. Esso si comporta quasi nello stesso modo dell'eseguibile kwin in modalità OpenGL2, con la lieve differenza che usa egl al posto di glx come interfaccia nativa per la piattaforma.

Warning

Ciò significa che se il normale kwin non funziona in modalità OpenGL2 è improbabile che kwin_gles possa funzionare.


Per testare kwin_gles devi eseguire kwin_gles --replace in Konsole. Poiché questa è una funzionalità piuttosto nuova non è ancora così testata come il normale kwin e feedback sono sempre benvenuti. Assumendo che il test abbia successo e che si voglia usare kwin_gles quotidianamente si può aggiungere uno script eseguibile in ~/.kde4/env/ che esporti la variabile d'ambiente KDEWM=kwin_gles.

Generazione miniature

Il Compositore supporta diversi metodi di generazione delle miniature mostrate come anteprime nella barra delle applicazioni o usate da effetti come Presenta Finestre. La resa di miniature più accurate richiede ovviamente l'utilizzo di più risorse.

Il metodo di generazione delle miniature può essere scelto in Impostazioni di Sistema -> Effetti Dekstop -> scheda Avanzate -> casella di scelta mutlipla Metodo di ridimensionamento, Sono disponibili le seguenti opzioni:

  • Grossolano
  • Approssimato
  • Preciso

La tabella presenta un riassunto di come le miniature sono generate con le diverse impostazioni.

Panoramica su come sono create le miniature con diverse impostazioni
Grossolano: Crisp
Approssimato: Smooth
Preciso: Accurate

Come impostazione predefinita è utilizzato il metodo Preciso. Con hardware Intel Preciso non è mai usato e non può essere abilitato a meno che la variabile d'ambiente KWIN_FORCE_LANCZOS sia impostata ad 1.

Modificare le impostazioni da Preciso ad Approssimato può migliorare significativamente le performance di effetti come Presenta Finestre.

Velocità delle animazioni

Le animazioni richiedono del tempo e la durata di un'animazione è ciò che fa pensare alle persone che l'interfaccia sia alla moda oppure lenta. Si tratta di sensazioni molto soggettive e la differenza tra troppo veloce e troppo lenta può essere di millisecondi. E' impossibile avere un valore perfetto per tutti gli utenti.

Il livello dela durata generale delle animazioni può essere variato tramite Impostazioni di Sistema -> Effeti Desktop -> scheda generale -> scleta multipla Velocità animazioni. Le opzioni variano da "Estremamente lente" ad "Istantanee" che non genera alcuna animazione. Modificando il valore da "Normale" a "Veloci" molti utenti segnalano di avere un'interfaccia più reattiva.

Sistema grafico Qt

A partire da KDE Software Compilation 4.7 (rilasciata nel Luglio del 2011) il Compositore può utilizzare il sistema grafico Qt raster invece di quello nativo (X11). Ciò interessa solo per il rendering delle decorazioni delle finestre e non è correlato con i backend di composizione (OpenGL/XRender).

Quale sistema grafico sia usato dipende dalle impostazioni predefinite della distribuzione in uso. Per il Compositore raster è raccomandato, in particolare se si utilizzando i driver proprietari NVIDIA.

Decorazioni Finestre

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.