Bad graphics performance under KDE: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Comment out deleted template)
(Fixed grammatical errors using Grammarly)
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.
Line 11: Line 10:
== Recommended Solution ==
== Recommended Solution ==
For KDE 4.9+:
For KDE 4.9+:
You can import a so called '''window rule''':
You can import a so called '''window rule''':


Line 30: Line 28:


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



Revision as of 09:39, 7 September 2019

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