Unredirected fullscreen clients get forced vsync
Issue
Under gnome-shell full screen 3D applications always get forced vsync.
Expected behavior
Full screen applications render frames at their own speed when vsync is disabled in ingame settings.
Example
Toggling CSGO between windowed and full screen modes in X11 GNOME session (Youtube)
The game is rendering at 100+FPS windowed but always returns to 60FPS when in full screen (Wayland not tested).
This does not happen with other DE's (XFCE, Openbox).
Example of same window mode toggle under XFCE (Youtube)
The forced vsync in full screen but not in windowed mode appears to be present in every 3D game tested and only on GNOME sessions.
Games tested:
- CNQ3 (native)
- Counter-Strike: Global Offensive (native)
- Half-Life 1 (native)
- Shadow Warrior 2 (wine/proton)
In other desktop environments the same games run in full screen mode at uncapped speeds.
Additional information
- The client does suggest to be unredirected via _NET_WM_BYPASS_COMPOSITOR (see csgo_fullscreen_xprops.txt)
- GNOME shell does call XCompositeUnredirectWindow when initializing the full screen game (instructions followed: https://old.reddit.com/r/gnome/comments/3cwnx2/do_not_use_gnome_3_for_gaming_that_requires/ct0wnor/ )
- AMD Radeon RX 580 Series (POLARIS10, DRM 3.32.0, 5.2.6-arch1-1-ARCH, LLVM 8.0.1) GPU with open source amdgpu driver that does not have anything comparable to nvidia control panel.
- This is not a recent change and has been present at least for a year.
System info:
- Archlinux
- linux 5.2.6.arch1-1 (open source amdgpu driver)
- gnome-shell 1:3.32.2+11+g1c6abf378-1
- mutter 3.32.2+43+gb7f15881-1
- xorg-server 1.20.5-2
- mesa 19.1.3-1
$ loginctl show-session 13|grep Type
Type=x11
Steps to reproduce:
- Install Steam
- Install CS:GO (free)
- Right click CSGO in Steam library view, "Properties", "Set launch options", enter "-nojoy" (this fixes unrelated known linux startup bug)
- Check that vsync is disabled: Gear, "Video Settings", "Wait For Vertical Sync: Disabled" (bottom of the list)
- Enable developer console: Gear, "Game Settings", "Enable Developer Console: Yes"
- Bring down the console with back-tick/tilde key and type: net_graph 1
- Toggle the game between windowed and full screen modes (when in windowed mode and native resolution the "Apply Settings" button will be offscreen at the bottom right corner)