My findings
That HP G5 dock (spec) does only USB-C. The video signal will be transmitted with that famous USB-C Alternate mode for DisplayPort; the Thunderbolt 3 functionality from the laptop (same port, different mode of operation) is not used.
The tripple 1680x1050 resolution is a strong hint that the laptop is limited to DisplayPort 1.2 over USB-C and uses only 2 lanes. It allows a bandwidth of 8.64Gb/s, for which a tripple 1680x1050 is a tight fit, but 60Hz are possible. What makes you so sure that CVT-RBv2 timings would not work? The error xrandr: Configure crtc 0 failed
indicates that the GPU could not be configured to do what you want. If the monitor were actually not able to handle the mode, it could only indicate that on it’s own screen, flicker strangely or go dark etc. For generating useful modelines cvt
is useless for this case (and many others). Further, its -r
switch generates “v1” timings only.
- The hotplug issue seems to be an unrelated bug. If you look at the ports without the dock, you can see the odd
DP-1-3
port. I’m not sure what it represents, especially without DP-1-1
and DP-1-2
around.—I believe that this odd entry is the same as the DP-1-6
entry in the coldplug case (the number always being +3 of the last DP-1-x
). In the hotplug event the enumeration over DP-1
clashes after DP-1-1
and DP-1-2
with that spurious DP-1-3
and fails to register with that name and does not attempt any other name, it seems, making it impossible to see/handle the last video port of the dock.
How to proceed
60Hz refresh
(The following text shows ways to get things going. Read and understand and adapt to your environment. Copy&paste might not work.)
Let’s get all monitors to 60Hz. First, make sure you’re coldplugged and that all 3 external monitors work in some resolution. To avoid bottle neck issues or hitting other limits of the GPU (we want to test the monitors!), work on the internal screen and switch all others off
for no in 1 2 3; do xrandr --output DP-1-$no --off; done
Now lets add “my” modelines:¹
xrandr --newmode h160 119 1680 1728 1760 1840 1050 1053 1059 1080 +HSync -VSync
xrandr --newmode h80 114.048 1680 1688 1720 1760 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h60 112.752 1680 1688 1710 1740 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h50 112.104 1680 1688 1705 1730 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h40 111.456 1680 1688 1702 1720 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h30 110.808 1680 1682 1690 1710 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h25 110.484 1680 1682 1690 1705 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h20 110.16 1680 1682 1690 1700 1050 1066 1074 1080 +HSync -VSync
xrandr --newmode h12 109.642 1680 1684 1688 1692 1050 1066 1074 1080 +HSync -VSync
Add them to your preferred monitor now (and to the others eventually):
for name in h160 h80 h60 h50 h40 h30 h25 h20 h12; do xrandr --addmode DP-1-1 $name; done
Now test them!
xrandr --output DP-1-1 --mode h160
h160 should work. It’s the boring CVT-RB timing from cvt -r 1680 1050 60
. Then test h80. This is CVT-RBv2. I have four mediocre old monitors, they can all do that. Further:
- on h60 my crappy Medion brand Full-HD monitor gets an unsteady image
- h30 is the last modeline for this BenQ brand Full-HD monitor
- h20 HP Full-HD monitor (ok)
- h12 Dell office 1680x1050 monitor (working!)
Then try enabling all three on the last modeline you have working.
60Hz alternative solution
As mentioned, the bandwidth limit is also dictated by the USB-C Displayport Alternate Mode version and setup. For more bandwidth use DP 1.3+ and/or 4 lanes (maximum) instead of 2 of the USB-C wiring. The former can not be changed on the same hardware, the latter sometimes can in the firmware setup utility (“BIOS”), look for “USB-C High Resolution Mode” or something... In the 4-lane-mode no USB 3.x is available next to the DisplayPort video signal, only USB 2.0.
hotplugging the dock
For the same 3 states (no dock, hotplugged, coldplugged), please send the output of
(cd /sys/class/drm; ls */edid)
I have
card0-DP-1/edid card0-DVI-I-2/edid
card0-DVI-I-1/edid card0-HDMI-A-1/edid
E.g. totally different names compared to xrandr | egrep '^[^ ]' | grep -v 'Screen 0:' | sed -e 's/ (.*//'
DisplayPort-0 connected primary 1680x1050+0+1080
HDMI-0 connected 1680x1050+1920+1080
DVI-0 connected 1680x1050+3840+1080
DVI-1 connected 1680x1050+1920+0
Maybe it sheds some light on what is what. The Razer Blade 15" Base (2018) is supposed to have the internal display, 1×Thunderbolt3/USB-C, 1×HDMI 2.0 and 1×Mini DisplayPort 1.4.
That explains eDP-1, HDMI-1-1 (albeit not its naming) and DP-1 is related to USB-C, as we know. Leaves DP-2 and DP-1-3. I guess DP-2 is the Mini DisplayPort. And maybe DP-1-3 is the Thunderbolt side of that dual-use Thunderbolt/USB port. If there is an interdependency, let’s confirm it by enabling them first individually, then together. Disconnect the dock and switch --off
all outputs. Then
xrandr --addmode DP-1 0x74 # some 800x600 standard modeline on my system
xrandr --output DP-1 --mode 0x74 # does this work?
xrandr --output DP-1 --off # afterwards
This way you can force the GPU to output something there. Try DP-1-3 next. Does it work? Can you enable both at the same time? Also on different (low-res) resolutions (e.g. no mirroring)? Could you borrow a Thunderbolt to DP converter? Check if this adapter uses DP-1-3.
Anyway... if this all turns out to be true, it seems that the Xserver did a bad call on handing out conflicting names for some kind of internal output splitter. Would be interesting to see if you could only restart the Xserver after hotplugging the dock without full reboot. If it turns working, then the kernel GPU driver does not seem to provoke the problem, but indeed the enumeration in X11.
¹ Pixel clock calculated with Tom's video timing calculator and hand-molded into a modeline.
card0-DP-1 card0-DP-2 card0-eDP-1 card1-DP-3 card1-HDMI-A-1
– bain Feb 28 '23 at 16:08card0-DP-1 card0-DP-2 card0-DP-7 card0-DP-8 card0-DP-9 card0-eDP-1 card1-DP-6 card1-HDMI-A-1
– bain Feb 28 '23 at 16:08card0-DP-1 card0-DP-2 card0-DP-4 card0-DP-5 card0-DP-6 card0-eDP-1 card1-DP-3 card1-HDMI-A-1
– bain Feb 28 '23 at 16:09/sys/class/drm/card1-DP-6/edid
is present and valid, so there is some kind of connection, but it should be the (card0) Intel GPU that gets connected to the external monitor. – bain Feb 28 '23 at 16:27and functional but card1-DP-6 is "disconnected"
- I made a typo here, it's card0 not card1. Sometimes it shows up as card0-DP-[567] instead of [456].cat card0-DP-[567]/status
shows "connected" three times, but xrandr shows DP-1-3 "disconnected" and with the nVidia CRTCs. So it's possible that the kernel side is working here, and for some reason the third Intel port just isn't showing up in xorg because DP-1-3 maps to the nVidia card1-DP-3 which is the physical miniDP port. – bain Feb 28 '23 at 16:57(II) modeset(G0): Output DP-1-3 has no monitor section
modeset(0): Output DP-1-3 connected
and shows the edid, then latermodeset(G0): Output DP-1-3 has no monitor section
.G0
being the nVidia card. When hotplugged, DP-1-3 in xrandr is the nVidia miniDP port, when coldplugged this appears on DP-1-6. If I blacklist the nouveau kernel module, then xrandr shows DP-1-3 correctly with Intel CRTCs, but the desktop doesn't start for some reason. – bain Feb 28 '23 at 19:43xrandr
after hotplug, while it is not on the kernel side. The blacklisting idea sounds like a decent workaround: if you do not need that card1, avoiding the kernel to pick it up at all should work. Otherwise: a bug report might help (mine often do not... :-o ) – Robert Siemer Mar 01 '23 at 00:43xrandr: Configure crtc X failed
, I guess).—And if you haven’t reached an “all different” config yet with this method, could you test different (lower) resolutions on each monitor (with different pixel clocks)? I believe that on DP with MST only one clock is used (and another for the internal laptop display) and no limit will be reached here. Works? – Robert Siemer Mar 01 '23 at 00:54