Skip to content

Wayland: kwin_wayland 6.7 hangs (hung task / deadlock) after waking monitors from power-saving mode with hybrid AMD/NVIDIA (nvidia open driver) #1231

Open

Description

@tm4ig

NVIDIA Open GPU Kernel Modules Version

610.43.02

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.

Operating System and Version

Arch Linux

Kernel Release

7.0.12-arch1-1 - 7.1.2-arch3-1 (64-bit)

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

  • I am running on a stable kernel release.

Hardware: GPU

AMD Radeon 780M Graphics [Integrated] / NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discrete]

Describe the bug

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.7.1 - 6.7.2
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-arch1-1 - 7.1.2-arch3-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Memory: 32 ГиБ of RAM (30.6 GiB usable)
Graphics Processor 1: AMD Radeon 780M Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4060 Laptop GPU
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop M6500XV_M6500XV
System Version: 1.0
NVIDIA Open Driver: 610.43.02

DESCRIPTION
The issue appears to be a kernel deadlock inside the NVIDIA driver, where nvidia-modeset holds a semaphore indefinitely while looping in kernel space, causing kwin_wayland to hang in state:D.

After updating KDE Plasma to versions 6.7.1 and 6.7.2, a severe issue occurs in the Wayland session when monitors wake up from power-saving (DPMS) mode.

In this hybrid GPU setup, if the screens go into power-saving mode and I then wake them up, there is a very high probability that the graphical system will freeze within a few seconds, followed by a hung task / deadlock. The entire system becomes completely unresponsive, forcing a hard reset using the power button.

Additionally, I noticed that starting with KDE Plasma 6.7, the monitors take noticeably longer to wake up from power-saving mode and the process feels much less responsive than before.

OBSERVED RESULT
The graphical session freezes, followed shortly by a hung task / deadlock, requiring a hard reboot.

EXPECTED RESULT
The monitors should wake up quickly and responsively without causing any system instability, freezes, or hung task / deadlock.

hangs.log

To Reproduce

STEPS TO REPRODUCE

  1. Connect an external monitor via HDMI (driven by the NVIDIA dGPU) while the laptop screen runs on the AMD iGPU.
  2. Log into a KDE Plasma Wayland session.
  3. Let the system put the monitors into power-saving mode (or trigger screen sleep automatically via energy saving settings).
  4. Wake the monitors up by moving the mouse or pressing a key.
  5. Wait a few seconds.

Bug Incidence

Sometimes

nvidia-bug-report.log.gz

ADDITIONAL INFO:
Downgrading to Plasma 6.6 resolves the issue completely,

Note: The nvidia-bug-report.log.gz was collected after the crash, right after rebooting the system.

nvidia-bug-report.log.gz

Related upstream issue: I have also opened a bug report on the KDE tracker to keep both development teams informed: https://bugs.kde.org/show_bug.cgi?id=522646

More Info

No response

Activity

  1. added
    bug
    on Jul 5, 2026
  2. tm4ig commented on Jul 5, 2026

    @tm4ig
    Author

    Perhaps the same issue as in #1167

  3. Wood578Guy commented on Jul 17, 2026

    @Wood578Guy

    Seeing what looks like the same underlying issue, but on different hardware.

    System:

    • GPU: RTX 5070 — desktop, single-GPU
    • Driver: 610.43.03, open kernel module
    • Kernel: 7.1.3-201.fc44.x86_64 (Fedora 44)
    • KWin 6.7.2 / plasma-workspace 6.7.2, Wayland session
    • Dual monitor over DisplayPort

    Same trigger — resume from suspend (S3) — but for me it's transient rather than a full deadlock: the session recovers on its own after ~30 seconds rather than requiring a reboot.

    Matching log line, same semaphore-surface path as the one described here:
    [drm:__nv_drm_semsurf_wait_fence_work_cb [nvidia_drm]] ERROR [GPU ID 0x00000500]
    Failed to register auto-value-update on pre-wait value for sync FD semaphore surface

    Downstream effect on KWin's side: this cascades into the lock screen's Qt/EGL context — kscreenlocker_greet logs QRhiGles2: Context is lost followed by repeated eglError: 0x3006 (EGL_BAD_CONTEXT) / "Failed to make context current" — 45 retries at ~0.5s intervals in one capture before it recovers.

    While this is happening, only one of my two monitors accepts input/renders correctly — the other stays unresponsive until the retry loop resolves. Might help narrow down which part of the resume path is racing (per-output sync surface vs. a single shared one).

    The nvidia-bug-report.log.gz was collected after the system recovered and I logged in:
    nvidia-bug-report.log.gz

  4. Awin-G commented on Aug 11, 2026

    @Awin-G

    Hi — this is the same bug family as #1289, and your hardware/scenario match it nearly exactly (AMD iGPU + RTX 4060 Laptop + external monitor on the NVIDIA dGPU, hybrid, triggered by wake/DPMS display activity).

    #1289 has:

    • the confirmed hung-task stack (nvidia-modeset spinning in nvWriteGpEntry inside the DIFR prefetch path, holding the nvkms pmlock → compositor hangs in state D),
    • the code root cause (unbounded while (nextGpPut == ReadGpGetOffset(...)) in nvWriteGpEntry),
    • a locally-verified mitigation patch (bounds the wait to 1s only on the DIFR prefetch channel; caught 4/4 stalls, 0 freezes),
    • a workaround (disable display auto-blank).

    May be useful for you. (Reporter note: analysis + patch produced by an AI agent on the reporter's machine; manual steps by the reporter.)

  5. ClGratton commented on Aug 30, 2026

    @ClGratton

    Additional matching evidence from a single-GPU desktop, widening this beyond the hybrid/DPMS-only case:

    • GPU: RTX 3080 Ti, dual DisplayPort outputs
    • Driver: nvidia-open-dkms 610.57.04
    • Kernel: 7.1.9-arch1-2
    • Hyprland 0.56.2, Qt 6.11.2, Quickshell 0.3.1
    • Trigger: S3 (deep) suspend/resume

    At resume the kernel logged the same semaphore-surface failure:

    Aug 30 21:03:29 kernel: [drm:__nv_drm_semsurf_wait_fence_work_cb [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00002900] Failed to register auto-value-update on pre-wait value for sync FD semaphore surface
    

    The Qt lock/shell process then lost its graphics device and never recovered its OpenGL context:

    Aug 30 21:03:42 quickshell: QRhiGles2: Context is lost.
    Aug 30 21:03:42 quickshell: Graphics device lost, cleaning up scenegraph and releasing RHIs
    Aug 30 21:03:42 quickshell: QWaylandGLContext::makeCurrent: eglError: 0x3006
    Aug 30 21:03:42 quickshell: QRhiGles2: Failed to make context current. Expect bad things to happen.
    Aug 30 21:03:42 quickshell: Failed to start frame
    

    Those EGL_BAD_CONTEXT / frame failures then repeated indefinitely. The visible symptom was a frozen lock/bar frame with the clock stuck at the old time, while the actual system/RTC/NTP time was correct. Importantly, the lock process was still receiving keyboard input and PAM authenticated successfully, so this was render-context loss rather than a stopped session or wrong clock. Restarting Quickshell after unlock restored rendering immediately.

    As a diagnostic workaround, the same shell now launches successfully with QSG_RHI_BACKEND=vulkan and renders both outputs normally, avoiding QWaylandGLContext. A real suspend/resume validation of that workaround is still pending, so this is evidence rather than a claimed fix.

    I have not compared the proprietary kernel module yet, so this does not establish that the bug is open-module-only.

  6. ClGratton commented on Aug 30, 2026

    @ClGratton

    Follow-up after the first real S3 cycle with the shell-only Vulkan diagnostic workaround:

    • suspend entry: 21:24:51
    • resume: 21:25:29–21:25:31
    • the same long-lived Quickshell process remained alive with QSG_RHI_BACKEND=vulkan
    • both DisplayPort outputs reported enabled at the 0, 2, 8, and 20 second resume snapshots
    • the session lock was secure and its password field reported active focus from the first snapshot
    • no __nv_drm_semsurf_wait_fence_work_cb error occurred in this cycle
    • no QWaylandGLContext, EGL_BAD_CONTEXT, QRhi device-loss, or failed-frame messages occurred
    • the shell clock continued updating normally

    This is only 1/1 successful Vulkan cycle so far, not enough to claim a general fix, but it strengthens the indication that the failure is specific to the resumed OpenGL/sync-surface path rather than system time or lock input handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions