Facepunch / garrysmod-issues

Garry's Mod issue tracker
147 stars 56 forks source link

[Linux] Bypass compositor is not called #3060

Open ghost opened 7 years ago

ghost commented 7 years ago

Details

Garry's Mod seems to be missing the function call for the compositor to be "blocked". While most Linux compositors block themselves when a fullscreen application is in use, some desktop environments such as KDE 5.8 stopped supporting this in favor of a function call. If you use KDE and play Garry's Mod, you'll have performance impact due to the compositor not getting the call to be blocked.

Side note: Half-Life 2 and other Source games will call this function and properly block compositors that follow it.

Steps to reproduce

Download a Linux distro with KDE 5.8 or higher (Kubuntu 16.04.2 with kubuntu-ppa/backports is fine). Download and play Half-Life 2 or other Source games and then download and play Garry's Mod. You'll notice the compositor automatically disables itself for Half-Life 2 but not Garry's Mod. To check if the compositor is enabled or not, either use windowed mode to see changes or if the KDE settings are left on default you'll see a highlight on the top-left corner when you move your cursor to it (Means the compositor is enabled).

ghost commented 7 years ago

Alright, got more information for you about this!

Garry's Mod needs to call _NET_WM_BYPASS_COMPOSITOR on Linux clients in order for the desktop compositors to get the hint that they should disable their compositor when in fullscreen, or in KDE's case, opened.