Bug 219422 - Hard crash when USB4 cable is disconnected during sleep
Summary: Hard crash when USB4 cable is disconnected during sleep
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL: https://gitlab.freedesktop.org/drm/am...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-23 20:45 UTC by Kishor Prins
Modified: 2024-12-16 21:45 UTC (History)
3 users (show)

See Also:
Kernel Version: 6.12.*, 6.11.2, 6.13 rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Error after USB4 cable is disconnected and (1.07 MB, image/jpeg)
2024-10-23 20:45 UTC, Kishor Prins
Details

Description Kishor Prins 2024-10-23 20:45:01 UTC
Created attachment 307062 [details]
Error after USB4 cable is disconnected and

Hi, my current setup is a Lenovo Legion Go with a USB4 based external GPU (Onex GPU with a 7600M XT). I am running these tests on EndeavorOS with 6.12 rc4 kernel and stock 6.11.2-arch kernel.

My device crashes and hard locks when the USB4 cable is disconnected or when the device is not inaccessible upon a sleep and wake cycle.

I have been able to reliably crash system with this external GPU with the following steps:

1. Connect my eGPU dock
2. Wait a few seconds
3. Put the device to sleep
4. Wait for the device to sleep
5. Disconnect the USB4 cable
6. Wake the device up and the system will hard lock

I attached a photo of the logs. The error message is: 'Unable to change power state from Dcold to DO, device inaccessible' and this occurs for all PCI devices on the USB4 dock. 

The above also occurs intermittently even when I have the cable attached.


To isolate if it was my device or the USB4 eGPU enclosure, I have also tried a Thunderbolt 3 laptop dock and that works reliably. I am able to disconnect the TB3 device during sleep and my system successfully recovers.
Comment 1 Kishor Prins 2024-11-04 22:30:26 UTC
I also tested the above steps on a HP Zbook Firefly 14 with Thunderbolt. The system proceeds to hard crash with same hard lock and messages.

This bug may be related to: https://bugzilla.kernel.org/show_bug.cgi?id=216728
Comment 2 Kishor Prins 2024-12-16 21:45:28 UTC
I did a quick test with the latest 6.13 rc3 kernel and I am seeing the exact same crash. The kernel does not how to handle abrupt USB4/TB4 cable disconnects.

Note You need to log in before you can comment on or make changes to this bug.