You are not logged in.

#1 2020-09-16 08:32:15

gtf21
Member
Registered: 2020-06-28
Posts: 107
Website

Second monitor not detected on boot (have to unplug and replug)

I have a second monitor connected via a USB-C dongle. It comes up as DP-1 when connected.

When I first boot, the screen just isn't detected at all, so `autorandr -c` detects my standard "mobile" configuration, and therefore doesn't arrange the screens.

I'm not sure how to get the machine to recognise the monitor when I first boot. Any help much appreciated.

On first boot

Output of `xrandr -q`

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 173mm
   1920x1080     60.01*+  60.01    59.97    59.96    59.93  
   // list of resolutions that no-one needs to see
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

Output of `sudo lshw -c video`

*-display                 
       description: VGA compatible controller
       product: UHD Graphics
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:145 memory:b0000000-b0ffffff memory:a0000000-afffffff ioport:1000(size=64) memory:c0000-dffff
After unplugging and re-plugging the USB-C hub

Output of `xrandr -q`:

~ > xrandr -q         
Screen 0: minimum 320 x 200, current 2560 x 2520, maximum 16384 x 16384
eDP-1 connected 1920x1080+0+1440 (normal left inverted right x axis y axis) 309mm x 173mm
   1920x1080     60.01*+  60.01    59.97    59.96    59.93  
   // resolutions list
DP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   // resolutions list 
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

Output of `lshw -c video`:

~ > sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: UHD Graphics
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:145 memory:b0000000-b0ffffff memory:a0000000-afffffff ioport:1000(size=64) memory:c0000-dffff

Offline

#2 2020-09-16 08:45:08

solskog
Member
Registered: 2020-09-05
Posts: 407

Re: Second monitor not detected on boot (have to unplug and replug)

Create a udev rule could help systemd-udevd to detect your USB device.

Unplug and plug in your usb-c dongle
$ dmesg | tail -n 20

How to create a udev rule
https://wiki.archlinux.org/index.php/Udev
I suspect your usb-c dongle was detected too early by systemd-udevd during system boot, before Xorg starts. Therefore Xorg-xrandr couldn't manage it correctly. Your new udev rule could be written in a way that systemd-udevd hand over this task to a new systemd-usb service that delay the detection until Xorg is up and running.

Last edited by solskog (2020-09-16 08:55:21)

Offline

Board footer

Powered by FluxBB