Displayport on thunderbolt dock is down although X thinks it is up

Klaus Kusche klaus.kusche at computerix.info
Tue Oct 22 18:15:42 UTC 2019


Hello,

the thunderbolt maintainers told me that the following question 
should be directed to the gfx people:

I use a dell precision 7740 notebook with amd polaris 12 graphics.
The notebook is connected or hotplugged to a noname thunderbolt dock
with displayport or hdmi monitors connected to the dock.

With gentoo, amdgpu kernel driver and modesetting X driver,
I've the following problem:

In almost all cases when warm booting (without powerdown), 
and in at least half of the attempts when hotplugging the tb dock,
and whenever changing resolution or monitor configuration
or switching from text mode to Xwindows or back, displayport fails in X:
Xwindows thinks that a monitor is connected and dp is active and working,
but in most cases no signal at all arrives at the monitor 
(the monitor remains in sleep state because of no active input),
or in rare cases, the monitor wakes up, but shows a black screen.

Hotplugging the dock is recognized (I configured my system to turn off 
the laptop display when an external monitor is present): When I unplug 
and replug the dock, the internal display goes on and off, reliably.
But the external display does not display anything...

In the kernel log I get
Oct 17 08:51:31 lap kernel: [drm:amdgpu_atombios_dp_link_train] *ERROR* clock recovery tried 5 times
Oct 17 08:51:31 lap kernel: [drm:amdgpu_atombios_dp_link_train] *ERROR* clock recovery failed
but as far as I can tell nothing else.

In many cases, "xset dpms force off ; sleep 2 ; xset dpms force on" 
brings the display back to live. If not, powercycling the display
or unplugging and replugging its displayport cable sometimes helps.
After cold booting (after powering notebook, dock and display off & on),
the situation is worse: 
"xset dpms force off ; sleep 2 ; xset dpms force on" almost never helps.

With amdgpu kernel driver and amdgpu Xwindow driver instead of modesetting,
the situation is much worse: I never managed to get anything displayed
on the external monitor, no matter what tricks I apply,
although the monitor works in text mode before starting X.

My wild guess, without knowing anything about the internals:
X does not realize that the tunnelled displyport link is actually 
completely down after mode switches etc.. It just tries to resync
instead of shutting the link down and completely re-initializing it.
Only a dpms off/on or a monitor off/on forces a complete link reinit.


With ubuntu (dell preinstalled, amdgpu+amdgpu), hotplugging the dock 
or warm booting (without powerdown) with the dock connected 
usually works fine. 
Cold booting (after powerdown) also fails as above.

I was unable to locate any significant difference in the kernel config
between my gentoo and ubuntu. However, ubuntu installs tons of udev rules,
also for drm and the graphic card (I don't have any such rules in gentoo). 
Hence, I suspect that their kernel has the same problem, 
but the problem is worked around by udev actions.


Questions:
* Best place to ask for this problem?
* Any hints about that problem?
* Why does amdgpu+modesetting behave much better than amdgpu+amdgpu?
* Any udev rules known or needed for displayport over hotplug thunderbolt,
or to fix the problem?


Many thanks!

-- 
Prof. Dr. Klaus Kusche
Private address: Rosenberg 41, 07546 Gera, Germany
+49 365 20413058 klaus.kusche at computerix.info https://www.computerix.info
Office address: DHGE Gera, Weg der Freundschaft 4, 07546 Gera, Germany
+49 365 4341 306 klaus.kusche at dhge.de https://www.dhge.de


More information about the amd-gfx mailing list