[Xorg] Large performance regression in fullscreen windows

Bug #2052913 reported by theofficialgman
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
New
Unknown
mutter (Ubuntu)
Triaged
High
Daniel van Vugt

Bug Description

Test system: ARM64 Ubuntu Jammy (gnome-shell 42.9-0ubuntu2) and Ubuntu Noble (gnome-shell 45.3-1ubuntu1)
Default Ubuntu GNOME desktop environment used with no user added extensions.

GPU driverstack identical between the two distros (eliminated as a variable).
Linux kernel identical between distros (eliminated as a variable)
CPU, GPU, and RAM clocks pinned to max.

Test case: Minecraft Java Edition (shared drive with identical setup between Ubuntu versions). Fullscreen 1080p. Xorg display server.

FPS (uncapped):
Ubuntu Jammy: 177fps
Ubuntu Noble: 140fps

Observations:
Ubuntu Jammy:
gnome-shell process cpu% when camera is still: 0-1%
gnome-shell process cpu% when camera is moving: 10-20%
Memory Bandwidth (CPU and GPU shared): 40%

Ubuntu Noble:
gnome-shell process cpu% when camera is still: 20-55%
gnome-shell process cpu% when camera is moving: 30-55%
Memory Bandwidth (CPU and GPU shared): 50%

In both cases GPU utilization is observed to be near 100%.

So in summary, large performance regression regression which appears to be due to gnome-shell. There is nearly no gnome-shell cpu% usage on ubuntu jammy when there the camera is still (even with a fps graph drawn onscreen) in stark contrast to ubuntu noble.

description: updated
tags: added: arm64 noble performance
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Great bug report, thanks.

Please also try:
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>
  * lspci -k # to see if the kernel driver changed
  * es2_info | grep ^GL_ # to see if the GL driver changed
  * Ubuntu 23.10 to see if the regression already happened in mantic

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

It also sounds like fullscreen direct scanout might have worked in jammy but doesn't in noble. You can test that theory by comparing the windowed performance between jammy and noble. Or by checking the scanout method using MUTTER_DEBUG=kms and grepping the log for "Post" (Wayland only though).

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
theofficialgman (theofficialgman) wrote :

Sorry I missed the replies in my email
I will test disabling the extensions later

I can confirm that these are the same (because I use the same custom kernel and GL/Vulkan/EGL/GLES driverstack):

  * lspci -k # to see if the kernel driver changed
  * es2_info | grep ^GL_ # to see if the GL driver changed

I will not be able to do this because of no wayland support in the driverstack:
  Or by checking the scanout method using MUTTER_DEBUG=kms and grepping the log for "Post" (Wayland only though).

I will check this later as well:
  You can test that theory by comparing the windowed performance between jammy and noble.

Revision history for this message
theofficialgman (theofficialgman) wrote :

I tested all of these:
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>
  * gnome-extensions disable <email address hidden>

and then had no effect on the performance on noble (yes they did disable and I could see the visible changed in UI). I tried rebooting afterwards with no improvement.

I did this:
  You can test that theory by comparing the windowed performance between jammy and noble.

noble performance is about equal with a maximized window and fullscreen (140fps)

jammy performance is a bit lower maximized window than fullscreen (162fps vs 177fps) but I see gnome-shell cpu usage at ~50% when when maximized window (vs 0-1% in fullscreen)

so yeah definitely appears to be an issue with fullscreen direct scanout not working and additionally just gnome performance regresssions with windowed mode .

Revision history for this message
theofficialgman (theofficialgman) wrote :

this might be the same as the reported upstream issue in mutter https://gitlab.gnome.org/GNOME/mutter/-/issues/3134

summary: - Large Performance Regression in gnome-shell from Ubuntu Jammy to Ubuntu
- Noble
+ Large Performance Regression in fullscreen windows from Ubuntu Jammy to
+ Ubuntu Noble
no longer affects: gnome-shell (Ubuntu)
tags: added: nvidia tegra
Changed in mutter:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Large Performance Regression in fullscreen windows from Ubuntu Jammy to Ubuntu Noble

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mutter (Ubuntu):
status: New → Confirmed
summary: - Large Performance Regression in fullscreen windows from Ubuntu Jammy to
- Ubuntu Noble
+ [nvidia] Large Performance Regression in fullscreen windows from Ubuntu
+ Jammy to Ubuntu Noble
Revision history for this message
Eduard Kachur (glite) wrote : Re: [nvidia] Large Performance Regression in fullscreen windows from Ubuntu Jammy to Ubuntu Noble

Can be related, I see that fullscreen windows are not being unredirected when running Wayland session with mutter 46 (gfx1103_r1, LLVM 15.0.7, DRM 3.57, 6.8.0-22-generic):
RENDER: No direct scanout candidate: paint-box (1688.000000,-11.000000,62.000000,62.000000) does not match stage-view layout (0,0,1920,1080)

Actually right after boot when opening video in firefox I can see that it's being unredirected, but after launching few apps, log above is being shown for fullscreen windows.

summary: - [nvidia] Large Performance Regression in fullscreen windows from Ubuntu
- Jammy to Ubuntu Noble
+ [Xorg] Large performance regression in fullscreen windows
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can reproduce this bug in Xorg sessions with Intel graphics. My fullscreen benchmark results are about a quarter of what they should be when mutter/gnome-shell is running. 4x performance is achieved by running on a bare Xorg server without mutter/gnome-shell.

tags: added: amd64
Changed in mutter (Ubuntu):
importance: Undecided → High
milestone: none → noble-updates
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.