I want to force video to HDMI, and disable the vga input via KMS. Archwiki[kms] tells me that I can use the following shell-oneliner to get the name and current status of connectors:
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
That command only returns the vga connection status VGA-1: coneected ], even though there is an HDMI connection present
Why is the status of the HDMI connector not reported?
The machine is a Dell optiplex 3010, equipped with an onboard vga and hdmi connector.
I am running Leap 15.1, updated current as of 2019/09/27
Ultimately I am aiming for HTPC use:
I want to be able to have a TV as the primary display (via HDMI), and if the display is turned off when the machine reboots or suspends, then the display should NOT automatically switch to the vga port
I haven’t had a chance to test the following command-line kernel parameters yet, but am concerned that the OS cannot even detect the HDMI port
Is something attached to a VGA connector?
Set needed display as primary.
You can disable screen or video output which you don’t need in a screen settings.
Set it as primary? The OS cannot detect the HDMI port, whether there is something connected to vga or not. There is only one recognized display option; there is nothing else to set as primary.
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
Should return all available connections, and their status. example output:
Is there anything in Optiplex 3010 BIOS setup affecting graphics connectors? All my (older Optiplex) have only radio buttons for Auto (onboard) vs. Onboard/Card (PEG preferred/onboard disabled if PEG present).
IME, Dell’s Optiplex BIOS since their switch from plain text mode to GUI mode are simply inept WRT video connectivity. Mine are older than yours, with VGA and DP ouputs instead of VGA and HDMI. My (Acer 2560x1440, Dell 2560x1080 & NEC 1920x1200) displays simply will not operate connected to an Optiplex 760, 780 or 790 digital output unless connected and powered-up during POST. I can switch DP cables among any of my displays at the Optiplex output, and all will go shortly into power save mode, unless one is connected and on at Optiplex power-up.
I suggest if HDMI output is absent after powering up the Optiplex with a powered-on HDMI connection and no VGA connection that you look for a BIOS upgrade. If there isn’t one, or no newer one, try a BIOS reset via motherboard jumper strictly according to the 3010 manual (preferably while the HDMI port has a connected and powered-up display, and there is no cable connected to the VGA output, if the manual’s BIOS reset instruction allows it).
New as a 3010 is, I doubt this would apply, but if nothing else helps, I’d check the motherboard and power supply for obviously bad caps.
Also IME, if something happens to get a display stuck in power save mode while a GUI mode is “active” (even if asleep or in screensaver), it might be correctable via Ctrl-Alt-Fn followed by Atl-F7. If that doesn’t work, only the power switch, CAD or a blindly typed restart or shutdown execution will escape it.
When I want to use dual displays, I use a PC or graphics card with multiple digital outputs. VGA output while in dual display mode with my Optiplexes is pretty raunchy compared to digital output, while digital is quite good, as long as VGA output is not connected, and digital display output is connected and powered- up at POST.
I am under the impression that the hardware is behaving as it should. Powering up the PC with an HDMI cable plugged-in displays post as expected. I lose HDMI connectivity after grub, unless I nomodeset. As a result, I had ruled out bios reset (or upgrade), but it would be a useful check.
The fact that the HDMI connector seems to NEED to have a powered-on display during post works completely against what I am going for…
Regarding using a graphics card for dual display, well I am not after dual display at all, but a discrete card (r5 340) offers dvi, and so works the way I want on another 3010, so I suppose I’ll have to accept this as a hardware limitation, grab a similar cheap card and be done with this silliness.
I appreciate the input mrmazda.
FWIW, My laptop (Inspiron) reports it’s HDMI as expected, but the r5-340 only reports the DVI and VGA.
cyril@kodi12:~> for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
DP-1: disconnected
DVI-I-1: connected
cyril@kodi12:~> exit
logout
Connection to kodi12 closed.
cyril@n9ne:~> for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
DP-1: disconnected
HDMI-A-1: disconnected
LVDS-1: connected
VGA-1: disconnected
FWIW, I use an easier way to remember to find out about graphics connections:
# xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x44; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 2; outputs: 3; associated providers: 0; name: modesetting
output VGA-1
output HDMI-1
output DP-1
# xrandr | egrep 'onnect|creen|\*' | sort -r
VGA-1 connected 2560x1080+0+0 (normal left inverted right x axis y axis) 673mm x 284mm
Screen 0: minimum 320 x 200, current 2560 x 2520, maximum 8192 x 8192
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 2560x1440+0+1080 (normal left inverted right x axis y axis) 598mm x 336mm
2560x1440 59.95*+ 74.92
2560x1080 60.00*+
# inxi -V | head -n1
inxi 3.0.36-00 (2019-08-14)
# inxi -GxxSMza
System: Host: gx780 Kernel: 4.12.14-lp151.28.7-default x86_64 bits: 64 compiler: gcc v: 7.4.0
parameters: root=LABEL=13os151 ipv6.disable=1 net.ifnames=0 noresume consoleblank=0 mitigations=auto vga=791
video=1024x768@60 video=1440x900@60 3
Desktop: KDE 3.5.10 tk: Qt 3.3.8c wm: kwin dm: startx Distro: openSUSE Leap 15.1
Machine: Type: Desktop System: Dell product: OptiPlex 780 v: N/A serial: <filter> Chassis: type: 15 serial: <filter>
Mobo: Dell model: 03NVJ6 v: A01 serial: <filter> BIOS: Dell v: A15 date: 08/06/2013
Graphics: Device-1: Intel 4 Series Integrated Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:2e12
Display: server: X.Org 1.20.3 driver: modesetting unloaded: fbdev,vesa alternate: intel
resolution: 2560x1080~60Hz, 2560x1440~60Hz
OpenGL: renderer: Mesa DRI Intel Q45/Q43 v: 2.1 Mesa 18.3.2 direct render: Yes
Contrary to what the above shows, output on VGA-1 isn’t happening in X. Instead, it’s showing the framebuffer from which startx was run, and goes live again only in exit from startx. Result is same if I use a 1920x1200 display instead of 2560x1080. If instead of startx I systemctl isolate graphical, both displays go black until Ctrl-Alt-F[1-6], which IMO, is another manifestation of fubar Dell BIOS, and is not anything I’ve ever experienced using AMD or NVidia GPUs. The Optiplex 780 setup guide’s video section specifies “connecting ‘the monitor’ using only one [pictured] video cable”, which implies only one video port is to be used at a time. It also reports the PCIe slot is disabled if a display is connected using the DisplayPort. The service manual reports a PCIe card is available to provide a DVI port to enable dual-monitor support. Later it states the PCIe “slot is disabled when a display is connected to the integrated video connector”. (emphasis supplied)