External monitor freezes when using dedicated GPU

Good news, i have tried the new Nvidia driver version 575.64.03 LTS on my laptop, Amd 7940hs with integrated gpu + Nvidia 4070 laptop gpu, 1920x1080 144mhz integrated monitor, 3840x2160 144mhz external monitor.
Seems black screen bug is fixed and driver become usable now, i can now use amd integrated gpu and nvidia together, freezing bug is also made to freeze less frequently and took shorter times like 2-5 seconds. Sometimes, games start in flickering mode, i use xrandr workaround, just off and on the screen quickly in a script run by shortcut keys to fix flicker, sometimes if any app using nvidia, like mpv or smplayer screen freezes indefinitely, i use workaround script to unfreeze it again. And also, if you set smplayer’s video to use nvidia to decode, videos will launch slower, delayed, so i use only amd gpu to decode videos.
I use arch linux, xorg, sddm, kde plasma desktop, mostly single external monitor is active, now computer is usable like before.
I do not know if we should thank nvidia for fixing a bug, or instead just take back my disappointment without thanking, because they introduced the bug in the first place.

1 Like

Great news! I was starting to lose hope. It doesn’t work flawlessly, as the screen still freezes when I resize glxgears, but it’s less frequent now. After about a one-second freeze, the screen unfreezes and continues working on its own, without needing to change the monitor configuration to reactivate the external display.
That with the 575.64.03 and Ubuntu 24.10 and Xorg.

1 Like

The fact that we’re now celebrating a fix to a regression while the original bug (frozen screen) remains at large after about 21 months tells me everything I need to know.

It’s a shame, I have fond memories of NVIDIA going back to, say, the Riva TNT and GeForce 2 - but I wasn’t on Linux back then.

NVIDIA has simply not provided solid, stable drivers for Linux for me. I’m quite impressed with some things, but that’s mostly down to Valve/Proton, Wine, and Vulkan development (of course, NVIDIA teams do contribute there, too, so they earn some credit for that).

Yes, I’m keeping my NVIDIA equipment for a little longer, because I’m not a ‘bleeding edge’ user, but “time’s up” for this issue. I’m confident the 2060 will be the last NVIDIA tech I own.

4 Likes

I still experience permanent freezes with nvidia prime-run when i try to alt+tab on certain games for example “beyond all reason”, and most of the times if ever game is unfrozen somehow, after an alt+tab or accidentally pressing “windows key” that opens menu or similar linux shortcuts, game graphics become garbled, requiring to relaunch the game. This problem does not occur if i use “nvidia only” option from bios.
Also start menu delay, and some app windows will be shown a little delayed when clicked on notification icon etc. this problem occurs regardless of “nvidia only” mode is on or off, but if i don’t install nvidia driver and use laptop screen with amd integrated gpu, this problem does not occur. So it’s an obvious nvidia bug.

1 Like

The typical xrandr workaround moves all applications from the external monitor to the primary monitor. And if you use a tiling wm with tags/workspaces, you have to rearrange windows after moving back to the external monitor.
Instead resizing monitor unfreezes it without losing window states:

_fn()
{
	xrandr --output HDMI-1-0 --mode 1680x1050
	xrandr --output HDMI-1-0 --mode 1920x1080

	~/.fehbg
}
1 Like

After switching to nvidia rendering I lose hardware video decoding in qutebrowser (on chromium based browsers you can check chrome://gpu)

Just automated the unfreeze function:

#!/usr/bin/env bash

s=0

sudo journalctl -f | while read l
do
	echo "$l" | grep -Fq 'NVRM: kdispApplyWarForBug3385499_v03_00: timeout waiting for METHOD_EXEC to IDLE' && s=$(( s + 1 ))
	echo "$l" | grep -Fq 'NVRM: kdispApplyWarForBug3385499_v03_00: timeout waiting for channel state to UNCONNECTED' && s=$(( s + 1 ))

	echo "$s: $l"

	if [ 2 -eq "$s" ]
	then
		s=0
		if xrandr --listactivemonitors | grep -Fq HDMI-1-0
		then
			xrandr --output HDMI-1-0 --mode 1680x1050
			xrandr --output HDMI-1-0 --mode 1920x1080
			[ -x ~/.fehbg ] && ~/.fehbg
		fi
	fi
done
1 Like

As an update, 575.64.03 fixed problems with HDMI external monitor for me. No freezes or (visible) fps drops. kernel 6.15.7, Manjaro, x11, KDE.

Even hybernation works, sort of, from the 2nd try most of the time.
Suspend still doesn’t at all: the system returns to login screen.
Different problems, I know, here just for the context.

1 Like

are you using X11 or wayland ?

Debian13 / xfce / X11 / RTX 4060 / 580.76.05 / HDMI / integrated Radeon 680M / kernel 6.12.41

glxgears test passed in this conditions:

During installation reject xorg.conf step. Instead, once logged-in, call nvidia-xconfig --prime

This will generate PRIME version, that will set integrated driver to modesetting and give you instructions what to do next.

restart X / reboot, there will be only external monitor working.

Check out xrandr --listproviders - there will be two: “NVIDIA-0“ and “modesetting“.

Run xrandr --setprovideroutputsource modesetting NVIDIA-0 as tool recommended, then xrandr --auto and both monitors will work, and can be reconfigured via GUI or xrandr.

Offloading seems to work fine so far, no freezing, power usage ok, FPS seems good
 will keep an eye on it.

The only issue - if you disconnect external monitor, you lose login screen
 but that’s a different issue.

This doesn’t work for my laptop.

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:modesetting
Provider 1: id: 0x270 cap: 0x2, Sink Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-G0

and

$ xrandr --setprovideroutputsource modesetting NVIDIA-G0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  35 (RRSetProviderOutputSource)
  Value in failed request:  0x270
  Serial number of failed request:  16
  Current serial number in output stream:  17

I’m experiencing Alt + Tab freezes now, too, but mostly when I’m using a windowed mode in Wine, or virtual desktop emulation in Wine. Is this what you’re getting? These weren’t happening on the 550 driver, but now that they’ve bumped everyone on Ubuntu 24.04 onto the 580 drivers - it’s happening. (Also happens on the 570 driver).

Happy 2 year anniversary (as of a month ago) for everyone who’s still stuck with these stupid freezes!

2 Likes

ThinkPad P16 Gen 2 + NVIDIA RTX 4000 Ada, kernel 6.12.57

Installed 590.44.0 driver from nvidia debian repo on debian 13
one thing was missing:
grep glxserver_nvidia /var/log/Xorg.0.log.old
[ 5794.171] (II) Loading sub module “glxserver_nvidia”
[ 5794.171] (II) LoadModule: “glxserver_nvidia”
[ 5794.172] (WW) Warning, couldn’t open module glxserver_nvidia
[ 5794.172] (EE) NVIDIA: Failed to load module “glxserver_nvidia” (module does not exist, 0)

should be provided by:
dpkg -L xserver-xorg-video-nvidia|grep glxser
/usr/lib/xorg/modules/extensions/libglxserver_nvidia.so.590.44.01
/usr/lib/xorg/modules/extensions/libglxserver_nvidia.so

but:
ls -l /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so*
-rw-r–r-- 1 root root 5747760 Nov 21 15:01 /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so.590.44.01

fix:

sudo ln -s libglxserver_nvidia.so.590.44.01 /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so

also have a bit modified /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf in xorg.conf.d:

more /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
#This xorg.conf.d configuration snippet configures the X server to
#automatically load the nvidia X driver when it detects a device driven by the
#nvidia-drm.ko kernel module.  Please note that this only works on Linux kernels
#version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia-drm.ko
#kernel module is loaded before the X server is started.

Section “OutputClass”
dentifier     “nvidia”
MatchDriver    “nvidia-drm”
Driver         “nvidia”
Option “AllowEmptyInitialConfiguration”
ModulePath “/usr/lib/xorg/modules”
EndSection

will check if it is needed.
Edit: not needed

No xorg.conf.

Prime works, resizing glxgears creates a one second delay. Also closing app launched via prime (qt5 + opengl) created delay, other app, also qt5 + opengl closing a dialog created delay, closing the main window did not.
Had a single external display freeze similar to old symptom.
Edit 2: about 10% certainty to freeze the display instead of 100% with 550 and older. Moving a window can create one second delay as well.

installed packages:

dpkg -l | grep “ii .*nvid”
ii firmware-nvidia-graphics 20241210-1 all Binary firmware for Nvidia GPU chips
ii firmware-nvidia-gsp 590.44.01-1 amd64 NVIDIA GSP firmware
ii glx-alternative-nvidia 1.2.2 amd64 allows the selection of NVIDIA as GLX provider
ii libegl-nvidia0:amd64 590.44.01-1 amd64 NVIDIA binary EGL library
ii libgles-nvidia1:amd64 590.44.01-1 amd64 NVIDIA binary OpenGL|ES 1.x library
ii libgles-nvidia2:amd64 590.44.01-1 amd64 NVIDIA binary OpenGL|ES 2.x library
ii libglx-nvidia0:amd64 590.44.01-1 amd64 NVIDIA binary GLX library
ii libnvidia-allocator1:amd64 590.44.01-1 amd64 NVIDIA allocator runtime library
ii libnvidia-api1:amd64 590.44.01-1 amd64 NVAPI runtime library
ii libnvidia-cfg1:amd64 590.44.01-1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-egl-gbm1:amd64 1.1.2.1-1 amd64 GBM EGL external platform library for NVIDIA
ii libnvidia-egl-wayland1:amd64 1:1.1.20-1 amd64 Wayland EGL External Platform library – shared library
ii libnvidia-egl-xcb1:amd64 1:1.0.3-1 amd64 This is an EGL platform library for the NVIDIA driver to support
ii libnvidia-egl-xlib1:amd64 1:1.0.3-1 amd64 This is an EGL platform library for the NVIDIA driver to support
ii libnvidia-eglcore:amd64 590.44.01-1 amd64 NVIDIA binary EGL core libraries
ii libnvidia-encode1:amd64 590.44.01-1 amd64 NVENC Video Encoding runtime library
ii libnvidia-fbc1:amd64 590.44.01-1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-glcore:amd64 590.44.01-1 amd64 NVIDIA binary OpenGL/GLX core libraries
ii libnvidia-glvkspirv:amd64 590.44.01-1 amd64 NVIDIA binary Vulkan Spir-V compiler library
ii libnvidia-gpucomp:amd64 590.44.01-1 amd64 NVIDIA binary GPU compiler library
ii libnvidia-ml1:amd64 590.44.01-1 amd64 NVIDIA Management Library (NVML) runtime library
ii libnvidia-ngx1 590.44.01-1 amd64 NVIDIA NGX runtime library
ii libnvidia-nvvm4:amd64 590.44.01-1 amd64 NVIDIA NVVM Compiler library
ii libnvidia-nvvm704:amd64 590.44.01-1 amd64 NVIDIA NVVM Compiler library
ii libnvidia-opticalflow1:amd64 590.44.01-1 amd64 NVIDIA Optical Flow runtime library
ii libnvidia-pkcs11-openssl3:amd64 590.44.01-1 amd64 NVIDIA PKCS #11 Library (OpenSSL 3)
ii libnvidia-present:amd64 590.44.01-1 amd64 NVIDIA FGX and postprocessing library
ii libnvidia-ptxjitcompiler1:amd64 590.44.01-1 amd64 NVIDIA PTX JIT Compiler library
ii libnvidia-rtcore:amd64 590.44.01-1 amd64 NVIDIA binary Vulkan ray tracing (rtcore) library
ii libnvidia-sandboxutils:amd64 590.44.01-1 amd64 NVIDIA driver and GPU information for containers
ii libnvidia-tileiras:amd64 590.44.01-1 amd64 NVIDIA Tile IR Compiler library
ii libnvidia-vksc-core 590.44.01-1 amd64 NVIDIA binary Vulkan Safety Critical library
ii nvidia-driver 590.44.01-1 amd64 NVIDIA metapackage
ii nvidia-driver-cuda 590.44.01-1 amd64 NVIDIA driver CUDA integration components
ii nvidia-driver-libs:amd64 590.44.01-1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii nvidia-driver-pinning-590 590-5 all APT driver pinning file for driver branch 590
ii nvidia-egl-icd 590.44.01-1 amd64 NVIDIA EGL installable client driver (ICD)
ii nvidia-kernel-dkms 590.44.01-1 amd64 NVIDIA binary kernel module DKMS source
ii nvidia-kernel-support 590.44.01-1 amd64 NVIDIA binary kernel module support files
ii nvidia-modprobe 590.44.01-1 amd64 utility to load NVIDIA kernel modules and create device nodes
ii nvidia-opencl-icd:amd64 590.44.01-1 amd64 NVIDIA OpenCL installable client driver (ICD)
ii nvidia-persistenced 590.44.01-1 amd64 daemon to maintain persistent software state in the NVIDIA driver
ii nvidia-settings 590.44.01-1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-vdpau-driver:amd64 590.44.01-1 amd64 Video Decode and Presentation API for Unix - NVIDIA driver
ii nvidia-vulkan-icd:amd64 590.44.01-1 amd64 NVIDIA Vulkan installable client driver (ICD)
ii nvidia-xconfig 590.44.01-1 amd64 deprecated X configuration tool for non-free NVIDIA drivers
ii xserver-xorg-video-nvidia 590.44.01-1 amd64 NVIDIA binary Xorg driver

Modesetting is present:

sudo cat /sys/module/nvidia_drm/parameters/modeset
Y

set by:

> dpkg -S /etc/modprobe.d/nvidia-modeset.conf
nvidia-kernel-support: /etc/modprobe.d/nvidia-modeset.conf

> cat /etc/modprobe.d/nvidia-modeset.conf
#Nvidia modesetting support. Set to 0 or comment to disable kernel modesetting
#and framebuffer console support. This must be disabled in case of Mosaic or SLI.

options nvidia-drm modeset=1

Hi there, new to the conversation but I have a simialr problem on Windows x64. AMD iGPU and NVIDIA 5060 dedicated GPU. Whenever I plug in an external monitor it actually causes my laptop to bluescreen and ‘restart’ (try to restart, then crash) under VIDEO_FATAL_ERROR. There is defintiely somethink funky going on with the graphics drivers here too that I have been trying to solve for weeks. One interesting thing ive noticed by delving into the NVIDIA app is that when the monitor is plugged in, the only driver option is ‘optimus’ (iGPU?) which may be causing the issue
 Forcing graphics to run through the dedicated GPU via the NVIDIA control panel did not seem to make any difference 


Hi All,

I am following up on bug 4322356 which seems to be fixed except one second freeze which is happening while resizing application which recover itself.

Just wanted to check if anyone is experiencing complete external monitor freeze issue with latest r590 driver release.

1 Like

Please help to share feedback with latest r590 driver release as per my earlier comment.

Hi, has there been a new 590 release since??
I’m still blocked on 580.82.09 because the latest release at the time (580.126.18) didn’t include the patch that supposedly fixes this issue ( https://forums.developer.nvidia.com/t/no-hdmi-output-on-nobara-linux-42-from-lenovo-legion-7i-w-rtx-3080/347774/ )

Its not on Production/Stable branch, its on SLB and BETA branches. Check Nvidia driver website

? the latest beta driver is 590.44.01, I’ve already checked before posting

edit: I checked here for the reference, Unix Drivers | NVIDIA
which is the same version mentioned on Current graphics driver releases