Problem detecting X11 output name on Nvidia GTX 1080 MXM Card

Hi,

I’m attempting to find a way to determine which output name (e.g. DP-1, DP-2, HDMI-0 ) corresponds to which physical display output. The physical outputs on the card are: DisplayPort, HDMI, Mini-Displayport (the actual monitors connected to each are also unique). Here is the output of xrandr -q:

xrandr -q:

Screen 0: minimum 8 x 8, current 2560 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1280x1024+1280+0 (normal left inverted right x axis y axis) 480mm x 270mm
1920x1080 60.00 + 59.94 50.00 60.00 50.04
1680x1050 59.95
1440x900 59.89
1440x576 50.00
1440x480 59.94
1280x1024 75.02* 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 disconnected (normal left inverted right x axis y axis)
DP-7 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
1920x1080 60.00*+
3840x2160 17.00
2560x1600 30.00
2560x1440 30.00
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
640x480 75.00 72.81 59.94
DP-8 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
1920x1080 60.00 + 59.94 50.00
1680x1050 59.95
1440x900 59.89
1440x576 50.00
1440x480 59.94
1280x1024 75.02* 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-9 disconnected (normal left inverted right x axis y axis)

I need to know if DP-X corresponds to the Mini-Displayport or the regular Displayport on startup. The monitors connected to these outputs are also unique. Is there any way to determine this? I have tried a lot of different utilies but I have not been able to find any that tie the X display name either to a physical display output or a monitor name. Please advise.

Thanks

Hi skyline220,

What you’re looking for are the ConnectorNumber and _ConnectorLocation properties attached to the output, which you can query with “xrandr --prop”. Two RandR outputs with the same ConnectorNumber correspond to the same physical connector, and the ConnectorType property to tell which kind of connector it is. You can use the SignalFormat property to tell which is which.

If you just want to make a configuration that configures certain settings based on which monitor is connected, you can use a MetaMode with a display name based on the EDID of the monitor. Unfortunately there isn’t a super easy way to query those names, but you can get them if you enable Option “ModeDebug” in xorg.conf, or by using “nv-control-dpy --print-display-names” from the NV-CONTROL samples available in http://github.com/NVIDIA/nvidia-settings

Hi aplattner,

Thanks for your response. Here is the output of “xrandr --prop”:

testunit@testunit:~$ xrandr --prop
Screen 0: minimum 8 x 8, current 2560 x 1024, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: DisplayPort
supported: DisplayPort
ConnectorType: DisplayPort
ConnectorNumber: 0
_ConnectorLocation: 0
DP-1 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: DisplayPort
ConnectorNumber: 0
_ConnectorLocation: 0
DP-2 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: DisplayPort
supported: DisplayPort
ConnectorType: DisplayPort
ConnectorNumber: 1
_ConnectorLocation: 1
DP-3 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: DisplayPort
ConnectorNumber: 1
_ConnectorLocation: 1
HDMI-0 connected 1280x1024+1280+0 (normal left inverted right x axis y axis) 480mm x 270mm
EDID:
00ffffffffffff000469d3223bc30200
231b010380301b782a7ca5a3544ea027
125054b7ef00d1c0814081809500b300
714f81c08100023a801871382d40582c
4500db0b1100001e000000ff0048384c
4d54463138313035310a000000fd0032
4b185311000a202020202020000000fc
00415355532056533232390a202001f2
020322714f0102031112130414050e0f
1d1e1f10230917078301000065030c00
10008c0ad08a20e02d10103e9600db0b
11000018011d007251d01e206e285500
db0b1100001e011d00bc52d01e20b828
5540db0b1100001e8c0ad09020403120
0c405500db0b11000018000000000000
000000000000000000000000000000bd
_MUTTER_PRESENTATION_OUTPUT: 0
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: HDMI
ConnectorNumber: 2
_ConnectorLocation: 2
1920x1080 60.00 + 59.94 50.00 60.00 50.04
1680x1050 59.95
1440x900 59.89
1440x576 50.00
1440x480 59.94
1280x1024 75.02* 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-4 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: DisplayPort
supported: DisplayPort
ConnectorType: DisplayPort
ConnectorNumber: 3
_ConnectorLocation: 3
DP-5 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: DisplayPort
ConnectorNumber: 3
_ConnectorLocation: 3
DP-6 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: DisplayPort
supported: DisplayPort
ConnectorType: DisplayPort
ConnectorNumber: 4
_ConnectorLocation: 4
DP-7 connected (normal left inverted right x axis y axis)
_MUTTER_PRESENTATION_OUTPUT: 0
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
EDID:
00ffffffffffff000661700200000000
1617010380341d782e3585a656489a24
1250542fcf00714f818081009500b300
a9c0d10081c0023a801871382d40582c
4500e00e1100001e6a5e00a0a0a02950
3020350080682100001a9e6800a0a040
29603020350080902100001a000000fc
0046482d4450344b0a20202020200123
02030b4026097f07117f50352f00a0a0
a029503020350080682100001a4f3400
a0a04029603020350080902100001a04
74801871382d40582c4500e00e110000
1e286800a0f0703e8030203500c01c32
00001a063b00a0f0703e8030203500c0
1c3200001a0000000000000000000000
000000000000000000000000000000a7
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: DisplayPort
ConnectorNumber: 4
_ConnectorLocation: 4
1920x1080 60.00 +
3840x2160 17.00
2560x1600 30.00
2560x1440 30.00
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
640x480 75.00 72.81 59.94
DP-8 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
_MUTTER_PRESENTATION_OUTPUT: 0
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
EDID:
00ffffffffffff000469d322217f0000
021c010380301b782a7ca5a3544ea027
125054b7ef00d1c0814081809500b300
714f81c08100023a801871382d40582c
4500db0b1100001e000000ff004a314c
4d54463033323534350a000000fd0032
4b185311000a202020202020000000fc
00415355532056533232390a20200174
020322714f0102031112130414050e0f
1d1e1f10230917078301000065030c00
10008c0ad08a20e02d10103e9600db0b
11000018011d007251d01e206e285500
db0b1100001e011d00bc52d01e20b828
5540db0b1100001e8c0ad09020403120
0c405500db0b11000018000000000000
000000000000000000000000000000bd
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: DisplayPort
supported: DisplayPort
ConnectorType: DisplayPort
ConnectorNumber: 5
_ConnectorLocation: 5
1920x1080 60.00 + 59.94 50.00
1680x1050 59.95
1440x900 59.89
1440x576 50.00
1440x480 59.94
1280x1024 75.02* 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-9 disconnected (normal left inverted right x axis y axis)
CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
BorderDimensions: 4
supported: 4
Border: 0 0 0 0
range: (0, 65535)
SignalFormat: TMDS
supported: TMDS
ConnectorType: DisplayPort
ConnectorNumber: 5
_ConnectorLocation: 5

When I unplug the connection to the Mini-DisplayPort I recognize DP-7 corresponds to Mini-DisplayPort. Since both DP-8 and DP-7 list the ConnectorType as DisplayPort I am unable to differentiate just using the ConnectorType property. The only differentiator I see is the SignalFormat which is TMDS on DP-7 and SignalFormat is DisplayPort on DP-8. Is it safe to assume in this scenario that the SignalFormat being TMDS will always correspond to the regular Mini-DisplayPort connection and the SignalFormat being DisplayPort will always correspond to the physical regular DisplayPort connection on the card?

ConnectorType refers to the physical port type. There’s no special string defined for mini-DP, so those get reported as ConnectorType: DisplayPort too.

SignalFormat describes the electrical signaling going through the physical port. When you have paired outputs with the same ConnectorNumber like you do with DP-5 and DP-7, they’re referring to different signaling over the same port. In your case, DP-5 is used when a native DisplayPort device is connected to that physical DisplayPort connector, and DP-7 is used when a passive DP-to-DVI or DP-to-HDMI adapter is connected. In both cases, the physical connector type is still DisplayPort, but the electrical signaling protocol is different between the two.

Hi aplattner,

Thanks for the information and your response. With regards to my goal of being able to detect which number DP-x corresponds to which port: Will the ConnectorNumber of 4 always correspond to the mini-DP and the ConnectorNumber of 5 always correspond to the regular Displayport for this laptop model? Also, are the ConnectorNumber and _ConnectorLocation always equal to eachother?

Thanks

The ConnectorNumber values just allow you match up RandR outputs that are paired as part of physical connectors. The numbers don’t have any meaning other than that.

_ConnectorLocation is supposed to be an in-order listing of connectors from the top of the GPU board to the bottom, but I don’t know how reliable that information is.

For your specific laptop model, I don’t think numbers should ever change.