Thunderbolt devices on dock not recognized after resuming from suspend

I’ve been fiddling with the Anker 777 Thunderbolt Docking Station and I’m having a few issues with suspend. When using default suspend-to-idle (s2idle) the dock will cause the system to instantly resume. This isn’t too big an issue since I’d rather set mem_sleep set to deep for suspend-to-RAM anyhow. Unfortunately when using suspend-to-RAM the dock appears to be disconnected. It’ll still provide power but the devices no longer enumerate. There’s a partial workaround: powering the dock off and back on again then running rmmod thunderbolt followed by modprobe thunderbolt to unload and load the kernel module the dock reconnects and everything is working normally.

Unfortunately, this workaround still requires physical access. I’d love to find a way to cause the dock to reset so that I can just script the module to be reloaded after waking but ideally I’d like to find a way to have the dock come back up after deep suspend.

The dock seems to use a JHL8440 controller so this might affect other Thunderbolt 4 docks, too but I’ve only tested this one.

From lspci -nn -k:

00:00.0 Host bridge [0600]: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers [8086:9a14] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel modules: igen6_edac
00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: i915
        Kernel modules: i915
00:04.0 Signal processing controller [1180]: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant [8086:9a03] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: proc_thermal
        Kernel modules: processor_thermal_device_pci_legacy
00:06.0 PCI bridge [0604]: Intel Corporation 11th Gen Core Processor PCIe Controller [8086:9a09] (rev 01)
        Kernel driver in use: pcieport
00:07.0 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #0 [8086:9a23] (rev 01)
        Kernel driver in use: pcieport
00:07.1 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 [8086:9a25] (rev 01)
        Kernel driver in use: pcieport
00:07.2 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #2 [8086:9a27] (rev 01)
        Kernel driver in use: pcieport
00:07.3 PCI bridge [0604]: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #3 [8086:9a29] (rev 01)
        Kernel driver in use: pcieport
00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:9a11] (rev 01)
        Subsystem: Device [f111:0001]
00:0a.0 Signal processing controller [1180]: Intel Corporation Tigerlake Telemetry Aggregator Driver [8086:9a0d] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel-pmt
        Kernel modules: intel_pmt
00:0d.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller [8086:9a13] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:0d.2 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 [8086:9a1b] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: thunderbolt
        Kernel modules: thunderbolt
00:0d.3 USB controller [0c03]: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #1 [8086:9a1d] (rev 01)
        Subsystem: Device [f111:0001]
        Kernel driver in use: thunderbolt
        Kernel modules: thunderbolt
00:12.0 Serial controller [0700]: Intel Corporation Tiger Lake-LP Integrated Sensor Hub [8086:a0fc] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel_ish_ipc
        Kernel modules: intel_ish_ipc
00:14.0 USB controller [0c03]: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller [8086:a0ed] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:14.2 RAM memory [0500]: Intel Corporation Tiger Lake-LP Shared SRAM [8086:a0ef] (rev 20)
        Subsystem: Device [f111:0001]
00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 [8086:a0e8] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel-lpss
        Kernel modules: intel_lpss_pci
00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 [8086:a0e9] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel-lpss
        Kernel modules: intel_lpss_pci
00:15.3 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #3 [8086:a0eb] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel-lpss
        Kernel modules: intel_lpss_pci
00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:a0b1] (rev 20)
        Kernel driver in use: pcieport
00:1f.0 ISA bridge [0601]: Intel Corporation Tiger Lake-LP LPC Controller [8086:a082] (rev 20)
        Subsystem: Device [f111:0001]
00:1f.3 Audio device [0403]: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller [8086:a0c8] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl
00:1f.4 SMBus [0c05]: Intel Corporation Tiger Lake-LP SMBus Controller [8086:a0a3] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller [8086:a0a4] (rev 20)
        Subsystem: Device [f111:0001]
        Kernel driver in use: intel-spi
        Kernel modules: intel_spi_pci
01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD PC SN810 / Black SN850 NVMe SSD [15b7:5011] (rev 01)
        Subsystem: Sandisk Corp WD PC SN810 / Black SN850 NVMe SSD [15b7:5011]
        Kernel driver in use: nvme
80:00.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
81:00.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
81:01.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
81:02.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
81:03.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
81:04.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] [8086:0b26] (rev 03)
        Kernel driver in use: pcieport
aa:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz [8086:2725] (rev 1a)
        Subsystem: Intel Corporation Wi-Fi 6 AX210 160MHz [8086:0024]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

From lsusb:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 27c6:609c Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 003 Device 010: ID 291a:8397 Anker PowerExpand Elite 12-in-1 Thunderbolt 4 Dock
Bus 003 Device 011: ID 0bda:4ef0 Realtek Semiconductor Corp. USB Audio
Bus 003 Device 009: ID 291a:8497 Anker USB2.0 Hub
Bus 003 Device 008: ID 1d5c:5801 Fresco Logic USB2.0 Hub
Bus 003 Device 004: ID 8087:0032 Intel Corp. AX210 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 009: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 002 Device 008: ID 05e3:0764 Genesys Logic, Inc. USB Storage
Bus 002 Device 007: ID 291a:8597 Anker USB3.1 Hub
Bus 002 Device 006: ID 8087:0b40 Intel Corp. USB3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
1 Like

Forgot to add uname -r:

5.16.7-arch1-1

(Also occurred on previous kernel v5.16.5-arch1)