USB-C and HDMI not working simultaneously
Your laptop has a graphics device that supports only 3 displays. (Intel UHD 620)
With that xrandr
output it is clear that your GPU has enumerated 5 display outputs, but since your GPU can only support 3 screens, some of those outputs must be mutually exclusive.
Output 1: eDP - The built in screen
Output 2: HDMI 1 or DisplayPort 1
Output 3: HDMI 2 or DisplayPort 2
Output 2 and Output 3 are likely using DP++, which means they can be set to output either an HDMI or DisplayPort signal, but not both at the same time.
It seems that Output 2 is physically connected from the GPU to both the charging USB-C port (#1) and the HDMI port (#5). The xrandr
output also seems to indicate that your USB-C hub wants to take a DisplayPort signal, so Output 2 cannot push an HDMI signal & DisplayPort signal at the same time. This is why only one port works at a time; But maybe another hub with HDMI Alternate Mode could get both ports to display the same picture.
Output 3 is physically connected to the USB-C docking port so that you can connect a third monitor without causing this issue.
That docking port may also consume Output 2 if you used a hub or docking station with more than one video port on it.
Vaibhav Sanghi
Updated on September 18, 2022Comments
-
Vaibhav Sanghi over 1 year
I have a Lenovo Thnikpad L-480 (i5-8250U) (Ubuntu 18.04) and I am using two other monitors with it, one through the onboard HDMI port and the second using a USB-C to HDMI, USB-C charging and USB-A dongle (PiBOX India USB C to HDMI Adapter Aluminium Type C USB hub 3.1 to HDMI 4K/USB 3.0/USB C 3 in 1 Converter Cable Charging Port Adapter Cable).
When I plug in the hub in the USB-C port{2} which is part of the docking port, both the monitors are recognised and work awesome, but when I try to use the USB-C port{1} which is primarily used for charging (so that I can also use the USB-C charging port of the hub and have less clutter), the only monitor which is recognised is this hub-connected monitor and not the HDMI port{5} connected monitor.
Side view of laptop: (numbers in curly braces alongisde ports denote the port numbered on this link)
Xrandr output shows that USB-C port{1} is labelled as DP-1 and HDMI port{5} is labelled as HDMI-1
So basically DP-1 and HDMI-1 don't output simultaneously.
I have tried to force output throught HDMI-1 when DP-1 is connected and that doesn't work either.
xrandr --addmode HDMI-1 1920x1080 xrandr --output HDMI-1 --mode 1920x1080
My xrandr output when both monitors are working together with my laptop display
USER:~$ xrandr Screen 0: minimum 320 x 200, current 3840 x 1848, maximum 8192 x 8192 eDP-1 connected primary 1366x768+1237+1080 (normal left inverted right x axis y axis) 309mm x 173mm 1366x768 60.00*+ 1360x768 59.80 59.96 1280x720 60.00 59.99 59.86 59.74 1024x768 60.04 60.00 960x720 60.00 928x696 60.05 896x672 60.01 1024x576 59.95 59.96 59.90 59.82 960x600 59.93 60.00 960x540 59.96 59.99 59.63 59.82 800x600 60.00 60.32 56.25 840x525 60.01 59.88 864x486 59.92 59.57 800x512 60.17 700x525 59.98 800x450 59.95 59.82 640x512 60.02 720x450 59.89 700x450 59.96 59.88 640x480 60.00 59.94 720x405 59.51 58.99 684x384 59.88 59.85 680x384 59.80 59.96 640x400 59.88 59.98 576x432 60.06 640x360 59.86 59.83 59.84 59.32 512x384 60.00 512x288 60.00 59.92 480x270 59.63 59.82 400x300 60.32 56.34 432x243 59.92 59.57 320x240 60.05 360x202 59.51 59.13 320x180 59.84 59.32 DP-1 disconnected (normal left inverted right x axis y axis) HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm 1920x1080 60.00*+ 50.00 59.94 1920x1080i 60.00 50.00 59.94 1600x900 60.00 1280x1024 75.02 60.02 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 60.00 800x600 75.00 60.32 720x576 50.00 720x576i 50.00 720x480 60.00 59.94 720x480i 60.00 59.94 640x480 75.00 60.00 59.94 720x400 70.08 DP-2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 598mm x 336mm 1920x1080 60.00*+ 50.00 59.94 1920x1080i 60.00 50.00 59.94 1680x1050 59.88 1600x900 60.00 1280x1024 75.02 60.02 1280x800 59.91 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 60.00 832x624 74.55 800x600 75.00 60.32 720x576 50.00 720x480 60.00 59.94 640x480 75.00 60.00 59.94 720x400 70.08 HDMI-2 disconnected (normal left inverted right x axis y axis)