Early KMS Resolution Issue on MST dock connected 4K Monitor
Description:
My laptop, a Thinkpad P14s Gen2 AMD has two usb-c and an hdmi port. I use one USB-C port to connect to Thinkpad Dock Type 40B0 which has an internal MST hub. The Dock has 2xDP connectors and 1xHDMI. The dock is connected to a 4K TV (LG C2), using a DP to HDMI cable. The system works fine when Wayland or Xorg starts and displays 3840x2160@60hz. I also use early kms to switch to full 4K at boot.
I noticed a lot of monitor sync loss when changing modes. At UEFI boot it's at 1280x1024, then at kernel boot it switches to 1920x1080 and monitor loses signal during this transition, then SDDM or GDM starts it switches to 3840x2160, and when I login to KDE, it loses signal again for a few seconds then shows the desktop again at 3840x2160@60. So this is a nuisance for losing monitor sync but not effecting normal operation.
I then tried to use the HDMI port on the laptop. I unplugged the cable from the dock, plugged a separate HDMI cable directly to the Laptop. Then I noticed it was fully smooth. After UEFI, mode immediately switches to 3840x2160@60 with early kms and then SDDM launches without losing any signal. Then logging into desktop also is smooth and does not lose any signal.
So definitely there's something wrong when USB-C connected MST Dock connected DP connected Monitor is used, vs using HDMI directly on laptop. Problems are:
- When using the MST docking station, early kms does not switch to native 4K resolution (3840x2160@60hz). I tried feeding an EDID, it did not work.
- Monitor losing signal sync when switching modes when using Dock. Does not happen when using HDMI port on laptop.
This does not happen if I use a usb-c hub using DP-Alt mode without MST hub. So a simple usb-c hub with HDMI out works fine.
Problematic setup: Laptop --usb-c-- dock_with_mst -- dp2hdmi cable -- hdmi_port_on_4K_Monitor
Workign setup: Laptop -- hdmi -- hdmi_port_on_4K_Monitor
Additional info:
Linux: 6.7.8-arch1-1 Logs: Please advise how to collect
Steps to reproduce:
- Use any docking station with an MST hub.
- Connect a monitor to the docking station.
- Connect Dock to the laptop using USB-C port (no thunderbolt support, ie amd laptop)
- Use early kms by adding amdgpu to mkinitcpio.conf modules section
- Optionally use Plymouth
- Watch monitor resolution using Monitor functions while booting