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.