Did you try this External monitor freezes when using dedicated GPU - #263 by dmakc ?
Iāve tried to make NVidia GPU primary rendering provider as described at NVIDIA Optimus - ArchWiki
Iāve created configuration file /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf with recommended contents:
Section "OutputClass"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "yes"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection
And restarted Xorg session (logged out and logged in again).
Now all rendering is performed by NVidiaās dGPU and there is no freezes in glxgears/vkcube, cause reverse PRIME is not needed anymore. Ordinary PRIME (forward PRIME) is used in this setup. Yes, dGPU draws little more power, then Intelās iGPU. But iām ready to pay this price to get renderint without freezes. Especially while using AC power source.
I will test more and see what happens. But for now I am quite satisfied with the result. The external display works without freezing, the built-in display also works without problems.
This solution works GREAT!
Until I turn off the TV and walk away. When I come back, the UI freezes.
Iām not sure if this is directly related, but Iāve been having the exact same symptoms (2nd monitor [via HDMI] freezing) on my Ubuntu (wayland) desktop ever since upgrading from the 510 drivers. GeForce GTX1650. Reloading GNOME and/or power cycling the monitor unfreezes the screen. Let me know if/how to help debug.
My solution for now, on top of dmakcās solution, is to put both internal and external displays in āmirrorā mode. Then I can set internal display to 0% so itās physically turned off.
In mirror mode, it still freezes when turning the TV back on, but after 15 seconds, KDE resets itself. Thatās an acceptable work-around, and the rest of time is more stable than it has been in a long time!
Just checked up latest 570.133.07 and it seems nothing changed in context of current topic. Moreover, it doesnāt work for me without options nvidia NVreg_EnableGpuFirmware=0. :-(
No errors in the X.org logs, nor in the dmesg, but freezes in reverse PRIME are still here. The only positive change Iāve noticed with 570.133.07 is lower PCIe bandwidth and GPU usage.
The only positive change Iāve noticed with 570.133.07 is lower PCIe bandwidth and GPU usage.
I also see less usage. But since the update the gpu and pcie are jumping constantly between all the different powerlevels (from lowest to highest). So my guess is that this is more a result of the gpu and pcie running on a higher frequency on average and not of less data being transferred.
Same issue with the latest Nvidia drivers 570.133.07.
When I connect external monitor to USB-C than KDE freeze in X11.
In the 550xx branch I didnāt observe this issue.
Any suggestions?
Retried the newest NVIDIA Open Beta drivers on Arch 570.133.07.
No luck. Still the same issue. Some applications started with Optimus prime (prime-run) freeze after a few minutes for me when displayed on external screens.
Using only NVIDIA drivers and not the internal AMD-GPU on my notebook is no option, because the cooling fan will be active 24/7.
I reverted to the 550 branch. Works nicely. Maybe It would be helpful to identify with what version the errors were introduced. 550.144.03 works fine.
I am using these packages from Arch AUR for a working setup:
Driver:
Utils:
NVIDIA: Itās absolutely sad that you made billions with AI and canāt hire a single guy to properly do QA for the absolute basic features of your product.
Moreover, they know how to reproduce this discussed issue, but still not found any solution yet. I think, they just wait for us to surrender and pass over this problem.
Just tried latest beta 575.51.02 with proprietary kernel modules and it performs much better, regarding discussed freezes. But I had to set options nvidia NVreg_EnableGpuFirmware=0 to get KDE booted.
Despite of this glxgears/vkcube resizing test with PRIME offload shows almost no freezes. So I think that there is some progress in fixing annoying bug. And there is some interesting words in release notes:
Fixed a bug that prevented PRIME Render Offload from working correctly when using NVIDIA GPUs as both the render offload source and the render offload sink.
Hi,
My solution is to switch dGPU only mode. And do not use intel gpu and it looks good. This is only working solution for me.
dGPU draws much more power. :-(
With NVidia drivers performing much worse, I switched to using only Intel iGPU and running PRIME applications on dGPU on demand. My laptop is cool and quiet in this setup.
Some news, using Ubuntu 25.04 with 570.133.07 (GeForce RTX 4070), with Wayland, external monitor works properly with on-demand mode (there is another issue related with frame rate and suspend, but at least itās possible to use an external monitor as it should be)
570.144 and the problem stills happens.
Wayland is not an option for me, watching a video in the secondary monitor lags my laptop screen.
NVIDIA-SMI 535.216.03 Driver Version: 535.216.03 CUDA Version: 12.2
ThinkPad P16 Gen 2 + NVIDIA RTX 4000 Ada
debian trixie + 6.12.22 kernel
when working with dgpu no issues except high battery drain
in hybrid mode + prime offloading certain apps (Fidelity Pointwise, combination of vkcube + glxgrears + firefox) trigger external tb display freeze, below follow steps to produce kind of display reset that atm spares logouts/resets of the entire machine:
- figure out the active display profile
xfconf-query -c displays -p /ActiveProfile
2edff4e0-f0e1-488e-9d38-827096643853
- list profiles:
xfconf-query -c displays -l
- check the commands that switch to Fallback and back then create a script, if freeze reoccurs: rerun the script :
cat >~/bin/display_reset
xfconf-query --create --type string -c displays -p /Schemes/Apply -s Fallback
xfconf-query --create --type string -c displays -p /Schemes/Apply -s 2edff4e0-f0e1-488e-9d38-827096643853
(ctrl-d to save)
chmod +x !$
didnāt dig into frame-rate details yet
Previously i was using nvidia driver 565 with a little bit older kernel version, now i decided to use newest kernel, it seems no longer possible to use nvidia driver 565 or below with newest kernel together, if i downgrade kernel, i can still use 565, but i do not prefer that.
The newly introduced bug after 570+ causes external monitor to go black screen with only mouse arrow, if laptop lid is closed or laptop screen is not primary monitor, so it causes external monitor as primary monitor not possible anymore. A workaround is to use laptop screen as primary monitor and drag programs to external screen whenever they are launched in laptop screen, not so feasible but it works. Another workaround is to enter uefi setup and set gpu to nvidia dgpu only option, in this mode, external monitor works, doesnāt freeze like using reverse prime mode, but there are some delays introduced to things, for example, on plasma desktop, clicking on start menu, it doesnāt open as fast as using amdgpu, system just freeze for several hundrends of milliseconds before opening the menu, also resize / drag of windows, only sometimes have a weird low fps for like 1-2 seconds, sometimes, programs like simple kcalc calculator or some other windows that are minimized, freeze the pc when restored/maximized again, freeze takes several seconds long which is annoying, mouse arrow can move, but screen is not getting updated while frozen in this bug.
Other than that, it is obviously draws more power, causes fans to spin faster than using amdgpu, even using simple programs like calculator, notepad or similar things, and also launching programs take a little bit of longer delay than using amdgpu, like 1-2 seconds delays.
Now i am using nvidia dgpu only mode, not satisfied from nvidia at all, and it sometimes driving me crazy, they havenāt fix this bug since 2+ years and yet introduced new bugs on top of it, maybe purposely doing this to force people to use windows, but the drawback is, instead we could just stop buying nvidia in future, as a guaranteed solution.
Same issue. 570 driver doesnāt work with external HDMI monitor, KDE freezes and breaks.
Tried 570.144 on 6.14 kernel (Manjaro) now, still doesnāt work.
550 dkms driver worked before, Iāll try to install it again.
Since a few weeks I even got the problem that not only 3d-applications but even video-players freeze immediately if they are displayed on my external monitor and every time I had to switch between bash and display-session to get things running again. So I basically got to a point where an external monitor was not usable at all.
I found a (little bit expensive) solution now:
I bypassed the nvidia-gpu completely by using an USB-A to HDMI adapter. On this side I found a few recommendations:
https://askubuntu.com/questions/1322169/usb-to-hdmi-adapter-that-works-with-ubuntu
And I chose this one:
If you donāt need 4k some of the cheaper adapters should also work. Just make sure, that it is linux compatible and that it is a ārealā USB3 ā HDMI converter that doesnāt tunnel the display-signal from the nvidia-gpu through an usb-c cable (This is usually or maybe even always the case for docking stations, which is why they wonāt work as mentioned earlier in this thread).
So far everything works perfectly. No freezes, the battery lasts much longer and to my surprise (after switching to the proprietary display-link driver) the latency is even a bit smaller compared to the nvidia-gpu. Only disadvantage that I noticed is that videos run slightly less smooth. But considering that a 2GB/s video-stream is compressed to less then 300MB/s Iām absolutely amazed that it works that well.
Still Iām a bit annoyed, that I had to buy this adapter because nvidia doesnāt get this bug fixed, which is already around for 1½ years.
If somebody of you tries the same solution, please write if it worked for you, too. I was thinking a lot about spending this much money on something where I was not 100% sure if it will solve my problem.
Just tried 570.153.02 with following release note:
Fixed a bug that could cause OpenGL applications and compositors to stall when using NVIDIA as a PRIME Display Offload sink (āReverse PRIMEā), potentially resulting in a black screen.
But⦠nothing changed. Reverse PRIME glxgears resizing test freezes as usual. :-(
At the same time I successfully booted with options nvidia NVreg_EnableGpuFirmware=1, while previous driver versions failed to output anything to the external monitor, connected to the NVidia dGPU HDMI. So there is little progress. ;-)