Fullscreen unredirection broken since introduction of the mutter frames client
Steps to reproduce
This issue appears on a standard Ubuntu 23.04 install, running GNOME with X. It is a regression introduced by commit 39942974.
You can reproduce this easily with glmark2 --fullscreen
. On my system the FPS is roughly halved by this issue. To confirm the behavior on an nvidia system you can first run nvidia-settings
and enable the graphics visual indicator. In the top left of your window it will display 'BLIT' when it is being redirected and 'FLIP' when properly unredirected.
Many other fullscreen apps/games hit this too.
Current behavior
Fullscreen games/apps are being redirected. In other words they aren't being scanned out directly. This significantly reduces performance and breaks features such as VRR and G-Sync. It's a fundamental driver agnostic issue, though the exact effects may be different depending on your platform.
Mutter's frame client adds decoration windows to applications, even fullscreen ones. The decoration window uses a visual with transparency for features like drop shadows, but this breaks unredirection since the root and application windows use a different visual without transparency. Since the visuals don't match we can't scanout directly.
Note that not all applications end up with a decoration window created by mutter. Some of these applications can still unredirect.
There are other issues filed for this: #2794, #2915.
Expected outcome
Fullscreen apps should unredirect. FLIP will be displayed if you enable the nvidia-settings
graphics visual indicator.
Version information
I've seen this on Ubuntu 23.04 and newer, running GNOME+X. You don't need to run all of GNOME, you can repro running mutter standalone. You'll need a mutter version including carlosg/mutter@2a600ac9.