Bad graphics performance under KDE: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Update forum links)
mNo edit summary
Line 2: Line 2:
|fgversion = All versions
|fgversion = All versions
}}
}}


== Problem ==
== Problem ==
When starting Flightgear under KDE, the graphics performance is very bad, i.e. low framerates, while running Flightgear in a different window manager shows better performance.
When starting Flightgear under KDE, the graphics performance is very bad, i.e. low framerates, while running Flightgear in a different window manager shows better performance.


== Reason ==
== Reason ==
It is likely that "compositing" is activated. KDE includes a large number of various effects which use OpenGL. This might degrade the performance of applications that use OpenGL heavily.
It is likely that "compositing" is activated. KDE includes a large number of various effects which use OpenGL. This might degrade the performance of applications that use OpenGL heavily.


== Recommended Solution ==
== Recommended Solution ==
Line 32: Line 28:
wmclassmatch=1
wmclassmatch=1
</syntaxhighlight>
</syntaxhighlight>


== Solution for older KDE versions ==
== Solution for older KDE versions ==


Disable compositing permanently or temporarily in the KDE settings, via the assigned hotkey (normally Shift + Alt + F12) or via a script.
Disable compositing permanently or temporarily in the KDE settings, via the assigned hotkey (normally Shift + Alt + F12) or via a script.


== Caveats ==
== Caveats ==
With compositing disabled, KDE desktop effects don't work anymore.
With compositing disabled, KDE desktop effects don't work anymore.


== Example ==
== Example ==
Line 51: Line 42:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh
#!/bin/sh
qdbus org.kde.kwin /KWin toggleCompositing && /usr/games/bin/fgfs $@ && qdbus org.kde.kwin /KWin toggleCompositing</syntaxhighlight>
qdbus org.kde.kwin /KWin toggleCompositing && /usr/games/bin/fgfs $@ && qdbus org.kde.kwin /KWin toggleCompositing
 
</syntaxhighlight>


== See also / related ==
== See also / related ==

Revision as of 10:46, 2 March 2014

Template:Infobox KB

Problem

When starting Flightgear under KDE, the graphics performance is very bad, i.e. low framerates, while running Flightgear in a different window manager shows better performance.

Reason

It is likely that "compositing" is activated. KDE includes a large number of various effects which use OpenGL. This might degrade the performance of applications that use OpenGL heavily.

Recommended Solution

For KDE 4.9+:

You can import a so called window rule:

Save the following as flightgear.kwinrule, then open KDE's System Settings, go to Window Behaviour, then Window Rules. From the right select import rule, then navigate to where you saved flightgear.kwinrule, select it then press Open. You will be returned to the Window Rules tab. Press Apply and then close the System Settings window.

Next time you start Flightgear (or osgviewer for that matter) kwin will block compositing as long as Flightgear is running, then restore compositing when you close Flightgear, regardless if you start Flightgear in windowed or fullscreen mode.

[Application settings for osgviewer]
Description=Application settings for osgviewer
blockcompositing=true
blockcompositingrule=2
types=4294967295
wmclass=osg osgviewer
wmclasscomplete=true
wmclassmatch=1

Solution for older KDE versions

Disable compositing permanently or temporarily in the KDE settings, via the assigned hotkey (normally Shift + Alt + F12) or via a script.

Caveats

With compositing disabled, KDE desktop effects don't work anymore.

Example

WARNING: This method is obsolete, and is only left here as a convenience for those using very old versions of KDE.

This example by i4dnf deactivates compositing, starts Flightgear and reactivates compositing after Flightgear ended.

#!/bin/sh
qdbus org.kde.kwin /KWin toggleCompositing && /usr/games/bin/fgfs $@ && qdbus org.kde.kwin /KWin toggleCompositing

See also / related