Displays through thunderbolt sometimes stop working

This is on NixOS 25.05, kernel 6.12.41, on a Ryzen 7040 Framework 13 with firmware 03.09.

I’ve noticed that after repeatedly connecting/disconnecting from a thunderbolt dock, the 2x4k displays will eventually no longer be detected. The only way to get them to work again was with a reboot of the laptop. This also didn’t happen with any of the other laptops I connected to the dock. There are thunderbolt errors in the kernel, but they don’t seem helpful:

Aug 09 17:24:00 framework kernel: thunderbolt 0000:c3:00.5: 2: cannot find TB_VSE_CAP_PLUG_EVENTS aborting
Aug 09 17:23:59 framework kernel: thunderbolt 0000:c3:00.5: 2: cannot find TB_VSE_CAP_PLUG_EVENTS aborting
Aug 09 17:23:50 framework kernel: thunderbolt 0000:c3:00.5: hotplug event from non existent switch 2:2 (unplug: 0)
Aug 09 17:23:50 framework kernel: thunderbolt 0-2: failed to initialize port 1
Aug 09 17:23:50 framework kernel: thunderbolt 0-2: reading DROM failed: -107
Aug 09 17:23:49 framework kernel: thunderbolt 0000:c3:00.5: hotplug event from non existent switch 2:2 (unplug: 0)
Aug 09 17:23:49 framework kernel: thunderbolt 0-2: failed to initialize port 1
Aug 09 17:23:49 framework kernel: thunderbolt 0-2: reading DROM failed: -107

I’ve been able to work around this by finding the Thunderbolt related controllers with lspci:

00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 19h USB4/Thunderbolt PCIe tunnel
00:04.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 19h USB4/Thunderbolt PCIe tunnel

And just resetting them completely with sysfs after connecting the cable:

sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:00:03.1/remove"
sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:00:04.1/remove"
sudo sh -c "echo 1 > /sys/bus/pci/rescan"

This is an acceptable workaround for me (though it’s a bit annoying to have to do every time). I was wondering if anyone else ran into similar problems with Thunderbolt on Linux and whether they were able to find a more permanent fix.

Had the same issue with a Dell TB4 dock until I was fed up and changed the dock.
Seems thunderbolt software stack is not stable for AMD hardware.

Check the dock-threads for more details.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.