FreeBSD 14.3 - HDMI Hot-Plug only works on the first try.

Dear BSD friends,

I have X1-carbon Thinkpad that works properly and running FreeBSD 14.3. It's been really great running so far. I just have one particular issue on the HDMI hot-plug.

Issue Description

When I connect the laptop HDMI output to a 4K TV. It works for the first time when the laptop fresh from boot.

But when I unplug the HDMI cable and plug in the 2nd time, it doesn't detect the 4K TV anymore.

I tried the same procedures with Xorg (i3) & Wayland (Sway). Same results, which I suspect is due to the drm-kmod driver.

I tried both the drm-515-kmod & drm-61-kmod, both have the same results as well, only works on the first try.

I also capture the drm debug log from /var/log/messages, but not sure if it provides any help I attached here for reference.

Enable debug on drm via kernel knob:
sudo sysctl dev.drm.__drm_debug=-1

If anyone can provide any help or explanation would be great.

If not I will just stick to 2nd option. use USB-to-HDMI dongle, but It would be less ideal due to I cannot route audio to my TV using the dongle.

Hardware Information
Code:
Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (2100.00-MHz K8-class CPU)

➜  ~ pciconf -lv|grep -B4 VGA
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x5917 subvendor=0x17aa subdevice=0x225c
    vendor     = 'Intel Corporation'
    device     = 'UHD Graphics 620'
    class      = display
    subclass   = VGA

Steps to reproduce
1. Boot the laptop from poweroff.
2. Enter Window Manager (i3/sway)
3. Plug in HDMI cable to laptop HDMI port.
4. 4K TV displays the workspace working
5. Unplug the HDMI cable.
6. Try 2nd time, it is not working.
 

Attachments

I have the same problem.
Currently on 15.0-STABLE, but this has been issue for the past two-three years (on various -RELEASE, -STABLE and -CURRENT).
drm-66-kmod-6.6.25.1500068_6

HW:
ThinkPad X1 Carbon, 5th gen
Intel Core i7-7500U CPU
Intel HD 620 GPU

devd recognizes only connect of HDMI cable:
Code:
cat /var/run/devd.pipe
!system=DRM subsystem=CONNECTOR type=HOTPLUG cdev=dri/card0 connector=112
!system=ACPI subsystem=Video type=brightness notify=100
!system=ACPI subsystem=ACAD type=\_SB_.PCI0.LPCB.EC__.AC__ notify=0x01

Code:
xrandr:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
...
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected (normal left inverted right x axis y axis)
   3840x2160     30.00    25.00    24.00    29.97    23.98    29.98
   1920x2160     59.99
   2560x1440     59.95
   1920x1080     60.00    60.00    50.00    59.94
   1680x1050     59.88
   1280x1024     75.02    60.02
   1440x900      59.90
   1280x960      60.00
   1280x720      60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08
DP-2 disconnected (normal left inverted right x axis y axis)

After running 2nd xrandr command or reconnecting HDMI cable, display is not recognized anymore - xrandr show only eDP-1 connected
Code:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
...
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis

Disconnecting and connecting HDMI cable doesn't help nor shows any logs in devd
Restarting Xorg or suspending and resuming laptop doesn't help either.

Same monitor also works when connected native with USB-C
Works with USB-C -> HDMI adapter
devd recognizes connecting and disconnecting adapter:
Code:
!system=DRM subsystem=CONNECTOR type=HOTPLUG cdev=dri/card0 connector=103
 
Just an update to everyone,
Today upgraded to 15.0-RELEASE also the same.

Thanks PerOrs for the info. I think I just stick to usb-c to HDMI converter for hotplug without audio passthrough for now.

I am glad the FreeBSD has the Linux Compatibility Layer which helps in this regard. Hope the hot plug issue get fixed with time when the Linux compatibility layer become much more mature.
 
Back
Top