1

If a display has 2 HDMI (HDMI1 & HDMI2) connections and 2 DisplayPort (DP1 & DP2) connections connected to 2 different computers (computer A & computer B, with 1 HDMI and DP connected to each computer), is it possible to detect if computer A is connected to HDMI1 or HDMI2 and DP1 or DP2?

Longer Description

I'm using a Dell P4317Q display monitor. It's a 4K monitor with 2 HDMI, 1 DisplayPort, 1 miniDisplayPort, and 1 VGA inputs and has a special feature that allows the user to switch from 4K displaying a single input, to splitting the display into 4 quadrants (each quadrant is Full HD), allowing the user to display 4 different inputs simultaneously.

The use case is such that the user would have a minimum of 2 different Linux boxes (up to 4 Linux boxes, each running RHEL6 using X11), with each Linux box having 2 display connections (or if using 4 Linux boxes, then 1 display connection for each box) to the display.

I'm currently trying to write software that would allow an additional Linux box to act as an admin for the display (the display itself also has an RS232 port allowing the user to send serial commands to control the display instead of using the physical menu buttons on the display). This box would query the monitor via RS232 to determine which quadrant displays which input and then ideally would query each Linux box to determine which physical display connection on the monitor that box is connected to. This would then present to the user of the admin box which Linux box is connected to which display input in which quadrant on the display monitor. Obviously, the user could manually keep track of which input the Linux box uses to connect to the display monitor but I'm looking for a seamless solution that automagically presents the user with all relevant information.

I've looked into xrandr, however the output seems to pertain only to local IDs for outputs on the graphics card.

Each Linux box is also using Nvidia graphics cards, so I've also looked into nvidia-settings, however it seems the information such as DFP-0 or DFP-3 (for HDMI or DisplayPort) and CRT-0, don't refer to globally unique connections IDs, just connection type (DFP for HDMI or DisplayPort, CRT for VGA) and the numbers just refer to wiring type (DisplayPort and miniDisplayPort seem to both be DFP-3, tried connecting mDP output on Linux box to monitor's mDP and then DP via mDP-DP adapter but nvidia-settings reported the same connection type and wiring).

Additionally, I've also tried looking at nvidia-settings -q CurrentMetaMode, which outputs some info such as DPY, but again this doesn't seem to be globally unique IDs for the physical display connections on the monitor.

Do display monitors have attributes that represent globally unique IDs for the physical display connections? If so, is it possible to programmatically determine which physical display connections (type and index, e.g. HDMI port 2) a Linux box is connected to?

  • HDMI-CEC might allow some degree of this, but i don't know if that's normally found on monitors. the closest i can think of is querying the video driver about which ports are active (xrandr -q or a proprietary tool like nvidia-settings -q dpys), but that report would be from the GPU's perspective, not the monitor's. – quixotic Dec 2 '17 at 5:58
  • Why would you have two connections between a computer and the same display? – Hauke Laging Dec 2 '17 at 9:28
  • 1
    Depends on the display. If it supplies different EDIDs for each input, then yes, you can. So have a look at your EDIDs (e.g. /var/log/Xorg.0.log if you are using X and not Wayland). – dirkt Dec 2 '17 at 13:02
  • @HaukeLaging I've added a more detailed description of the problem. – Bitcario Dec 2 '17 at 19:28
0

I guess most displays show for a few seconds which input they use when they change it.

So you can just disable three of the four inputs in software and then the display should tell you which input the remaining system is connected to. You have to do that once for the HDMI inputs and once for the DP inputs.

I am not familiar with the display metadata which is transferred over HDMI and DP. I know that the display model is transferred. I doubt that the input port ID is transferred, too, but that is possible, of course.

  • I understand your solution but that would incur too much overhead for the intended user. I'm looking for a more programmatic solution that runs quickly in the background to process and present the information with minimal user intervention. – Bitcario Dec 2 '17 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.