Skip to content

[Bug] Suspend/resume: kwin_wayland permanently loses its output (black screen) — RTX 3070, nvidia-open 595.84 / 595.91.07, Wayland, intermittent #1378

Description

@lumanlight

NVIDIA Open GPU Kernel Modules Version

595.84 and 595.91.07 (Ubuntu package nvidia-driver-595-open, open kernel modules)

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

Ubuntu 24.04.5 LTS — KDE Plasma 5.27.11 (kwin_wayland, Wayland session), GDM3

Kernel Release

6.8.0-138-generic, 6.8.0-139-generic, 7.0.0-31-generic (all reproduce)

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

NVIDIA GeForce RTX 3070 (GA104), PCI ID 10de:2484 — single monitor 2560x1440 on HDMI-A-1

Describe the bug

Summary

After resuming from S3 (deep), the KDE Plasma Wayland session (kwin_wayland) permanently loses any working output: the compositor fails to set a mode, gives up, and the screen stays black. The session's processes stay alive — this is not a crash.

Switching the VT away and back (Ctrl+Alt+F4Ctrl+Alt+F1) brings up the GDM greeter (X11, renders fine), but logging in just switches back to the same broken Wayland session, so the screen goes black again. Only logging out / restarting the session or rebooting recovers it.

Suspected trigger: /usr/bin/nvidia-sleep.sh (shipped by nvidia-kernel-common-595) switches the VT to 63 before suspend and back after resume. On Wayland the compositor must give up DRM master on VT-leave and re-acquire it on VT-enter; here it never gets a usable output back.

KWin messages at resume

kwin_wayland_drm: Setting dpms mode failed!
kwin_wayland_drm: Setting changed mode failed!
kwin_wayland_drm: Failed to find a working setup for new outputs!
kwin_core: Applying KScreen config failed!
kded5: kscreen.kded: Failed to find a matching mode - this means that our config is corrupted or a different device with the same serial number has been connected (very unlikely). Falling back to preferred modes.

No NVRM / Xid message is logged at all in the failing boot.

It fails only when a Wayland session is active

Same boot, three suspends, same kernel and driver:

# suspend → resume session active at suspend result
1 12:38:22 → 12:39:32 only the GDM greeter (X11), no user session yet display OK
2 13:10:14 → 14:57:09 KDE Plasma Wayland output lost, black screen
3 18:01:31 → 19:57:24 KDE Plasma Wayland output lost, black screen

After suspends #2 and #3, GDM created a new greeter session (the resume left the machine at the greeter VT) while the user's compositor session was never rebuilt.

Failure mode differs between driver versions

Driver / kernel Messages Recoverable by VT switch?
595.84 + 6.8.0-138 kwin_wayland_drm: Atomic commit failed! Permission denied, Presentation failed! Permission denied, kernel [drm:nv_drm_atomic_commit] *ERROR* Flip event timeout on head 0, nvidia-modeset: WARNING: GPU:0: Unable to read EDID yes
595.91.07 + 7.0.0-31 Setting dpms mode failed! / Setting changed mode failed! / Failed to find a working setup for new outputs! — no atomic/permission error, no flip timeout, no EDID error no

Counter-evidence: NVreg_UseKernelSuspendNotifiers=1 made it worse here

With options nvidia NVreg_UseKernelSuspendNotifiers=1 plus the four nvidia-*-sleep units disabled:
2 suspend attempts → 1 hard hang (forced power-off). The journal of that boot ends at
PM: suspend entry (deep) / Filesystems sync: 0.006 seconds with no
ACPI: PM: Preparing to enter system sleep state S3 and no PM: suspend exit; journald reported
File /var/log/journal/…/system.journal corrupted or uncleanly shut down. No NVRM/Xid logged.

Baseline (distribution default /proc path + chvt): 16 of 16 suspends resumed — the display
was broken, but the machine always came back. So on this configuration the notifier path turns a
recoverable display bug into a hard hang.

Other attempts (for completeness)

A /usr/lib/systemd/system-sleep/ post hook placed after the distribution nvidia hook,
which forced an extra VT leave/enter (automating the manual Ctrl+Alt+F4F1), caused a complete
system freeze ~16 s after an otherwise successful resume
(unresponsive including VT switching,
forced power-off, again no NVRM/Xid/watchdog message). Removed.

Possibly related issues

#1291 (RTX 5090, GNOME Wayland, nvidia-sleep.sh deadlock, 595.84 open, UseKernelSuspendNotifiers=0),
#1371 (615.71.09 display deadlock on DPMS wake, KWin modeset, Flip event timeout),
#1289 (display freezes on blank, nvDIFRPrefetchSurfaces),
#1306 (GB206 display engine wedges on power transitions under Wayland).

Notes

  • Not tested with the proprietary driver package — the corresponding checkbox is therefore left unchecked.
  • Probably not the BAR1 / VA-space issue: this system also logs dmaAllocMapping_GM107 bursts
    independently, but none of the failing suspend boots contain them.

To Reproduce

  1. Boot into a KDE Plasma Wayland session (kwin_wayland) with nvidia-driver-595-open.
  2. Suspend in any way (systemctl suspend, or let the desktop idle-suspend).
  3. Wake the machine with the keyboard.

Result: the kernel resumes normally (PM: suspend exit, systemd-suspend.service finishes,
systemd-logind: Operation 'suspend' finished.) but KWin never presents another frame — the screen
stays black and the session has no output.

Note: with only the X11 GDM greeter active (no user session logged in yet), the same
suspend/resume works fine. Failures were only observed with a Wayland compositor session running.

Bug Incidence

Sometimes

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

Module options in use:

nvidia_drm modeset=1
nvidia_drm fbdev=1
NVreg_PreserveVideoMemoryAllocations=1
NVreg_TemporaryFilePath=/var
NVreg_UseKernelSuspendNotifiers=0   (default)
/sys/power/mem_sleep = s2idle [deep]

nvidia-suspend.service, nvidia-resume.service and nvidia-hibernate.service are enabled (distribution default).

Relevant part of /usr/bin/nvidia-sleep.sh (the VT switching that breaks the Wayland compositor):

suspend|hibernate)
    mkdir -p "${RUN_DIR}"
    fgconsole > "${XORG_VT_FILE}"
    chvt 63                        # <-- switch VT before suspend
    if [[ $? -ne 0 ]]; then exit $?; fi
    echo "$1" > /proc/driver/nvidia/suspend
    ...
resume)
    echo "$1" > /proc/driver/nvidia/suspend
    RestoreVT                      # <-- chvt back
    exit 0
Raw sanitized log evidence (click to expand)
=== NVIDIA suspend/resume failure — raw evidence (SANITIZED) ===
Sanitization: hostname -> <host>, username -> <user>, MAC -> <mac>.
Nothing else was modified; all timestamps and messages are verbatim.

=== NVIDIA suspend/resume failure — raw evidence ===
collected: 2026-09-19 20:06:59
boot: kernel 7.0.0-31-generic  driver 595.91.07

--- 1) suspend/resume timeline in the failed boot ---
2026-09-19T12:38:22+08:00 <host> kernel: PM: suspend entry (deep)
2026-09-19T12:39:32+08:00 <host> kernel: PM: suspend exit
2026-09-19T13:10:14+08:00 <host> kernel: PM: suspend entry (deep)
2026-09-19T14:57:09+08:00 <host> kernel: PM: suspend exit
2026-09-19T18:01:31+08:00 <host> kernel: PM: suspend entry (deep)
2026-09-19T19:57:24+08:00 <host> kernel: PM: suspend exit

--- 2) logind session lifecycle (greeter vs user session) ---
2026-09-19T12:37:56+08:00 <host> systemd-logind[1477]: New session c1 of user gdm.
2026-09-19T12:39:51+08:00 <host> systemd-logind[1477]: New session 2 of user <user>.
2026-09-19T12:40:02+08:00 <host> systemd-logind[1477]: Removed session c1.
2026-09-19T14:57:36+08:00 <host> systemd-logind[1477]: New session c2 of user gdm.
2026-09-19T14:57:56+08:00 <host> systemd-logind[1477]: Removed session c2.
2026-09-19T19:59:14+08:00 <host> systemd-logind[1477]: New session c3 of user gdm.
2026-09-19T19:59:31+08:00 <host> systemd-logind[1477]: Removed session c3.

--- 3) KWin errors after each resume  <-- THE KEY EVIDENCE ---
2026-09-19T12:39:59+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Cannot grant a token to KWaylandServer::ClientConnection(0x58f97a2bbee0)
2026-09-19T12:39:59+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Cannot grant a token to KWaylandServer::ClientConnection(0x58f97a2bbee0)
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting changed mode failed!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Failed to find a working setup for new outputs!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Applying KScreen config failed!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting dpms mode failed!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting dpms mode failed!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting changed mode failed!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Failed to find a working setup for new outputs!
2026-09-19T19:57:26+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Applying KScreen config failed!
2026-09-19T19:57:27+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting changed mode failed!
2026-09-19T19:57:27+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Failed to find a working setup for new outputs!
2026-09-19T19:57:27+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Applying KScreen config failed!
2026-09-19T19:59:21+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Setting changed mode failed!
2026-09-19T19:59:21+08:00 <host> kwin_wayland_wrapper[3639]: kwin_wayland_drm: Failed to find a working setup for new outputs!
2026-09-19T19:59:21+08:00 <host> kwin_wayland_wrapper[3639]: kwin_core: Applying KScreen config failed!

--- 4) kscreen ---
2026-09-19T14:57:12+08:00 <host> kded5[3802]: kscreen.kded:         Failed to find a matching mode - this means that our config is corrupted or a different device with the same serial number has been connected (very unlikely). Falling back to preferred modes.
2026-09-19T19:57:26+08:00 <host> kded5[3802]: kscreen.kded:         Failed to find a matching mode - this means that our config is corrupted or a different device with the same serial number has been connected (very unlikely). Falling back to preferred modes.

--- 5) kernel nvidia/drm messages ---
2026-09-19T12:37:53+08:00 <host> kernel: ACPI: bus type drm_connector registered
2026-09-19T12:37:53+08:00 <host> kernel: simple-framebuffer simple-framebuffer.0: [drm] Registered 1 planes with drm panic
2026-09-19T12:37:53+08:00 <host> kernel: [drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0
2026-09-19T12:37:53+08:00 <host> kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
2026-09-19T12:37:53+08:00 <host> kernel: r8169 0000:04:00.0 eth0: RTL8125B, <mac>, XID 641, IRQ 134
2026-09-19T12:37:53+08:00 <host> systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm...
2026-09-19T12:37:53+08:00 <host> systemd[1]: modprobe@drm.service: Deactivated successfully.
2026-09-19T12:37:53+08:00 <host> systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm.
2026-09-19T12:37:53+08:00 <host> kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 511
2026-09-19T12:37:53+08:00 <host> kernel: nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
2026-09-19T12:37:53+08:00 <host> kernel: input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input10
2026-09-19T12:37:53+08:00 <host> kernel: NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64  595.91.07  Release Build  (dvs-builder@U22-I3-B08-02-2)  Wed Jul 29 03:01:16 UTC 2026
2026-09-19T12:37:53+08:00 <host> kernel: nvidia-modeset: Loading NVIDIA UNIX Open Kernel Mode Setting Driver for x86_64  595.91.07  Release Build  (dvs-builder@U22-I3-B08-02-2)  Wed Jul 29 02:47:37 UTC 2026
2026-09-19T12:37:53+08:00 <host> kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
2026-09-19T12:37:53+08:00 <host> kernel: input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input11
2026-09-19T12:37:53+08:00 <host> kernel: input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input12
2026-09-19T12:37:53+08:00 <host> kernel: input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input13
2026-09-19T12:37:55+08:00 <host> kernel: [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1
2026-09-19T12:37:55+08:00 <host> kernel: nvidia 0000:01:00.0: vgaarb: deactivate vga console
2026-09-19T12:37:55+08:00 <host> kernel: fbcon: nvidia-drmdrmfb (fb0) is primary device
2026-09-19T12:37:55+08:00 <host> kernel: nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device

--- 6) absent signatures (old failure mode is GONE) ---
Flip event timeout       = 0
Atomic commit failed     = 0
Presentation failed      = 0
Unable to read EDID      = 0

--- 7) /usr/bin/nvidia-sleep.sh VT switching (unchanged mechanism) ---
12:RestoreVT() {
21:        chvt "${XORG_PID}"
40:        fgconsole > "${XORG_VT_FILE}"
41:        chvt 63
51:            RestoreVT
57:        RestoreVT

--- 8) CONTROL DATA: a DIFFERENT boot, same kernel+driver, where every suspend SUCCEEDED ---
2026-09-19T21:10:48+08:00 <host> kernel: PM: suspend entry (deep)
2026-09-19T21:34:03+08:00 <host> kernel: PM: suspend exit
2026-09-19T23:38:56+08:00 <host> kernel: PM: suspend entry (deep)
2026-09-20T09:57:06+08:00 <host> kernel: PM: suspend exit

failure signatures in that (successful) boot:
  Failed to find a working setup   = 0
  Setting changed mode failed      = 0
  Setting dpms mode failed         = 0
  Atomic commit failed             = 0
  Presentation failed              = 0
  Unable to read EDID              = 0
  Flip event timeout               = 0
  Applying KScreen config failed   = 0

Note: the failing boot (-1) had the same kernel (7.0.0-31-generic) and driver (595.91.07)
      and the same Wayland session type. The failure is intermittent.

(nvidia-bug-report.log.gz is not attached yet — it has to be captured while the failure is live,
i.e. after a failed resume and before rebooting.)


Note on the attachment: the nvidia-bug-report.log.gz above was captured while the system was in a healthy state — the failure is intermittent and did not reproduce at capture time. A log captured in the failing state will be attached as a comment as soon as it reproduces. The failure evidence itself is in the Describe the bug section.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions