External monitor freezes when using dedicated GPU

I see here significant difference with my setup - you have no Xorg in nvidia-smi output. But I have one:

Sat Jan 18 16:29:27 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| 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 3050 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   43C    P5              5W /   60W |      96MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1751      G   /usr/lib/xorg/Xorg                             69MiB |
+-----------------------------------------------------------------------------------------+

Could you share your nvidia-setting main window screenshot?

Maybe all of your monitors are connected to an iGPU?

Hello, sure:

I am not really sure to what GPU my screens are connected. Can provide info if you tell me how to get it.

I do have a hybrid setup. I configured in BIOS to use both GPU.
When I want to use the NVIDIA-GPU I start applications with ā€œprime-run applicationā€.

1 Like

There is no monitor connection in provided screenshot. So I’m sure, that both of your monitors are connected to the iGPU, not the NVIDIA’s dGPU. I’ve tried such setup on my laptop and it performs much better, there are no freezes in glxgears/vkcube test with PRIME Offload. But there are a lot of other issues with USB Type-C to HDMI converter, so I’ve prefer to use HDMI output, connected to NVIDIA’s dGPU.

Yes, but this is different hybrid mode. In my case Intel’s iGPU is master and all Xorg rendering is performed by by this iGPU. As I can understand, iGPU writes rendered desktop image to NVIDIA’s dGPU memory, which is output by dGPU to HDMI. At this time there are no freezes. But when dGPU is involved in PRIME rendering offload, it writes to the NVIDIA dGPU memory, which later is copied to the desktop frame buffer, allocated for iGPU in dGPU memory. And I suppose, that latter copying is the root of our issues and freezes. In your case all desktop framebuffer is in iGPU memory and there is only one DMA copying of PRIME rendered data: from dGPU memory to the iGPU framebuffer. Buffer synchronization is much simpler in such case, so we have no freezes.

May be I’m missing something, but I have no other explanations for the freezes under discussion.

1 Like

TLDR: I’ve been having exactly the same problem for years, got a UGreen Evodock dock with one HDMI port and everything works smoothly (Debian 12, hybrid Intel / Nvidia GPU, xorg and Wayland, 565.57.01 driver version).

I’ve been having exactly the same problem for years, first with an MSI laptop with hybrid GPU configuration (Intel / Nvidia 960M, Ubuntu 22.04), and now with a newer laptop (Alienware M16 R1, with Intel and Nividia 4070 GPU), it has a pretty standard installation of Debian 12, used to use with the distro’s included Nvidia proprietary drivers (535.216.01), I upgraded to the latest drivers from the Nvidia repository for Debian (565.57.01).

The only game I currently play is World of Tanks with Lutris, with an external LG monitor, connected to the laptop’s HDMI port, and the laptop’s screen disabled (via Gnome display configuration).

Whenever I launch the game, most of the times it hangs when going to full screen, I have to change to different TTYs multiple times until it ā€œunfreezesā€, sometimes I have to stop the game and launch it again, sometimes it goes full screen without problems, other times I have to switch between TTYs.

The problem is present when in a xorg session (with no extra configuration, I mean, without xorg.conf file), when finally I can play the game, it works fine, the refresh rate of my monitor is 74.97Hz, and with v-sync enabled in the game, I get around 75FPS.

If I launch the game in a Wayland session, the game starts fine (full screen), but kind of laggy, with v-sync enabled in the game, the FPS get locked to 60 FPS or less.

Same behavior with different versions of the driver, from 535.216.01 to 565.57.01, of course, with nvidia-drm.modeset=1.

The only difference I’ve noted with newer versions of the driver, 565.57.01 for example, is that when I launch the game in a xorg session, it stars like slow, I do not how to explain, but the mouse becomes laggy when I move it, after the game starts (WG Client), it works normally.

Well, it turns out that I recently bought one of those UGreen Evodock docks to expand the USB ports, the one I got has an HDMI port, so to experiment I connected the monitor to the dock’s HDMI, for my surprise, with the monitor connected to the dock’s HDMI port, everything works perfectly, both, in xorg and Wayland, in xorg no more hangs / freezing when launching the game and going full screen, and in Wayland the game and everything in general, works smoothly, in the game, with v-sync enabled I get pass the 60 FPS lock, I get 75 constant FPS.

3 Likes

Hello, this seems to be a good workaround I would be willing to try. Searching for the UGreen Evodock I saw they have several models. Could you provide your exact model?

If that solves the problems and current drivers would work, this seems to be a good investment to finaly get rid of all the problems.

Sorry, I got silenced because I shared a link to the product.

Yes, I think it worth for the price, as you noticed, there are several models, the one I bought was the cheapest of the line (6 in 1, with 1 x HDMI port):

ā€œUGREEN Revodok Pro USB-C Hub 6 in 1 10Gbps USB C 3.2 & USB-A 3.2 4K 60Hz HDMI, 100W Power Delivery for MacBook Pro/Air, iPad Pro, Thinkpad Rog Ally and More.ā€

I’ve been using it without any problem, I wonder why the issues when using the integrated HDMI port, both in xorg and Wayland.

I think I have to do some tests.

Some information:

ariel@graske:~$ inxi -Ga
Graphics:
  Device-1: Intel Alder Lake-HX GT1 [UHD Graphics 770] vendor: Dell
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: DP-1 off: eDP-1 empty: DP-2 bus-ID: 00:02.0
    chip-ID: 8086:4688 class-ID: 0300
  Device-2: NVIDIA AD106M [GeForce RTX 4070 Max-Q / Mobile] vendor: Dell
    driver: nvidia v: 570.86.10 alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-03) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022-23+ pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 link-max: gen: 4 speed: 16 GT/s ports: active: none
    empty: DP-3,HDMI-A-1,eDP-2 bus-ID: 01:00.0 chip-ID: 10de:2860
    class-ID: 0300
  Device-3: Sunplus Innovation Integrated_Webcam_FHD type: USB
    driver: uvcvideo bus-ID: 1-8:5 chip-ID: 1bcf:2bae class-ID: fe01
    serial: 01.00.00
  Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.9
    compositor: gnome-shell v: 43.9 driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa alternate: nv dri: iris gpu: i915
    display-ID: 0
  Monitor-1: DP-1 model: LG (GoldStar) MP59G serial: 16843009 built: 2015
    res: 1920x1080 dpi: 102 gamma: 1.2 size: 480x270mm (18.9x10.63")
    diag: 551mm (21.7") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 model: BOE Display 0x0af9 built: 2022 res: 2560x1600
    dpi: 188 gamma: 1.2 size: 345x215mm (13.58x8.46") diag: 407mm (16")
    ratio: 16:10 modes: 2560x1600
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics (ADL-S
    GT1) direct-render: Yes

ariel@graske:~$ nvidia-smi 
Tue Jan 28 21:41:39 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.86.10              Driver Version: 570.86.10      CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| 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 4070 ...    On  |   00000000:01:00.0 Off |                  N/A |
| N/A   48C    P8              2W /  115W |      15MiB /   8188MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            3635      G   /usr/bin/gnome-shell                      2MiB |
+-----------------------------------------------------------------------------------------+

1 Like

Just tried 570.86.16 | BETA and I’m completely disappointed. I’m using Xorg + KDE Plasma with Debian 12:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

And after installing 570.86.16 I can’t use my laptop with external monitor. It is not only freezing, but external monitor doesn’t update. Separate windows are freezed with different artifacts of other windows. glxgears can’t run at all.

Release notes of 570.86.16 has the following sentence:

Fixed a bug that could cause external displays to become frozen until the next modeset when using PRIME Display Offloading with the NVIDIA dGPU acting as the display offload sink.

Hmm… Cause I can’t run glxgears with or without PRIME Display Offloading I can’t complain on freezing. Profit!

@amrits, I understand, that this is BETA. But no other betas at past doesn’t show such dramatic results. Could you comment such 570.86.16 behavior?

PS: There were no error messages in the dmesg or in the Xorg log. It just stopped working after installing new driver.

1 Like

I’ve found a way to make 570.86.16 work with my laptop. The only thing I’ve needed is following line in /etc/modprobe.d/nvidia.conf file to turn GSP off:

options nvidia NVreg_EnableGpuFirmware=0

And after reboot is 570.86.16 working properly, but freezes in glxgears test (prime-run glxgears + intensive window resizing) are still here, despite statements in release notes regarding reverse PRIME.

So, I switched back to 550.144.03, cause it has no significant difference over 570.86.16 for me.

I noticed something strange in dGPU load and PCIe bandwidth utilization with external monitor connected:

I have this high load while only Firefox window is displayed on external monitor. No reverse PRIME application are running. Only Xorg is using dGPU:

$ nvidia-smi 
Fri Feb  7 09:41:53 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.144.03             Driver Version: 550.144.03     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 3050 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   44C    P5              5W /   60W |      73MiB /   4096MiB |     34%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1401      G   /usr/lib/xorg/Xorg                             69MiB |
+-----------------------------------------------------------------------------------------+

What is a cause of such load? I can’t understand.

1 Like

Update on my problems:
I bought the UGREEN Revodok @Magigamix reccomendend.

Sadly it didn’t solve my problems. I installed the latest nvida-open package for arch (570).
After that my games started freezing again. I reverted back to 525.

Still not a bad buy. Nice dock but not able to solve my problems with the NVIDIA-driver.

NVIDIA. Please fix!

1 Like

What is a cause of such load? I can’t understand.

The usage is caused because the part of the framebuffer that is shown externally has to be copied over from your internal gpu to the nvidia-gpu each time your external monitor refreshes, independent of any changes to the framebuffer or the applications you are running right now (assuming you are running in on-demand mode). Would be nice, if the framebuffer is only copied if there is the actual need, but I’m no expert, it might be very hard to implement.
There is no need to worry about the apparently high usage though. You are using 32 % / 42 % of the computation power / bandwidth given the current frequency your gpu is running at (see PowerMizer). It is only a fraction of what your gpu is capable of, if it is switching to its maximum frequency.

1 Like

Hello all!
I read the entire thread and I can say I am also affected by the same issue on a HP Omen 16 (i7 14700HX, Nvidia RTX 4070), running a fresh install of Ubuntu 24.04

When I connect an external monitor (either via HDMI or USB-C), after I start an application that runs on GPU, the external display freezes but I can still move the mouse and the system is working properly, but even if I disconnect the monitor, it still results as connected, in the Display Settings

To summarize the available workaround: a ā€œfixā€ available is to open NVIDIA settings and in nvdidia-settings configuration and then select from ā€œon-demandā€ to ā€œperformance modeā€ (either in the GUI or via prime-select, correct?), of course not ideal as it’s consuming a lot of power. Also, I don’t know if other people are affected by the same thing, but immediatly after startup the system ā€œhangs a bitā€ (5-10 seconds) before I can open any application (even a Terminal). I tried different drivers (both open or ā€œstandardā€) 550, 560 but no difference

I saw the post from @dmakc about this NVreg_EnableGpuFirmware and I still need to try it out, but is this solving the issues without any downside?

Thanks all, and I agree with the common sentiment that it’s crazy that this is still an issue after several years of it being reported, if anyone has links to official bug reports/tracking pages, link them, maybe we can try to bump them for visibility

@amrits , is there any official information or feedback on this issue? Thanks a lot!

2 Likes

Tried 570.124.04 and still happening with Ubuntu 24.10 + Xorg, I just execute __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears
resize the windows and the external monitor freezes.

I have the same problem it doesn’t happens always and I haven’t notice this issue using Wayland.

1 Like

Same effect in Debian GNU/Linux 12.9 with Xorg and latest stable 570.124.04 and NVreg_EnableGpuFirmware=0
Freezes are still here. :-(
But 570.86.16 performs much worse in my case, cause with 570.86.16 installed I was unable to boot in KDE Plasma/Xorg - application windows were randomly freezed. 570.124.04 has no such effects.

1 Like

Thanks for the feedback!

So, my current understanding is that we can ā€œcopeā€ with this issue in 2 ways:

  • keep using x11 but with ā€˜prime-select nvidia’ (aka ā€œmaximum performanceā€ in nvidia settings), meaning having all apps running on the dGPU, with more energy consumption, until the issue discussed in this thread is identified and fixed
  • switch to Wayland, meaning that external displays are working properly, also setting ā€˜prime select on-demand’. But another issue is present, meaning low frame rates on the external monitor (for which it seems someone is working on a fix in the open-gpu-kernel-modules repo) (@felipe42x I assume you are observing this, using Wayland with an external monitor, correct?)

Same here, with those drivers KDE is mostly unusable due to it freezing randomly. What amazes me is that @amrits just ignore to answer after have been pinged several times, and there is even a internal bug ticket so it seems the found the issue atleast?

Im mostly in Windows these days.

1 Like

Yeah, Wayland presents issues with lag so that is not a solution for me. The only thing that kind of mitigates the problem with the freezing external screen is to drop the refresh rate of the screen, the freezes become less frequent, but obviously, that’s not an ideal solution, so I have no choice but to use Windows if i want to do GPU heavy tasks and use an external screen.

1 Like

Did you try to set NVreg_EnableGpuFirmware=0 ?
Create /etc/modprobe.d/nvidia.conf with following string:

options nvidia NVreg_EnableGpuFirmware=0

Without this setting KDE is almost unusable due to freezes just after booting and logging on.

1 Like

I’ve tried different refresh rates and saw no difference in 60 Hz vs 144 Hz.
The only thing, that significantly changes behavior, is switching from HDMI (coming from dGPU) to USB Type-C (DP) output (coming from iGPU) and using Type-C => HDMI adapter.

1 Like

FYI, I did not try this yet, but 3 days ago this driver (570.124.04) was released: Driver Details | NVIDIA

From the changelog:

Fixed a bug that could cause external displays to become frozen until the next modeset when using PRIME Display Offloading with the NVIDIA dGPU acting as the display offload sink.

I will try it out in the next days

EDIT: A lot of threads not promising on this driver release, multiple issues being reported, apparently

1 Like

I can confirm that 570.124.04 does not fix the issue.
Running with or without a compositing wm.
Using external monitor with USB-C.
Just open glxgears or vkcube using prime offload on the external monitor, start resizing and it will freeze, every time.
glxgears freezes the display for seconds, but if you keep moving the mouse it will come back.
vkcube can, very often, freeze the display indefinetely, a situation that only turning the display off and back on through xrandr can revert.

I have been following this thread since it opened in Sep 23.
This is an issue which makes a perfectly normal use of the very product that NVIDIA sells, i.e. using an external display, unavailable because of a bug in their software. It is not an issue related to any game, any window manager, compositor, any recent kernel version or any other strange software.

It has multiple reports with multiple hardware and extensive descriptions.

Still, they haven’t got it fixed after all this time.

This is an absolute disrespect from NVIDIA.

Hardware:
i7-11800H
HM570
GA106M [GeForce RTX 3060 Mobile / Max-Q]

5 Likes