Corroborating report — RTX 5070, 615.71.09 open, kernel 7.0.0-42/-43,
GNOME Wayland: 6 deadlocks across three configurations — including with
session freezing re-enabled (config C), and with the kernel suspend
notifiers disabled.
I've been fighting what is almost certainly this same deadlock on
different hardware, and can add two datapoints that extend the config
testing in comments #2/#3: the deadlock reproduces with
SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=true (config C), and also with
NVreg_UseKernelSuspendNotifiers=0 (RM suspend/resume driven entirely
through /proc/driver/nvidia/suspend by nvidia-suspend.service / nvidia-
resume.service).
Environment: RTX 5070 (GB205), Arrow Lake-S desktop (ASUS ROG MAXIMUS
Z890 HERO, Core Ultra 7 265K), Ubuntu 26.04.1, GNOME Wayland, S3 (deep).
NVIDIA 615.71.09 open module (Ubuntu precompiled). Kernels:
7.0.0-42-generic for the first two occurrences, 7.0.0-43-generic after.
The shipped nvidia-suspend-nofreeze.conf drop-in was active for all
occurrences except the last.
Occurrence log (all user-initiated wakes; all required SysRq+B; none
self-resolved):
# Date Config Phase systemd-sleep blocked at
1 Nov 6 shipped defaults (notifiers=1, preserve AUTO→on, nofreeze)
resume nv_pm_notifier → nvidia_resume → rm_power_management
2 Nov 7 same resume same
3 Nov 8 same, kernel -43 resume same
4 Nov 8–9 same resume same
5 Nov 11 notifiers=0, preserve AUTO→off, nofreeze resume
pm_restore_console → vt_move_to_console → console_lock
6 Nov 11 notifiers=0, preserve=1, services enabled, FREEZE=true entry
(S3 never reached) pm_restore_console → console_lock
In every occurrence the other side of the cycle is the kworker from this
report's steps 1–4:
codeblock
Workqueue: events fbcon_register_existing_fbs
rwsem_down_read_slowpath+0x261/0x5a0
down_read+0x48/0xd0
nvkms_ioctl_from_kapi+0xdc/0xf0 [nvidia_modeset]
GetDynamicDisplayInfo+0x9c/0x1a0 [nvidia_modeset]
... nv_drm_connector_detect / fbcon_init / do_fbcon_takeover
fbcon_register_existing_fbs
while it holds console_lock — systemd-sleep, setfont, console_callback, and
several tty openers (anacron/motd-news/fwupd-refresh/sysstat units spawned at
resume) all queue behind it. Because systemd-sleep never finishes, the resume
hooks never run, so the network never returns — SSH is dead during the wedge,
which makes it look like a full hang from the outside.
Datapoint 1 — config C does not prevent it. In occurrence #6 the freeze
was verifiably active (60 s "Failed to freeze unit 'user.slice'"
timeout, then suspend proceeded — matching your 5/6-cycles observation;
sessions froze and thawed correctly on the follow-up clean cycle) and
the deadlock still formed — at suspend entry, before S3. That entry also
had a 15 min 19 s silent stall between "PM: suspend entry (deep)" and
"Freezing user space processes"; most of our entries show 2–3.5 min
stalls, this one was 15 min — so the pre-freeze stall doesn't look
bounded either.
Datapoint 2 — the rwsem appears to be left held by the suspend-side
path, with no visible writer. In #6 there is no D-state writer in either
hung-task report or the SysRq-T show-state dump, yet the kworker blocked
on a read of a lock that nothing had touched for 16 minutes: the FBSR
save (nvidia-suspend.service writing /proc/driver/nvidia/suspend,
completed successfully in ~700 ms) finished at 17:53:59, and the
takeover kworker (workqueue dump: fbcon_register_existing_fbs in-flight
216s) blocked from 18:10:19. This matches the "nvidia_modeset PM lock
permanently held after S3" signature of open-gpu-kernel-modules #1281. A
clean counter-example supports the "left held" reading: on a cycle where
the lock was free, the same takeover kworker ran the same path and
completed instantly, nvidia-resume.service ran the FBSR restore
successfully, and resume was fully clean.
Corroborating the preserve=0 direction: with notifiers=0 (which resolves
PreserveVideoMemoryAllocations AUTO to off), we got deadlock-free
resumes (2/2) but lost VRAM every time — 5× then 12× Xid 13 at the
resume instant, gnome-shell channel faults, "Flip event timeout on head
0", and on the second occurrence Xid 31 + Xid 154 ("GPU recovery action
→ OS Reboot"). So the deadlock-free setting breaks the desktop
differently — consistent with config B, approached from the other side.
Across the sweep above (notifiers on/off × freeze on/off — every
combination wedges), the constant is the nvidia-modeset rwsem state
around the FBSR save/restore window plus the deferred fbcon takeover,
which suggests this can't be fixed from configuration. Same family as
open-gpu-kernel-modules #1291 and LP #2171636 (the /proc-services path
wedging against the console/fbcon path) and #1281 (lock left held).
Has this reached NVIDIA? The 620.70.06 branch landed Nov 4 — if anyone
can test whether it changes this behavior, that would be a decisive
datapoint (RTX 5070 here; I can't easily test 620 on this machine yet).
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166914
Title:
[regression 7.0.0-30 -> 7.0.0-31] Suspend deadlocks in
pm_restore_console: fbcon takeover holds console_lock while blocked on
nvidia-modeset rwsem
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2166914/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs