Wayland GNOME Shell experiencing significant frame rate drops whenever anything significant is changing onscreen
System Info
- Fedora Silverblue 40.20240426.0 (ublue-hwe)
- GNOME Shell 46.1
Linux fedora 6.8.7-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC
- NVIDIA Driver version: 550.76
- Hardware Type: laptop
- Processor: Intel i7-12700H
- Graphics: NVIDIA Advanced Optimus
- Intel Alder Lake Xe Integrated Graphics
- NVIDIA GeForce RTX 3070 Ti Max-Q running at 115W
Issue
In GNOME Shell under Wayland, whenever something significant is changing onscreen, such as my browser or editor scrolling, or switching virtual desktops, or going in and out of the activities overview, the apparent frame rate of my display drops by about forty or fifty FPS for the entire duration of the operation. The strange thing is that it's not dropping to a specific frame rate, which is would I would expect if there were a particular performance bottleneck, it's dropping by a set amount relative to the refresh rate of the screen, so it actually drops to different refresh rates across different monitors. Here's the output of glxgears while I'm doing the various operations mentioned above to demonstrate the problem:
# 1. Running on my external monitor, with a native refresh rate of 75Hz
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
# me moving desktops, scrolling, going in and out of the activities overview
167 frames in 5.0 seconds = 33.263 FPS
98 frames in 5.0 seconds = 19.590 FPS
170 frames in 5.0 seconds = 33.828 FPS
273 frames in 5.0 seconds = 54.503 FPS
195 frames in 5.0 seconds = 38.954 FPS
186 frames in 5.0 seconds = 37.100 FPS
185 frames in 5.0 seconds = 36.948 FPS
# I stop and let the frame rate recover over time
291 frames in 5.0 seconds = 58.166 FPS
366 frames in 5.0 seconds = 73.198 FPS
370 frames in 5.0 seconds = 73.881 FPS
# 2. Running on my internal display, with a native refresh rate of 144Hz
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
# before doing anything
498 frames in 5.0 seconds = 99.502 FPS
# me opening the activities view to move a window
67 frames in 5.8 seconds = 11.469 FPS
107 frames in 5.0 seconds = 21.350 FPS
# me pausing
663 frames in 5.0 seconds = 132.477 FPS
# me moving the virtual desktops around, opening activities view
403 frames in 5.0 seconds = 80.550 FPS
410 frames in 5.0 seconds = 81.889 FPS
256 frames in 5.1 seconds = 50.487 FPS
451 frames in 5.0 seconds = 90.097 FPS
# me pausing to let the frame rate recover
713 frames in 5.0 seconds = 142.403 FPS
714 frames in 5.0 seconds = 142.604 FPS
This is of course especially egregious on my external monitor, where a drop in 50 FPS brings it down to a noticeably painful 20FPS, but it's also occurring, and noticeable, on my internal monitor.
I have a pretty capable GPU (I would like to think), and so it really doesn't seem like this should be happening to me, and sure enough, if I switch to a GNOME X session:
# 1. Running on my external monitor
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
# me, startled at seeing such a high initial frame rate, doing nothing
903 frames in 5.0 seconds = 180.503 FPS
721 frames in 5.0 seconds = 143.921 FPS
720 frames in 5.0 seconds = 143.995 FPS
721 frames in 5.0 seconds = 144.089 FPS
# me doing my level best to shake its unflappable frame rate consistency
721 frames in 5.0 seconds = 143.900 FPS
720 frames in 5.0 seconds = 143.989 FPS
# me giving up
721 frames in 5.0 seconds = 144.111 FPS
721 frames in 5.0 seconds = 143.930 FPS
# 2. Running on my internal monitor
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
# Again, me starting out doing nothing
826 frames in 5.0 seconds = 165.130 FPS
721 frames in 5.0 seconds = 144.002 FPS
# Me trying something
720 frames in 5.0 seconds = 143.988 FPS
720 frames in 5.0 seconds = 143.948 FPS
721 frames in 5.0 seconds = 144.064 FPS
X connection to :0 broken (explicit kill or server shutdown).
As you can see, under Xorg not only is my frame rate far more consistent, it's also significantly higher.
This performance impact also seems to effect benchmarks like Unigine Superposition, where I'm getting a score 30% or more lower than I should when under Wayland.