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
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)
Disable GSP firmware using the kernel parameter options nvidia NVreg_EnableGpuFirmware=0
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)
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.
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…
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’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.