Same deadlock here, and I found a workaround that nobody has mentioned
yet.

Setup: RTX 5090 (GB202), Core Ultra 9 285K, Gigabyte Z890, Ubuntu 26.04,
kernel 7.0.0-38, nvidia-driver-595-open 595.99.02, GNOME 50.1 Wayland, S3 
(deep).

Root cause: with "quiet splash" fbcon defers its console takeover at boot
("fbcon: Deferring console take-over"). The deferred takeover then fires at
resume, so fbcon_register_existing_fbs grabs console_lock and blocks in
nvidia_modeset, while systemd-sleep waits on console_lock in pm_restore_console.

Evidence from my logs: in all 9 failed resumes, "fbcon: Taking over console"
appears at the exact moment of wake-up and "Finished systemd-suspend.service"
never appears. The only successful resume had the takeover happen before 
suspend.

Workaround: add fbcon=nodefer to GRUB_CMDLINE_LINUX_DEFAULT, then update-grub.
Quick test without rebooting: switch to a text VT and back (Ctrl+Alt+F3, then
Ctrl+Alt+F2) before suspending. This triggers the takeover in advance.

Note: Ctrl+Alt+F3 does nothing on the black screen after a failed resume,
because console_lock is held. Wait over 2 minutes before resetting to get
the hung-task traces.

Also active on my system (may or may not matter):
NVreg_UseKernelSuspendNotifiers=1, user session freezing re-enabled
(override of nvidia-suspend-nofreeze.conf), iGPU disabled in BIOS.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158993

Title:
  System hard-freezes after failed suspend (Xwayland freeze timeout)
  with nvidia-driver-595-open — deadlock in nvidia_modeset/console

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2158993/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to