Bug 208647 - x11/xrandr standardizing video output names
Summary: x11/xrandr standardizing video output names
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-09 07:02 UTC by sid
Modified: 2019-01-29 08:27 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sid 2016-04-09 07:02:46 UTC
Running xrandr gives a slight variant on output names, depending on whether an ATI or Nvidia video card is used. It was suggested that I file a bug for this.

One example of an output given is LVDS0, VGA0, HDMI0, and DP0 compared to LVDS-0, VGA-0, HDMI-0, and DP-0. You can also see the examples of the two differences in the handbook https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html section 5.4.6 . This report is for the xrandr program output to be standardized, not the handbook. Thank you.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-01-27 07:06:01 UTC
Can someone from x11@ provide some quick feedback here?

I always assumed the the connector names are determined by the graphics drivers,
so there is nothing to fix in xrandr for us here.  Even if we wanted to we also 
cannot really change how the NVIDIA driver works.
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2019-01-27 09:20:29 UTC
Connector names are indeed set in the drm drivers and can be anything.
I suggest we close this bug as 'Not a bug'
I'll do it in a few days if nobody for x11 do it.
Comment 3 Niclas Zeising freebsd_committer freebsd_triage 2019-01-27 09:55:34 UTC
As pointed out, connector names are set by hardware, this is nothing that can be changed in xrandr.  Closing this, as it's not a bug.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2019-01-28 20:37:32 UTC
(In reply to Emmanuel Vadot from comment #2)
> Connector names are indeed set in the drm drivers and can be anything.

Including - (hyphen)? RANDR appears to get output from DDX which concatenates connector_type and connector_type_id. Wayland compositor does something similar.

For example:

  # xf86-video-intel by default
  $ xrandr
  Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
  DP1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
  [...]
  HDMI1 disconnected (normal left inverted right x axis y axis)
  HDMI2 disconnected (normal left inverted right x axis y axis)
  HDMI3 disconnected (normal left inverted right x axis y axis)
  VIRTUAL1 disconnected (normal left inverted right x axis y axis)

  # xf86-video-intel patched to add hyphen
  $ xrandr
  Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
  DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
  [...]
  HDMI-1 disconnected (normal left inverted right x axis y axis)
  HDMI-2 disconnected (normal left inverted right x axis y axis)
  HDMI-3 disconnected (normal left inverted right x axis y axis)
  VIRTUAL1 disconnected (normal left inverted right x axis y axis)

  # wlroots by default
  $ swaymsg -t get_outputs
  Output DP-1 'Goldstar Company Ltd LG Ultra HD 0x0000C784' (focused)
    Current mode: 3840x2160 @ 60.000000 Hz
    Position: 0,0
    Scale factor: 1.000000
    Transform: normal
    Workspace: 1
    Available modes:
    [...]

  # wlroots patched to remove hyphen
  $ swaymsg -t get_outputs
  Output DP1 'Goldstar Company Ltd LG Ultra HD 0x0000C784' (focused)
    Current mode: 3840x2160 @ 60.000000 Hz
    Position: 0,0
    Scale factor: 1.000000
    Transform: normal
    Workspace: 1
    Available modes:
    [...]
Comment 5 Jan Beich freebsd_committer freebsd_triage 2019-01-28 21:26:56 UTC
Also, DisplayPort connector type mentioned in the handbook got renamed to DP. Current drm_connector.c and nvkms-api-types.h agree on DP.

https://github.com/torvalds/linux/commit/e76116ca9671
Comment 6 Johannes Lundberg 2019-01-29 08:05:24 UTC
modesetting ddx also uses hyphen, similar as wlroots (and Weston, iirc). Is there a standard anybody know of? At a glance, it seems intel ddx is the odd one...
Comment 7 Emmanuel Vadot freebsd_committer freebsd_triage 2019-01-29 08:27:02 UTC
Drivers are supposed to use drm_connector_init which concatenate the type with the id (see https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/drm_connector.c#L235)
But if you use, in userland, drm_mode_getconnector IOCTL you don't have the name, just the type and id.
The connector name is mainly used for cmdline parsing, so it would seems normal to me that userland program uses the same name (i.e: with the hyphen).
With modesetting on intel I have the hyphen. It seems that the problem is in xf86-video-intel.