Root cause found (pstore + sysrq-w traces, attached):

After S3/s2idle resume, pciehp on the dGPU root port 0000:00:01.0
(soldered RTX 3060, but the port advertises HotPlug+ Surprise+)
reports a spurious "Slot(1): Card not present" and tries to remove
the GPU functions while dpm_resume() is still running and user space
is frozen. This deadlocks with async resume of the same device:

- nvidia loaded: pciehp -> nv_pci_remove -> nvkms down_read (blocked)
- nvidia blacklisted: pciehp -> azx_remove [snd_hda_intel 01:00.1]
  -> snd_card_free -> wait_for_completion (blocked)
- in both cases: async_resume -> device_resume -> mutex_lock (blocked)
  and systemd-sleep in dpm_resume -> async_synchronize_full

The GPU is actually present and works after resume when PCIe hotplug
is disabled.

Working workaround (both s2idle and deep S3 work, nvidia-smi OK):
  pcie_ports=compat acpiphp.disable=1
Not sufficient: pcie_ports=compat alone (acpiphp then removes the
device -> same deadlock).

Earlier note about D3hot vs D3cold was wrong: d3cold_allowed on ports
has no effect on the ports' own D3 state.

** Attachment added: "pstore log (sysrq-w), nvidia loaded: pciehp -> 
nv_pci_remove deadlock"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2174812/+attachment/6019427/+files/pstore-nvidia-loaded.txt

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

Title:
  Lenovo Legion 5 15IAH7 (82RB): suspend hangs at pm_test=platform,
  fixed by pcie_port_pm=off

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


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

Reply via email to