6

I've got two monitors connected via DisplayPort to the dock. xrandr displays the external monitors as DP1-1 and DP1-2 and the laptop as eDP1.

I set up my monitors with the following in ~/.xprofile:

xrandr --output eDP1 --same-as DP1-1
xrandr --output DP1-2 --right-of DP1-1

This works fine. When disconnecting the laptop from the dock the laptop screen does the right thing, reverting to a single monitor. When reconnecting the laptop DP1-1 shows up, but DP1-2 remains blank. . ~/.xprofile changes nothing, and no error message is printed. I tried reconfiguring using the --crtc option, but all I ended up with were complaints that crtc-1 (or something similar) was not configured correctly. After trying a couple things I got "xrandr: cannot find output 0x46", which I can't find any precedence for.

After reconnecting the monitors have the same names ("DP1-1" and "DP1-2") and both of them are shown as "connected" by xrandr.

l0b0
  • 51,350
  • I may not have direct answers but few pointers which I want you to try. 1. (Mons package)[https://github.com/Ventto/mons] 2. adding hotplug configuration for monitor. and running xrandr when detected. – Devidas Jun 11 '18 at 07:26
  • you can try https://github.com/codingtony/udev-monitor-hotplug. I feel this is better way because this way we can always execute when some device plugged in or out. whereas when we do it using ~/.xprofile it will execute only once on start of x-server. I am not claiming it cannot be done that way. just this is more convinient way to write logic(this is just my personal preferance). – Devidas Jun 11 '18 at 07:31
  • Are the monitors named the same after reconnecting them? – mattia.b89 Jun 12 '18 at 19:52
  • Ok... you are an experienced user, so I think the more likely it is a: new-hardware+double GPU+USB-C+multi-monitor-setup = kernel/driver bug or missing feature -> try to open a bug report – mattia.b89 Jun 16 '18 at 08:57
  • @mattia.b89 After filing probably hundreds of bug reports in open source projects I haven't the faintest idea what or even where to report this issue. Is it a bug in X, the Intel driver, xrandr, or some other component? And in my experience the amount of work involved in writing such a bug report which will be fixed is about the same as learning to program it myself. – l0b0 Jun 16 '18 at 10:12
  • @l0b0 Did you ever to figure this out? I'm having the same issue (Thinkpad T490, USB-C dock 40A9, manjaro-i3). – samuelkf May 01 '19 at 13:51
  • Nah @samuelkf, it still happens. Fortunately for me I don't have to do this very often, but that also means I can't really spend a lot of time looking into it. – l0b0 May 01 '19 at 21:10
  • @l0b0 fair play. I'll report back if I make any progress on it myself. – samuelkf May 03 '19 at 07:09
  • 1
    So... if I manually set the mode for each display as suggested here, they start working again. Interestingly, I still get the same 'configure crtc failed' error, but the displays come back to life. – samuelkf May 03 '19 at 10:30
  • @l0b0 You still have access to the problem? ;-) I might be able to help, as might my answer here and there – Robert Siemer Feb 24 '23 at 01:16
  • @RobertSiemer Nah, different software and hardware now. Thanks for following up though! – l0b0 Feb 24 '23 at 01:34

1 Answers1

0

In my experience, it sometimes works to issue xrandr --auto after connecting to the dock again. This brings up the external monitor 3 out of 10 times at least. Also logging out and then in brings the monitor back to life.

sebasth
  • 14,872