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
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:

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.