open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

615.78.08: semsurf fence error on resume from S3, then eglMakeCurrent spins forever in the Wayland client (RTX 5090)

Open robouk opened this issue 1 week ago • 0 comments

NVIDIA Open GPU Kernel Modules Version

615.78.08 (Arch nvidia-open-dkms 615.78.08-4, nvidia-utils 615.78.08-3)

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.

  • [ ] I confirm that this does not happen with the proprietary driver package.

Can't test. RTX 5090 is Blackwell, which is only supported by the open kernel modules.

Operating System and Version

615.78.08 (Arch nvidia-open-dkms 615.78.08-4, nvidia-utils 615.78.08-3)

Kernel Release

7.2.15-4-omarchy (stable 7.2.15 with distro patches, not self-built)

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • [x] I am running on a stable kernel release.

Hardware: GPU

NVIDIA GeForce RTX 5090 (VBIOS 98.02.2E.00.C9). AMD Ryzen 9 9950X3D, no iGPU in use. One 3840x2160@240 display on DP.

Describe the bug

After resume from deep suspend, nvidia-drm often logs:

[drm:__nv_drm_semsurf_wait_fence_work_cb [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to register auto-value-update on pre-wait value for sync FD semaphore surface

When that happens, a Wayland EGL client that rendered before suspend can hang permanently the next time it makes its context current. In my case the client is a Qt Quick shell (Quickshell). On unlock it destroys its lock screen window, and Qt's render thread calls eglMakeCurrent with no surface to free GL resources. That call never returns. The thread is in state R with wchan 0, so it's spinning in userspace, not waiting in the kernel.

Render thread, symbolized except for the NVIDIA frames:

#0-7  libnvidia-eglcore.so.615.78.08
#8-15 libEGL_nvidia.so.0
#16 InternalMakeCurrentVendor (dpy=..., draw=0x0, read=0x0, context=...)  libglvnd libegl.c:587
#17 QEGLPlatformContext::makeCurrent                                       qeglplatformcontext.cpp:508
#18 QOpenGLContext::makeCurrent
#19 QRhiGles2::ensureContext                                               qrhigles2.cpp:731
#20 QSGRenderThread::invalidateGraphics (inDestructor=true)                qsgthreadedrenderloop.cpp:478

The app's main thread waits on that render thread, so the whole client is dead until it's killed. Compositor and other clients keep working.

I'd expect two things. First, the semaphore surface wait should survive resume. Second, if it doesn't, eglMakeCurrent should fail (EGL_CONTEXT_LOST or similar) rather than spin forever.

To Reproduce

  • NVIDIA GPU on 615.78.08 open modules, NVreg_UseKernelSuspendNotifiers=1 (default), nvidia_drm.modeset=1, mem_sleep deep.
  • Hyprland session with a Qt 6.12 Quick client using the threaded render loop and EGL (Quickshell; Omarchy's shell does this out of the box).
  • Lock the session (ext-session-lock surface rendered by that client), suspend to S3, resume.
  • Check journalctl -k for the semsurf error above.
  • Unlock. If the error was logged, the client often hangs at this point with one render thread at 100% CPU in libnvidia-eglcore.

Bug Incidence

Sometimes

nvidia-bug-report.log.gz

Over my last 4 boots: 11 resumes, semsurf error on 6, client hung on 3 of those 6. It has never hung on a resume without the error. Other people see the same on RTX 3060 and RTX 3080 Ti with 615.78.08: https://github.com/omacom/omarchy/issues/19125

nvidia-bug-report.clean.log.gz

More Info

It looks specific to the explicit sync path. Another user found that with __NV_DISABLE_EXPLICIT_SYNC=1 on the client, neither the semsurf error nor the hang happened in 12 rtcwake cycles, while roughly half hung without it: https://github.com/NVIDIA/egl-wayland2/issues/59. That issue was closed as not an egl-wayland2 bug, which is why I'm filing against nvidia-drm here.

Possibly related: #1331 (semaphore surface waiters never freed under explicit sync), #1580 (semsurf errors followed by a compositor hang, different trigger).

I have full cores of the hung client and can run with extra debug options or test patches.

robouk avatar Nov 23 '26 15:11 robouk