Difference between revisions of "Compositor (X11)"

From Linux Gaming
Jump to navigation Jump to search
Line 2: Line 2:


==Disabling composition for your games==
==Disabling composition for your games==
Disabling composition will dramatically improve input lag and ''"smoothness"''. Here is how to do it:
===Gnome===
This is the default DE on Pop!_OS.
You don't have to do anything. Gnome uses unredirection (the same thing Windows does), which is almost as good as disabling compositon. Disabling composition in Gnome is not possible.
===KDE===
*For Lutris:
**To disable it for a single game: Right click the game -> <code>Configure</code> -> <code>System options</code> -> <code>Disable desktop effects</code>.
**To disable it for all games: Click <code>...</code> in the top right corner -> <code>Preferences</code> -> <code>Global options</code> -> <code>Disable desktop effects</code>
*For Steam, Heroic or others: Manually disable composition with <code>shift</code> + <code>alt</code> + <code>f12</code> before launching the game. The same combination re-enables it. (TODO: It may be that Steam and Heroic automatically disable composition. But I don't know.)
*You can use [https://store.kde.org/p/1502826/ Autocomposer]. This should make it unnecessary to do anything of the above.
*If you want to use a terminal command (for example for automation, launch options for Steam, etc):
** disable: <code>qdbus org.kde.KWin /Compositor suspend</code>
** enable: <code>qdbus org.kde.KWin /Compositor resume</code>
===Cinnamon ===
{{Needs work|Problem=I don't know whether the procedure for disabling composition in Cinnamon actually works. In case this does not work, you should not be using Cinnamon. If you want a DE that looks a bit like Windows, you should choose KDE Plasma instead. Please edit if you know more}}
{{Needs work|Problem=I don't know whether the procedure for disabling composition in Cinnamon actually works. In case this does not work, you should not be using Cinnamon. If you want a DE that looks a bit like Windows, you should choose KDE Plasma instead. Please edit if you know more}}
Go to <code>settings</code> -> <code>general</code> -> <code>disable compositing for full-screen window</code>


Disabling composition will dramatically improve input lag and ''"smoothness"''. Here is how to do it:
===Xfce:===
*Disable composition with <code>$ xfconf-query -c xfwm4 -p /general/use_compositing -s false</code><ref>https://wiki.archlinux.org/title/Xfwm#Configuration</ref>
*Enable it again with <code>$ xfconf-query -c xfwm4 -p /general/use_compositing -s true</code>
* For Steam: You can automate disabling/enabling with the launch option: <code>xfconf-query -c xfwm4 -p /general/use_compositing -s false; %command%; xfconf-query -c xfwm4 -p /general/use_compositing -s true</code><ref>https://www.reddit.com/r/GlobalOffensiveLinux/comments/6b3cs5/comment/dhjw7z7/?context=3</ref>


*If you use Gnome (the default DE on Pop!_OS): You don't have to do anything. Gnome uses unredirection (the same thing Windows does), which is almost as good as disabling compositon. Disabling composition in Gnome is not possible.
== References and notes ==
*If you use KDE:
<references />
**For Lutris:
***To disable it for a single game: Right click the game -> <code>Configure</code> -> <code>System options</code> -> <code>Disable desktop effects</code>.
***To disable it for all games: Click <code>...</code> in the top right corner -> <code>Preferences</code> -> <code>Global options</code> -> <code>Disable desktop effects</code>
**For Steam, Heroic or others: Manually disable composition with <code>shift</code> + <code>alt</code> + <code>f12</code> before launching the game. The same combination re-enables it. (TODO: It may be that Steam and Heroic automatically disable composition. But I don't know.)
**You can use [https://store.kde.org/p/1502826/ Autocomposer]. This should make it unnecessary to do anything of the above.
*If you use Cinnamon: Go to <code>settings</code> -> <code>general</code> -> <code>disable compositing for full-screen window</code>
*Xfce:
**Disable composition with <code>$ xfconf-query -c xfwm4 -p /general/use_compositing -s false</code><ref>https://wiki.archlinux.org/title/Xfwm#Configuration</ref>
**Enable it again with <code>$ xfconf-query -c xfwm4 -p /general/use_compositing -s true</code>
**For Steam: You can automate disabling/enabling with the launch option: <code>xfconf-query -c xfwm4 -p /general/use_compositing -s false; %command%; xfconf-query -c xfwm4 -p /general/use_compositing -s true</code><ref>https://www.reddit.com/r/GlobalOffensiveLinux/comments/6b3cs5/comment/dhjw7z7/?context=3</ref>

Revision as of 12:42, 25 April 2022

If you use a DE with X11, then you probably have a compositor. The compositor does nice things like window shadow and effects. But it also reduces fps, adds input lag, and introduces stuttering. That's why you should disable it when running a game.

Disabling composition for your games

Disabling composition will dramatically improve input lag and "smoothness". Here is how to do it:

Gnome

This is the default DE on Pop!_OS.

You don't have to do anything. Gnome uses unredirection (the same thing Windows does), which is almost as good as disabling compositon. Disabling composition in Gnome is not possible.

KDE

  • For Lutris:
    • To disable it for a single game: Right click the game -> Configure -> System options -> Disable desktop effects.
    • To disable it for all games: Click ... in the top right corner -> Preferences -> Global options -> Disable desktop effects
  • For Steam, Heroic or others: Manually disable composition with shift + alt + f12 before launching the game. The same combination re-enables it. (TODO: It may be that Steam and Heroic automatically disable composition. But I don't know.)
  • You can use Autocomposer. This should make it unnecessary to do anything of the above.
  • If you want to use a terminal command (for example for automation, launch options for Steam, etc):
    • disable: qdbus org.kde.KWin /Compositor suspend
    • enable: qdbus org.kde.KWin /Compositor resume

Cinnamon

This page needs work, for the following reason(s): I don't know whether the procedure for disabling composition in Cinnamon actually works. In case this does not work, you should not be using Cinnamon. If you want a DE that looks a bit like Windows, you should choose KDE Plasma instead. Please edit if you know more.

Go to settings -> general -> disable compositing for full-screen window

Xfce:

  • Disable composition with $ xfconf-query -c xfwm4 -p /general/use_compositing -s false[1]
  • Enable it again with $ xfconf-query -c xfwm4 -p /general/use_compositing -s true
  • For Steam: You can automate disabling/enabling with the launch option: xfconf-query -c xfwm4 -p /general/use_compositing -s false; %command%; xfconf-query -c xfwm4 -p /general/use_compositing -s true[2]

References and notes