From the mst-crash-dmesg.log,
660.391s - Second Type-C monitor plugged in → long HPD fires on DDI C (TC)/PHY 
TC1
660.515s - Short HPD starts — MST hub begins asserting ESI interrupts
660.515s → ~669s - 100+ hotplug events over ~9 seconds, system saturating <-- 
issue
664.790s - WARN_ON fires: typec_altmode_update_active hits null driver race <-- 
another issue
664.790s - System is already spending all CPU in the hotplug loop at this point

We have no clear clues why there are so many hotplug events(maybe some loop in 
the hotplug detection)
The pattern of DPRX ESI 41 10 00 06 → 41 00 00 06 on each HPD is: first read 
has DOWN_REP_MSG_RDY set (hub has a reply), second read it's cleared (replied, 
but still STREAM_STATUS_CHANGED). The loop never terminates because ack is 
never all-zeros.
|      Byte     |                        Value                           | 
Meaning
|---------------|--------------------------------------------------------|--------------
| ESI[0] = 0x41 | bit 0=1: SINK_COUNT_CHANGED; bit 6=1: ESI0 irq pending | MST 
hub says: "my sink count changed, and there are more IRQs pending"
| ESI[1] = 0x10 | DOWN_REP_MSG_RDY                                       | Hub 
has a downstream reply message ready
| ESI[2] = 0x00 | —                                                      | 
Nothing
| ESI[3] = 0x06 | bit 1=LINK_STATUS_CHANGED; bit 2=STREAM_STATUS_CHANGED | Hub 
says link/stream topology changed

The WANR_ON we see at 664.790s may result from CPU are busy handling the 
hotplug events, and lead to the race. This commit may fix this issue
   128bb7fab3425 ("usb: typec: altmodes/displayport: Drop the device reference 
in dp_altmode_probe()")

The daisy chain issue may come from this commit 364618c89d4c5 ("usb:
typec: ucsi: displayport: Fix deadlock") which is included in
6.8.0-91.92

To make the assumption clearer, here is a test kernel which prevent the
hotplug storm and also show more debugging messages. I've also uploaded
the patches, you can check and see if those messages appear or not.

https://people.canonical.com/~acelan/bugs/lp2141225/

I guess this kernel won't lead to the system hang, but if no luck, please try 
capture the log from another remote machine.
   echo 0x4 | sudo tee /sys/module/drm/parameters/debug
   echo 'file drivers/usb/typec/class.c +pt' | sudo tee 
/sys/kernel/debug/dynamic_debug/control
   echo 'file drivers/usb/typec/ucsi/ucsi.c +pt' | sudo tee 
/sys/kernel/debug/dynamic_debug/control
   echo 'file drivers/usb/typec/ucsi/displayport.c +pt' | sudo tee 
/sys/kernel/debug/dynamic_debug/control

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

Title:
  Kernel panic when connecting USB-C Dell monitors on Ubuntu kernel
  6.17.0-14-generic

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


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

Reply via email to