Dock Compatibility (AMD) - USB-C / Thunderbolt

I have not found a way to visualize the MST topology. Not since Intel removed that feature from its Windows GUI (back when I had 4th gen Intel GPUs).

I’d bet DPCD includes registers for manufacturer and product id, so the GPU knows that type of thing, next to all the capabilities. I am mostly on Windows, where I have not found any such outputs from the GPU driver. And on Linux I did not go rummaging around in the kernel / drivers to find what kind of debug logging one would need to enable in order to get to that information. Although I personally would be much more interested into MST-slot assignments, DSC configuration and reasoning/policy for the driver to choose a specific configuration.

Since most of my MST equipment is using Synaptics chips, on Windows I can get by with just using Synaptics debugging tool, that shows a ton of details about its own MST-Chips and their current connection.

And in my experience with Intel iGPUs, linux has instability and problems with MST and HUGE problems with DSC, which all of those docks support and under Windows use to get to the max capabilities.
I think you are already looking in the right place. The only thing I have come across was /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log, as developers requested that when debugging the AMD driver white flicker issues on RDNA3 with 64GB memory and more and it seems to show a bunch of details about the display pipelines. But no MST topology.

Edit: Might be worthwhile to reverse engineer how the Synaptics VmmDpTool communicates with its chips. Is there some generic API to access / read DPCD registers? Or is that using some GPU-specific API to establish a custom link to its chips?

Edit2:
Also, outside of Apple, you should expect any MST-device being connected via MST, always. Even if it does not provide any benefit at the moment (i.e. only a single stream used). Using an SST connection on a MST-Hub should lead to the same exact data being output on every possible output at the same time and the MST-Hub picking an attached monitor at random to represent as the single monitor to the host.

How about /sys/kernel/debug/dri/1/amdgpu_mst_topology?`
Shows a bunch of stuff on the (remote) AMD 7000 (desktop) system I have access to.
Probably just requires giving the leaked DP 1.2 spec a thorough readthrough to understand a lot of it.

Edit

Yup, the format of the output is identical with what Intel drivers output under i915_dp_mst_info and it actually visualizes the topology. Here is an example:

MST Source Port [ENCODER:266:DDI TC3/PHY TC3]
	mstb - [0000000057bdd55a]: num_ports: 4
	port 3 - [00000000e50b2a5f] (output - MST BRANCHING): ddps: 1, ldps: 0, sdp: 1/1, fec: false, conn: 00000000a058dac2
		mstb - [00000000e987d7ba]: num_ports: 3
		port 6 - [00000000f90e2a4f] (output - SST SINK): ddps: 1, ldps: 0, sdp: 1/1, fec: true, conn: 00000000822a712b
		port 5 - [0000000087e2340c] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 00000000e419ad3b
		port 0 - [0000000035c07fa3] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000
	port 2 - [0000000022c548fd] (output - SST SINK): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 00000000a7e4c353
	port 1 - [000000006547f6f4] (output - SST SINK): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 00000000f0243dc5
	port 0 - [00000000bf4b0978] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000

*** Atomic state info ***
payload_mask: 7, max_payloads: 3, start_slot: 1, pbn_div: 60

| idx | port | vcpi | slots | pbn | dsc |     sink name     |
     1      2      1 01 - 24  1422     N       Dell AW3821DW
     2      1      2 25 - 39   864     N         DELL U2520D

*** DPCD Info ***
dpcd: 14 1e c4 01 01 11 01 83 2a 3f 04 00 00 00 84
faux/mst: 00 01
mst ctrl: 07
branch oui: 90cc24 devid: SYNAS revision: hw: 1.0 sw: 5.7
payload table: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03

Synaptics VMM5330 inside Dell WD19TB → chained to Synaptics VMM6210 inside Anker 556.
But actually bugged, because after the VMM6210 is another MST-Hub inside my monitor, that is not detected (and consequently mirrors its signal to the external output). Also bugged, because 1 monitor is always black/missing, seemingly at random.
It actually lists the manufacturer of one MST-Hub, but appearently not the second one. Seems shortened, just like with monitor manufacturers.

1 Like

yes, this is is interesting, though yours definitely looks more interesting :wink:

fw 13 → lenovo dock → 2x dell u2515h (which could do mst, but i’ve disabled it, since in the past it did not work properly and i was fed up with having to replug…

MST topology for connector 7
	mstb - [00000000e36ad282]: num_ports: 4
	port 3 - [00000000bc2d3100] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 0000000061eda6cd
	port 2 - [0000000098b6f366] (output - DP LEGACY CONV): ddps: 1, ldps: 1, sdp: 1/1, fec: false, conn: 000000005829f507
	port 1 - [00000000d7c86dc6] (output - DP LEGACY CONV): ddps: 1, ldps: 1, sdp: 1/1, fec: false, conn: 000000005c40ebfd
	port 0 - [000000007f757156] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000

*** Atomic state info ***
payload_mask: 3, max_payloads: 4, start_slot: 1, pbn_div: 40

| idx | port | vcpi | slots | pbn | dsc |     sink name     |
     1      1      1 01 - 22   864     N         DELL U2515H
     2      2      2 23 - 44   864     N         DELL U2515H

*** DPCD Info ***
dpcd: 12 14 c4 00 00 15 01 83 02 00 00 00 00 00 02
faux/mst: 00 01
mst ctrl: 07
branch oui: 90cc24 devid: SYNA3 revision: hw: 1.0 sw: 3.d
payload table: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

i also ran GitHub - tomba/kmsxx: KMS++: C++17 library, utilities and python bindings for Linux kernel mode setting => kmsprint

Connector 0 (83) eDP-1 (connected)
  Encoder 0 (82) TMDS
Connector 1 (91) DP-1 (disconnected)
  Encoder 1 (89) TMDS
Connector 2 (97) DP-2 (disconnected)
  Encoder 2 (96) TMDS
Connector 3 (102) DP-3 (disconnected)
  Encoder 3 (101) TMDS
Connector 4 (107) DP-4 (disconnected)
  Encoder 4 (106) TMDS
Connector 5 (112) DP-5 (disconnected)
  Encoder 5 (111) TMDS
Connector 6 (117) DP-6 (disconnected)
  Encoder 6 (116) TMDS
Connector 7 (122) DP-7 (disconnected)
  Encoder 7 (121) TMDS
Connector 8 (128) DP-8 (disconnected)
  Encoder 8 (127) TMDS
Connector 9 (136) DP-9 (connected)
  Encoder 9 (126) DPMST
  Encoder 10 (133) DPMST
    Crtc 1 (75) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 2 (50) fb-id: 145 (crtcs: 1) 0,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 11 (134) DPMST
    Crtc 2 (78) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 1 (45) fb-id: 145 (crtcs: 2) 2560,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 12 (135) DPMST
Connector 10 (138) DP-10 (connected)
  Encoder 9 (126) DPMST
  Encoder 10 (133) DPMST
    Crtc 1 (75) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 2 (50) fb-id: 145 (crtcs: 1) 0,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 11 (134) DPMST
    Crtc 2 (78) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 1 (45) fb-id: 145 (crtcs: 2) 2560,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 12 (135) DPMST
Connector 11 (140) DP-11 (disconnected)
  Encoder 9 (126) DPMST
  Encoder 10 (133) DPMST
    Crtc 1 (75) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 2 (50) fb-id: 145 (crtcs: 1) 0,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 11 (134) DPMST
    Crtc 2 (78) 2560x1440@59.95 241.500 2560/48/32/80/+ 1440/3/5/33/- 60 (59.95)  
      Plane 1 (45) fb-id: 145 (crtcs: 2) 2560,0 2560x1440 -> 0,0 2560x1440 (XR24 AR24 RA24 XR30 XB30 AR30 AB30 XR48 XB48 AR48 AB48 XB24 AB24 RG16 NV12 P010 XR4H AR4H XB4H AB4H)
        FB 145 5120x1440 XR24
  Encoder 12 (135) DPMST

not sure if that is really helpful :smiley:

Just wanted to check in and say:

My Lenovo TB4 Dock ( ThinkPad Universal Thunderbolt 4 Dock - Type 40B0 ) works with the AMD Framework 13.

On an Ubuntu Live USB it works out of the box, on Windows 10 you have to install the AMD drivers manually (not the framework driver pack). Have not tried Windows 11.
In any case you will probably have to update the dock firmware.

I have two 1440p Monitors attached via a single Displayport Cable and both run fine.

The 40AC Gen1 TB3 dock is older. According to Lenovos resolution tables, it supports neither HBR3 nor DSC, so it might include an older chip than the VMM53xx that is used in almost all other docks like it.

Curious why it says “DP Legacy Conv” for you. Are both monitors attached via HDMI? Or should that be the older MST hub that is being weird?
If that is just the MST hub itself, it might explain why MST on your monitors does not work behind it. “Legacy Conv” does not sound like it could support MST output to further forward MST streams and my first guess would have been that that denotes VGA or HDMI output.

Given the similarity of the output between Intel and AMD, I would expect them both to share some amount of code with respect to MST. Although I do not know if that includes the policy part that decides over bandwidth allocation and DSC or if it is just the modelling of the resulting decisions that are described by that debugging option.

The 2nd output’s contents I had already seen via other debug files directly and I find not that relevant to which monitors do or do not work. We usually do not care which display pipeline is assigned to which display.
But the first file includes the bandwidth allocation. So you can see how much bandwidth you still have left.
MST splits any connection into 64 equally-sized slots, 63 are used for display stream data (first one is basically a table-of-contents), grouped by the targeted display. The payload table shows this directly, matching what is already described in the table above it, where specific monitors are assigned a vcpi and enough slots to fit however much bandwidth is needed for the display/resolution/config chosen. So you have 19/64 = ~30% of bandwidth left and each of your monitors requires ~34% (22 slots) of the available total bandwidth (which should be a 4xHBR2 connection with ~17.3 GBit/s).

Edit:
Since your Dock still contains a Synaptics MST hub (devid: “SYNA3”, close to mine “SYNAS”), the VmmDpTool available from the Microsoft Store could probably tell you more about the specific chip and its capabilities.

1 Like

in the previous output, one monitor was connected via the hdmi port on the dock, and the other through a displayport-hdmi adapter. now with both screens connected directly through displayport, which started to only work after booting into windows once… when switching ports before the reboot, i could plug in any monitor in any displayport-output on the dock. the first one connected worked, the second kept not being detected…

MST topology for connector 7
	mstb - [00000000cbabc124]: num_ports: 4
	port 3 - [0000000004d7cd71] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 00000000600e90ea
	port 2 - [000000008322c638] (output - SST SINK): ddps: 1, ldps: 0, sdp: 1/1, fec: false, conn: 000000008b5af449
	port 1 - [0000000048f74153] (output - MST BRANCHING): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 000000001c1519d6
		mstb - [0000000024d4b7aa]: num_ports: 3
		port 1 - [00000000dda20f17] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 000000007ea072ed
		port 8 - [00000000998c8f5b] (output - SST SINK): ddps: 1, ldps: 0, sdp: 1/1, fec: false, conn: 00000000b53f69d2
		port 0 - [00000000193b3308] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000
	port 0 - [0000000072d3301c] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000

*** Atomic state info ***
payload_mask: 3, max_payloads: 4, start_slot: 1, pbn_div: 40

| idx | port | vcpi | slots | pbn | dsc |     sink name     |
     1      2      1 01 - 22   864     N         DELL U2515H
     2      8      2 23 - 44   864     N         DELL U2515H

*** DPCD Info ***
dpcd: 12 14 c4 00 00 11 01 83 02 00 00 00 00 00 02
faux/mst: 00 01
mst ctrl: 07
branch oui: 90cc24 devid: SYNA3 revision: hw: 1.0 sw: 3.d
payload table: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

now the amdgpu_mst_topology for the asus simpro 2 dock under linux, which only “shows” up with 20Gb/s bandwith, 2 lanes * 10 Gb/s (for both rx and tx). both monitors connected through the displayport ports on the dock, but only one being recognized. Both monitors were active under Windows at some point…

MST topology for connector 7
	mstb - [00000000a141bc64]: num_ports: 5
	port 4 - [00000000b39b826e] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 00000000b645b236
	port 3 - [000000009c0cc7e7] (output - MST BRANCHING): ddps: 1, ldps: 0, sdp: 0/0, fec: true, conn: 000000001d03aaa0
		mstb - [0000000093313914]: num_ports: 2
		port 1 - [00000000264b0253] (output - SST SINK): ddps: 1, ldps: 0, sdp: 0/0, fec: true, conn: 000000004fd574c9
		port 0 - [0000000084891756] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000
	port 2 - [00000000812c29fe] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 000000008e6bf190
	port 1 - [00000000ca50a8f7] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 00000000937ffaf4
	port 0 - [00000000107ad34b] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000

*** Atomic state info ***
payload_mask: 1, max_payloads: 4, start_slot: 1, pbn_div: 40

| idx | port | vcpi | slots | pbn | dsc |     sink name     |
     1      1      1 01 - 23   891     N         DELL U2515H

*** DPCD Info ***
dpcd: 14 14 c4 01 01 19 01 c1 38 2d 04 00 00 00 84
faux/mst: 00 01
mst ctrl: 07
branch oui: 00e04c devid: Dp1.4 revision: hw: 2.0 sw: 81.0
payload table: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

now the same, with one monitor connected to one of the displayport ports and the other to the hdmi port, which weirdly results in both monitors being active…

MST topology for connector 5
	mstb - [00000000fd0c942c]: num_ports: 5
	port 4 - [000000003cf02574] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 0000000022824ed5
	port 3 - [000000000f31e026] (output - MST BRANCHING): ddps: 1, ldps: 0, sdp: 0/0, fec: true, conn: 0000000004bc2fbe
		mstb - [000000009b1b3a3a]: num_ports: 2
		port 1 - [00000000cc21cead] (output - SST SINK): ddps: 1, ldps: 0, sdp: 0/0, fec: true, conn: 00000000220ee835
		port 0 - [00000000f92f1fdd] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000
	port 2 - [00000000ab012f28] (output - DP LEGACY CONV): ddps: 1, ldps: 1, sdp: 0/0, fec: true, conn: 000000004f3c8f8c
	port 1 - [00000000b7abec55] (output - NONE): ddps: 0, ldps: 0, sdp: 0/0, fec: false, conn: 00000000c4269890
	port 0 - [0000000046c3961a] (input - NONE): ddps: 1, ldps: 0, sdp: 0/0, fec: false, conn: 0000000000000000

*** Atomic state info ***
payload_mask: 3, max_payloads: 4, start_slot: 1, pbn_div: 38

| idx | port | vcpi | slots | pbn | dsc |     sink name     |
     1      2      1 01 - 24   891     N         DELL U2515H
     2      1      2 25 - 48   891     N         DELL U2515H

*** DPCD Info ***
dpcd: 14 14 c4 01 01 1d 01 c2 38 2d 04 00 00 00 84
faux/mst: 00 01
mst ctrl: 07
branch oui: 00e04c devid: Dp1.4 revision: hw: 2.0 sw: 81.0
payload table: 03 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

So this might be the same problem happening, as with the Lenovo Dock, and all it would have taken, would have been one boot into Windows… Or well, just connect one display through the docks hdmi port… I even switched one of the displayport-cables in the process.

but for now the lenovo dock with two displayport connections works, so I will keep it at that for now, and will see if it survives a shutdown, etc…

Copypasting from my own thread:

Had the opportunity to test a co-worker’s dock at work. The “Lenovo Thinkpad USB-C Dock Gen2”, Model No. LDC-G2, FRU PN: 03X7609, Type: 40AS works great. 3 monitors supported as expected, two DP, one HDMI.

which operating system are you using? windows? linux? both? :slight_smile:

@Johannes_Hedtrich Pop! OS 22.04 LTS

1 Like

thanks! :slight_smile:

1 Like

@Johannes_Hedtrich Confirmed the dock works with 3 2560x1440p monitors. DP goes up to 144Hz, HDMI 60hz. This is on Pop! OS 22.04 LTS, kernel 6.5.6-76060506-generic.

1 Like

does plugging in when the os has loaded work for you? not that that is something one regularly does. just curious if it’s some weird behavior with my docks, or general behavior.

Appreciate the discussion here. Currently eyeing the lenovo 40AS as my docking station of choice, though the HP gen5/gen2 dock is tempting as well. Has anyonw by chance heard something about the HP one? I read that at least displaylink is hit or miss on linux

I’m still having issues with a Caldigit TS3 working with 2 1440p monitors and the ethernet jack. A single monitor works fine though…

PopOS 22.04
6.5.6-76060506-generic

It worked well on my 1165g7 FW.

I have the HP thunderbolt G2 120W dock.
It works fine in windows at 60hz but it is hit or miss in Linux. Sometimes the monitor displays output sometimes it doesn’t but it is always detected in fedora as being present, fedora also shows me refresh rates that are not valid for the monitor.
Both windows and linux cannot display at 164hz. Windows give visual corruption, linux gives a blank screen.

i assume you are on bios 3.03? and you have everything connected before boot? for me hot-plugging the second display through displayport did not work.

i just looked up the caldigit ts3 (plus), and that only appears to have one displayport port. how are your monitors connected?

I have a CalDigit TS4 and everything works fine, including 4k@144hz (AMD Ryzen, 3.03 BIOS, Fedora 39). The only thing which does not work is booting and shutting down while connected, because the OS will hang forever. This means I have to unplug my Framework from the dock, boot to Desktop and only then connect.

Can you please test [Patch v2] thunderbolt: Add quirk to reset downstream port - Sanath S to see if it helps your issue?

1 Like

As I had a similar issue on a 6800u based Laptop, how would I go about testing this? Compile a custom kernel? If there is some documentation somewhere around this, a simple pointer would also be very much appreciated :slight_smile:

Yeah assuming it’s the same issue it should help any Rembrandt or Phoenix laptops. This isn’t the final version of the patch, it will respin one more time but it is good enough to confirm it’s the same root cause.

Yeah custom kernel.

Here’s a good starter on it.

A Guide to Compiling the Linux Kernel All By Yourself (itsfoss.com)