Wayland external monitor refresh rate issue (nvidia gpu)

Hi, I’m new to linux and started to use fedore 39 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. And, I updated all of my system, drivers and softwares to the latest like fedora 40, gnome 46.1 and nvidia driver 550.76. 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 changed refresh rates to 120hz. Now, It stucks with ~60 fps. It seems It works with Actual Refresh Rate / 2 on external monitor.
Btw, 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. And, I’m using latest updates.

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

My first experience on Linux was on a Dell G7 15 also with an Nvidia mobile card, which uses NVIDIA Optimus. I remember switching to Fedora because things worked there, and it was because iirc Fedora uses Wayland instead of Xorg for their windowing system, and Wayland + intel integrated graphics worked perfect with my laptop. The only issue is that it was not using the dedicated card, and I did not know this until I looked deeper.

Even if you have the nvidia drivers installed, your system might be loading only your integrated graphics and not even powering on your dedicated card.

Just winging this assumption based on my painful experiences with gaming laptops:
Do you have nvidia-utils installed? If so, can you run nvidia-smi?

Output should be something like this:

Fri Apr 26 00:43:20 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.76                 Driver Version: 550.76         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        Off |   00000000:01:00.0  On |                  N/A |
|  0%   49C    P0             38W /  170W |     393MiB /  12288MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1535      G   /usr/lib/Xorg                                 109MiB |
|    0   N/A  N/A      1690      G   /usr/bin/gnome-shell                           40MiB |
|    0   N/A  N/A      1873      G   /usr/bin/gnome-software                        16MiB |
|    0   N/A  N/A      2812      G   /usr/bin/gnome-calendar                        47MiB |
|    0   N/A  N/A      3340      G   /usr/lib/firefox/firefox                      155MiB |
|    0   N/A  N/A     62123      G   /usr/bin/kgx                                    7MiB |
+-----------------------------------------------------------------------------------------+

no, I don’t have it. should I install and how can I achieve that? :slight_smile:

here’s the 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 

The Fedora package that provides the nvidia-smi utility is the CUDA package:

sudo dnf install xorg-x11-drv-nvidia-cuda

If nvidia-smi shows that your GPU is off (or on, but is not being used by any process that should use the graphics card, such as games) you most likely do not have NVIDIA Optimus set up. (This is common, it took me 2 months to figure out what the heck NVIDIA Optimus is. Even Linus Torvalds has shown hate on this.)

This might not be your case, since the fact that it is displaying at all to the external monitor shows that it could be using your GPU, but I am not sure if it is actually offloading to it or just keeping it on to get to the HDMI output. Again, I only know this from an earlier model of that laptop that I had for a few years.

Thankfully, the community developed the proper software to make use of an NVIDIA Optimus gaming laptop on Linux.

Note that this software requires your desktop environment to use the Xorg windowing system. I believe Fedora uses Wayland, so this might not work on Fedora unless you modify your installation.

More detailed instructions on Optimus Manager are available on the readme of the repository. Hopefully this helps! :slight_smile:

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.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.