Wayland external monitor refresh rate issue

Hi, I’m new to linux and started to use Fedore 39 (GNOME ver.) a couple of months ago. I really like it but there is something that bothers me. I have a Dell g15 5511 (with Nvidia Geforce 3060) laptop and there is a problem while using external monitor (144hz 1080p). It is fine on laptop’s monitor (165hz) but external monitor’s refresh rate is very low (~70hz) and inconstant that needs to be 144hz. here is the results of glxgears. low fps ones is the external monitor, higher ones is the internal monitor. I’m using 550.67 driver. any advice to fix this issue? thanks.

gny@fedora:~$ glxgears
Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate.
351 frames in 5.0 seconds = 70.083 FPS
304 frames in 5.0 seconds = 60.635 FPS
332 frames in 5.0 seconds = 66.317 FPS
353 frames in 5.0 seconds = 70.595 FPS
354 frames in 5.0 seconds = 70.616 FPS
334 frames in 5.0 seconds = 66.711 FPS
X connection to :0 broken (explicit kill or server shutdown).
gny@fedora:~$ glxgears
Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate.
457 frames in 5.0 seconds = 91.359 FPS
653 frames in 5.0 seconds = 130.504 FPS
803 frames in 5.0 seconds = 160.451 FPS
783 frames in 5.0 seconds = 156.563 FPS
804 frames in 5.0 seconds = 160.664 FPS
788 frames in 5.0 seconds = 157.548 FPS
824 frames in 5.0 seconds = 164.612 FPS
822 frames in 5.0 seconds = 164.211 FPS
823 frames in 5.0 seconds = 164.583 FPS
822 frames in 5.0 seconds = 164.223 FPS
XIO:
fatal IO error 62 (Timer expired) on X server ":0"
after 7780 requests (600 known processed) with events remaining.

I don’t know exactly, but this could be a gnome issue:
https://gitlab.gnome.org/GNOME/mutter/-/issues/2315

maybe I should try KDE then

Are you using mutter 46.1? It includes a fix which should make external monitors more performant.

yes, I’m using latest version. I updated all of them. And, I changed refresh rates to 120hz. Now, It stucks with ~60 fps. It seems It works with Actual Refresh Rate / 2 on external monitor.

gny@fedora:~$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
305 frames in 5.0 seconds = 60.823 FPS
335 frames in 5.0 seconds = 66.949 FPS
299 frames in 5.0 seconds = 59.722 FPS
301 frames in 5.0 seconds = 60.041 FPS
299 frames in 5.0 seconds = 59.737 FPS
314 frames in 5.0 seconds = 62.614 FPS
303 frames in 5.0 seconds = 60.433 FPS
299 frames in 5.0 seconds = 59.651 FPS
327 frames in 5.0 seconds = 65.332 FPS
314 frames in 5.0 seconds = 62.633 FPS

I don’t know if it’s releated but I’ve found this MR Nvidia secondary GPU copy acceleration (!3304) · Merge requests · GNOME / mutter · GitLab
I hope it’ll fix this issue after merge completed. If it’s already merged then It doesn’t work properly.
Any comments on this?

here’s my neofetch

             .',;::::;,'.                gny@fedora 
         .';:cccccccccccc:;,.            ---------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 40 (Workstation Editi 
    .:cccccccccccccccccccccccccc:.       Host: Dell G15 5511 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 6.8.7-300.fc40.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 9 mins 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2525 (rpm), 26 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: bash 5.2.26 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 46.1 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: adw-gtk3-dark [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Adwaita [GTK2/3] 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: gnome-terminal 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: 11th Gen Intel i7-11800H (16) @ 2 
:cccccccccccccccccccccccccccc:'.         GPU: Intel TigerLake-H GT1 [UHD Graphi 
.:cccccccccccccccccccccc:;,..            GPU: NVIDIA GeForce RTX 3060 Mobile /  
  '::cccccccccccccc::;,.                 Memory: 5006MiB / 31818MiB 

Yes, that’s the MR I was mentioning. It’s included in Mutter 46.1.

You can confirm your Mutter version by running this command: sudo dnf info mutter

yes, I’m using the latest one.
For better testing, I did a clean install with Fedora 40 KDE version. Without a proprietary driver It performed better. For example, with nvidia proprietary driver 70fps (144hz), without proprietary driver 110fps (144hz). And I disabled the cpu turbo boost, It went all down to half of the fps for both situtations ( w/prop 30fps (144hz), w/o prop 60-70fps (144hz) ). After all testing on KDE I did another clean install but with Gnome. It did get the same results as KDE. I don’t think it’s totally DE issue. I think there’s something on the nvidia’s proprietary driver or wayland, Idk.
Anyone ever has this kind of issue?

Hmm… it could very well just be a consequence of how secondary gpu monitors work on Wayland compositors right now.

The frame is composited in the primary gpu, then copied to the secondary gpu so it can scan that out.

This approach is not the best because it means any window/client being rendered on the dgpu needs to do several jumps. First, its rendered in the dgpu, then its copied to the igpu, where the frame is composited, then said frame is copied back to the dgpu so it can be scanned out.

There’s a lot of work to be done for decreasing the latency of monitors connected to secondary gpus.

I see. It seems there’s nothing we can do right now, am I right?

Well… If you know someone who has a laptop with a dgpu from another vendor, you could ask them to test their performance with external monitors. There might be additional issues, besides the inefficiencies I’ve mentioned, which are affecting nvidia specifically.

also, I wrote this issue on fedora and gnome forums. I did not get a proper answer about it. Someone suggested that I maybe stick with x11 for a while. I think It’s not a solution for me. It’s easier for me to switch back to win11 for multi monitor purposes. It performs better.

I have the same issue but with nvidia 555 driver and kde 6. With nvidia 550 driver or nvidia 555 driver and NVreg_EnableGpuFirmware=0 I have normal framerate on external monitor

Hi, i too have this problem running an RTX 3060 Max-Q with 550.90.07 driver on Fedora 40 with GNOME. I am using Mutter 46.2. Using an external 75hz monitor, glxgears runs at ~38 fps. I also don’t think this is completely DE dependent as i tried it in Hyprland and the same issue exists there.

Hi, i just got the 555 driver update and now, things are even worse! When the laptop rebooted from the update, (almost) everything was working as expected with the full 75hz, no stuttering, no lag, but the nvidia settings could not load anything about the driver and the nvidia-smi utility was giving me some error (don’t remember what it was).
After i rebooted, the nvidia settings and smi utility worked but the frame rate is now at ~26 and the stuttering/lag is back. It is very bad.
Everything is fine with the laptop screen tho, just like it was before the update.

1 Like

I can confirm that it’s worse than previous one.

1 Like

From my past experience (I haven’t been running Linux on my laptop for quite some time now) the only fixes were:

  1. Switch the laptop to only use the dedicated NVIDIA GPU if you laptop allows it (mine does). In this case everything worked fine since both the internal screen and the external screen were directly running from the dedicated GPU. Of course that this eliminates any of the power saving advantages that the hybrid mode may have.
  2. I was able to use the nvidia-smi command to ramp up the NVIDIA GPU clock speeds. If I ramp them up to the maximum the performance issues disappear. Of course that, once again, this will probably have an impact on power consumption.

These are just workarounds. What we really need is a proper fix. I believe that (part of) the problem is that the iGPU does all the rendering and composting by default. Therefore, the iGPU must also renders what is shown on the external screen but it must be copied from the iGPU frame buffer to the dGPU framebuffer. If the NVIDIA GPU is not properly managed, its clock speeds are just too slow and it is unable to receive all that data in a timely manner.

1 Like

Can also confirm this issue on wayland and a bit better on X11 but not perfect.
For replicating the issue its visible by dragging windows around but i had confirmed with glxgears and vkcube.

On wayland:

  • glxgears starts well then drops down from 120fps(my refresh rate match) to the 50 fps.

  • vkcube similar thing.

On X11:

  • glxgears starts well then runs inconsistent but close to refresh rate.

  • vkcube similar thing.

Testing setup:
Distro: EndeavourOS(arch based);
System: Lenovo Legion 15ach6h;
cpu:AMD r5 5600h;
dGPU:Nvidia 3060 Laptop.
Tested on discrete mode

On Hybrid mode same things work well.

nvidia-bug-report.log.old.gz (1.6 MB)

nvidia-bug-report.log.gz (1.7 MB)

I submitted two bug reports in case the first did not have what it needed since it crashed, the second was uploaded on hybrid mode