Nvidia, please get it together with external monitors on Wayland

Same issue here. Maybe this information helps.

I have a lenovo legion laptop with intel+nvidia, on Ubuntu 22.04.5, which is connected to an external 165hz monitor through a thinkpad docking station.

Everything works correctly in Windows. However in Ubuntu I have the following problems:

  • On Xorg if connected to the monitor when the it goes in screensaver it will very quickly freeze. If not connected to the monitor the UI will hick-up a couple times, with mouse being blocked, and at some point completely freeze (only UI, audio continues to work).
  • On Wayland these don’t happen. But external monitor gets terrible performance: 55fps for 165hz, also the mouse lags terribly, especially when going over intractable UI elements.

The Xorg issue is a newer one, not sure if related. The Wayland issue is here since forever, I have discovered it when there were first time big news that Wayland is much better. I haven’t been using it for the same reasons since then. It baffles me that this was not fixed in this many years. I have tried different Nvidia driver version, Ubuntu versions and Kernel versions.

╰▶ nvidia-smi --version  
NVIDIA-SMI version  : 550.107.02
NVML version        : 550.107
DRIVER version      : 550.107.02
CUDA Version        : 12.4
1 Like

I have just upgraded to Ubuntu 24.04 and I must say the mouse lag issue is bit better. However when going over elements it still lags. UFO test still shows 50-60fps when it should be 164-165.

I’m just chiming in that on a Razer Blade 2024 I get 240fps with X11 on a fresh Ubuntu install (NVIDIA 550 proprietary drivers) but "55"ish with Wayland, with “Prefer Maximum Performance” and “prime-select nvidia” both set. And note from e.g. ufotest.com it seems that that effective 55 actually feels very bad due to very bad stuttering, giving like a sub 30 feeling (and enough for me to notice and enter this Google rabbit hole even though I’m not particularly discerning).

For what it’s worth, basic tools like nvtop show ~80% usage on the iGPU when simply vigorously dragging around windows on the (laggy) Wayland configuration, while on X11 it shows a flat 0%, so that’s indicative of the crux of the issue.

I found two workarounds for my system (Arch Linux+KDE plasma 6.1.5, nvidia 560.35.03)

  1. Disable GSP firmware using the kernel parameter options nvidia NVreg_EnableGpuFirmware=0
  2. Setting the KWIN_DRM_DEVICES variable by creating a file in /etc/profile.d with the following: export KWIN_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0

However, I don’t always get the expected frame rate. When I have two external monitors connected (1 through USB C and the other through HDMI), everything works fine with the above workarounds. But when I remove either monitor, the FPS drops by a factor of 1/2.
I am attaching the Nvidia bug report with GSP firmware disabled here.
nvidia-bug-report.log.gz (770.3 KB)

Hello, any news on this issue? Will it be fixed in the next major Nvidia Linux driver release? Thank you.

1 Like

Apologies for the delay, this is still under investigation at our end, shall update about the progress once received from engineering team.

installing intel-media-driver made it way better in my case, now on my system external monitors are able to keep around 60hz at least, general performance still not good on animations and in some situations

I have the same issues as fodor18zoltan, terrible mouse lag on the external display and freezing from the screensaver, running ubuntu 22.04 on a Lenovo Legion 5.

Nouveau surprisingly gives maximum performance and fps on my external monitor, hope this issue will be resolved asap

2 Likes

Relevant discussions on:

  • https://gitlab.gnome.org/GNOME/mutter/-/issues/3461
    
  • https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4027#note_2231341
    
  • https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441#note_2236368
    
  • https://gitlab.gnome.org/GNOME/mutter/-/issues/3664
    
  • https://gitlab.gnome.org/GNOME/mutter/-/issues/3713
    

nvidia-bug-report.log.gz (506.2 KB)

1 Like

Cross referencing here the same issue mentioned in the open module repo: Low fps on external monitor connected to nvidia hdmi port · Issue #650 · NVIDIA/open-gpu-kernel-modules · GitHub

Hello! Version 565 has not fixed the issue. Please keep us updated with the status of this bug. Thank you.

1 Like

Anyone encountered this one? [530.41.03] External monitor stays frozen until I move my mouse - #57 by opisalwaysafag

For me, CachyOS repo’s helped to fix the lags on the external monitor. In gaming though, the image is still lagging, even when mangoHUD shows I have around 100FPS, it feels like 20. Interesting find: when I play a video in the backgound, the game image is smooth. Nvidia drivers are very weird…

Just to provide an update as mentioned in the Open module issue:

I’ve tried to set the GPU state using what you’ve mentioned, I’ve got some interesting results. When running

__GL_SYNC_TO_VBLANK=0 prime-run glxgears

The power state indeed goes to P0 and the framerate on the desktop improves. Whowever, if I switch to a open Firefox window open in https://testufo.com/, the framerate goes back to half the refresh rate regardless of the GPU power state.

I’ve made a small recording showing what happens: https://youtu.be/FY-LxShijdk

I’m also affected by this on an HP Victus. It’s smooth on the integrated display but the FPS drop on an external monitor. I’ve been using the Plasma FPS counter (which can be enabled under “desktop effects”) to understand it: when a large region of the display is repainted, the FPS drop. The problem is not Plasma/KDE specific, though, since it also happens on Gnome. I’m using the nvidia-open drivers. Has anyone tried the nouveau drivers? If it’s nvidia-specific, that should make the problem go away (I haven’t tried).

Edit: I’ve tried novueau and I have similar problems.

This is a perf flamegraph using nvidia-open with vsynctester open (rendering at 20FPS) on an external monitor:

Sorry I have some symbols missing. With nouveau the results are similar, but I get 30FPS instead of the 20FPS of nvidia-open.

The whole thing only happens on wayland and only on an external monitor, but it’s independent of the desktop I use.

2 Likes

And to compare, this is the flame graph of the same thing rendering on the integrated monitor at 144FPS:

2 Likes

@albertvaka can you share you generated this? I would like to get it from my machine as well