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?
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-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?