Bug 94277 - driver does not detect VGA monitor, but there is one
Summary: driver does not detect VGA monitor, but there is one
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/openchrome (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Openchrome development list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-24 08:51 UTC by Benno Schulenberg
Modified: 2019-09-18 20:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log with forcibly "detected" output (43.44 KB, text/plain)
2016-02-24 08:51 UTC, Benno Schulenberg
no flags Details
forces the monitor on the VGA port to be "detected" (482 bytes, patch)
2016-02-24 08:53 UTC, Benno Schulenberg
no flags Details | Splinter Review
Using I2C bus 2 to detect a VGA monitor (5.70 KB, patch)
2016-02-25 00:56 UTC, Kevin Brace
no flags Details | Splinter Review
Xorg.0.log of trying a VGA detect on I2C-2 too (26.07 KB, text/plain)
2016-02-25 08:55 UTC, Benno Schulenberg
no flags Details
Xorg.0.log of a boot with release candidate 0.5.900 (29.01 KB, text/plain)
2017-02-28 11:41 UTC, Benno Schulenberg
no flags Details

Description Benno Schulenberg 2016-02-24 08:51:26 UTC
Created attachment 121938 [details]
Xorg.0.log with forcibly "detected" output

Version 0.3.3 of the openchrome driver (or the one from git) does not detect any monitor being connected to the VGA port.  But it has a TFT monitor connected to it, that apparently does not have an EDID.  See below the snippet where it tries to detect the output.  Setting the option "ActiveDevice" to "CRT", or "VBEModes" to "True" doesn't help.

Attached is an Xorg.0.log where I have forced the output to being seen as connected, with the attached brute-force patch.  Then I get an image on the screen.  Things appear to work, but feel more sluggish than with the vesa driver, probably because there is no drm support in the kernel.

[    22.058] (II) CHROME(0): ViaOutputsDetect
[    22.058] (**) CHROME(0): Option "PanelSize" "1280x1024"
[    22.058] (==) CHROME(0): LVDS-0 : Digital output bus width is 12 bits.
[    22.058] (==) CHROME(0): LVDS-0 : DVI Center is disabled.
[    22.058] (==) CHROME(0): LVDS Panel will not be forced.
[    22.058] (II) CHROME(0): ViaPanelGetNativeModeFromOption
[    22.058] (**) CHROME(0): LVDS Panel mode index is 4
[    22.058] (**) CHROME(0): Selected Panel Size is 1280x1024
[    22.058] (II) CHROME(0): Entered via_analog_init.
[    22.059] (II) CHROME(0): Output VGA-1 using monitor section Panel
[    22.059] (II) CHROME(0): Exiting via_analog_init.
[    22.059] (II) CHROME(0): Entered via_tv_init.
[    22.059] (--) CHROME(0): Did not detect a TV encoder.
[    22.059] (II) CHROME(0): Exiting via_tv_init.
[    22.059] (II) CHROME(0): Entered via_dvi_init.
[    22.060] (--) CHROME(0): VT1632A not found on I2C Bus 2 or I2C Bus 3.
[    22.060] (II) CHROME(0): Exiting via_dvi_init.
[    22.060] (II) CHROME(0): I2C device "I2C Bus 1:ddc2" registered at address 0xA0.
[    22.067] (--) CHROME(0): Test for CRT with VSYNC
[    22.067] (II) CHROME(0): EDID for output VGA-1
[    22.067] (II) CHROME(0): Output VGA-1 disconnected
[    22.067] (WW) CHROME(0): No outputs definitely connected, trying again...
[    22.067] (II) CHROME(0): Output VGA-1 disconnected
[    22.067] (WW) CHROME(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[    22.067] (II) CHROME(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[    22.067] (**) CHROME(0): Display dimensions: (375, 300) mm
[    22.067] (**) CHROME(0): DPI set to (69, 65)
Comment 1 Benno Schulenberg 2016-02-24 08:53:00 UTC
Created attachment 121939 [details] [review]
forces the monitor on the VGA port to be "detected"

(Just to show what I changed in order to get output to the screen.)
Comment 2 Kevin Brace 2016-02-25 00:56:58 UTC
Created attachment 121955 [details] [review]
Using I2C bus 2 to detect a VGA monitor

Previously, it was assumed that only I2C bus 1 is used to detect a VGA
monitor. I2C bus 2 is typically used to detect a DVI monitor via a DVI
connector. However, for devices with a DVI-I connector, VGA signals come
out of the connector as well. What this means is that I2C bus 2 also has
to be used to detect a VGA monitor, in addition to I2C bus 1. Furthermore,
EDID obtained from the monitor via I2C bus will be used to determine whether
or not it is an analog type (i.e., VGA monitor).

Reported-by: Christopher <laserhawk64@gmail.com>
Tested-by: Justin Chevrier <jchevrier@gmail.com>
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Comment 3 Kevin Brace 2016-02-25 01:01:14 UTC
(In reply to Benno Schulenberg from comment #0)

Hi Benno,

> Created attachment 121938 [details]
> Xorg.0.log with forcibly "detected" output
> 
> Version 0.3.3 of the openchrome driver (or the one from git) does not detect
> any monitor being connected to the VGA port.  But it has a TFT monitor
> connected to it, that apparently does not have an EDID.  See below the
> snippet where it tries to detect the output.  Setting the option
> "ActiveDevice" to "CRT", or "VBEModes" to "True" doesn't help.
> 
> Attached is an Xorg.0.log where I have forced the output to being seen as
> connected, with the attached brute-force patch.  Then I get an image on the
> screen.  Things appear to work, but feel more sluggish than with the vesa
> driver, probably because there is no drm support in the kernel.
> 
> [    22.058] (II) CHROME(0): ViaOutputsDetect
> [    22.058] (**) CHROME(0): Option "PanelSize" "1280x1024"
> [    22.058] (==) CHROME(0): LVDS-0 : Digital output bus width is 12 bits.
> [    22.058] (==) CHROME(0): LVDS-0 : DVI Center is disabled.
> [    22.058] (==) CHROME(0): LVDS Panel will not be forced.
> [    22.058] (II) CHROME(0): ViaPanelGetNativeModeFromOption
> [    22.058] (**) CHROME(0): LVDS Panel mode index is 4
> [    22.058] (**) CHROME(0): Selected Panel Size is 1280x1024
> [    22.058] (II) CHROME(0): Entered via_analog_init.
> [    22.059] (II) CHROME(0): Output VGA-1 using monitor section Panel
> [    22.059] (II) CHROME(0): Exiting via_analog_init.
> [    22.059] (II) CHROME(0): Entered via_tv_init.
> [    22.059] (--) CHROME(0): Did not detect a TV encoder.
> [    22.059] (II) CHROME(0): Exiting via_tv_init.
> [    22.059] (II) CHROME(0): Entered via_dvi_init.
> [    22.060] (--) CHROME(0): VT1632A not found on I2C Bus 2 or I2C Bus 3.
> [    22.060] (II) CHROME(0): Exiting via_dvi_init.
> [    22.060] (II) CHROME(0): I2C device "I2C Bus 1:ddc2" registered at
> address 0xA0.
> [    22.067] (--) CHROME(0): Test for CRT with VSYNC
> [    22.067] (II) CHROME(0): EDID for output VGA-1
> [    22.067] (II) CHROME(0): Output VGA-1 disconnected
> [    22.067] (WW) CHROME(0): No outputs definitely connected, trying again...
> [    22.067] (II) CHROME(0): Output VGA-1 disconnected
> [    22.067] (WW) CHROME(0): Unable to find connected outputs - setting
> 1024x768 initial framebuffer
> [    22.067] (II) CHROME(0): Using default gamma of (1.0, 1.0, 1.0) unless
> otherwise stated.
> [    22.067] (**) CHROME(0): Display dimensions: (375, 300) mm
> [    22.067] (**) CHROME(0): DPI set to (69, 65)

I read the log, and I am starting to think that maybe the VGA connector's I2C bus is connected to I2C bus 2.
I just uploaded a patch I originally uploaded for Bug 91966.
If the patch works, then it confirms my hypothesis.
    Just to let you know, I also have a mainboard with KM400 chipset from Foxconn, and this one works fine with the current OpenChrome.
Of course, in that mainboard, I2C bus 1 is connected to the VGA connector.
Comment 4 Benno Schulenberg 2016-02-25 08:54:01 UTC
Hi Kevin,

(In reply to Kevin Brace from comment #3)
> I read the log, and I am starting to think that maybe the VGA connector's
> I2C bus is connected to I2C bus 2.
> I just uploaded a patch I originally uploaded for Bug 91966.
> If the patch works, then it confirms my hypothesis.

After reverting my "patch", appllying yours, making, installing, and rebooting...  Alas, no luck.  Still no picture.  :(  Full log is attached.  Here the relevant fragment:

[    22.848] (--) CHROME(0): Probing for a VGA monitor on I2C Bus 1.
[    22.848] (II) CHROME(0): I2C device "I2C Bus 1:ddc2" registered at address 0xA0.
[    22.855] (--) CHROME(0): Probing for a VGA monitor on I2C Bus 2.
[    22.855] (II) CHROME(0): I2C device "I2C Bus 2:ddc2" registered at address 0xA0.
[    22.858] (--) CHROME(0): Did not detect a VGA monitor on I2C Bus 1 or I2C Bus 2.
[    22.858] (--) CHROME(0): Now perform manual detection of a VGA monitor.
[    22.858] (II) CHROME(0): EDID for output VGA-1
[    22.858] (II) CHROME(0): Output VGA-1 disconnected
[    22.858] (WW) CHROME(0): No outputs definitely connected, trying again...
[    22.858] (II) CHROME(0): Output VGA-1 disconnected
[    22.858] (WW) CHROME(0): Unable to find connected outputs
Comment 5 Benno Schulenberg 2016-02-25 08:55:36 UTC
Created attachment 121958 [details]
Xorg.0.log of trying a VGA detect on I2C-2 too
Comment 6 Kevin Brace 2016-02-29 05:28:57 UTC
(In reply to Benno Schulenberg from comment #4)

Hi Benno,

> Hi Kevin,
> 
> After reverting my "patch", appllying yours, making, installing, and
> rebooting...  Alas, no luck.  Still no picture.  :(  Full log is attached. 
> Here the relevant fragment:
> 
> [    22.848] (--) CHROME(0): Probing for a VGA monitor on I2C Bus 1.
> [    22.848] (II) CHROME(0): I2C device "I2C Bus 1:ddc2" registered at
> address 0xA0.
> [    22.855] (--) CHROME(0): Probing for a VGA monitor on I2C Bus 2.
> [    22.855] (II) CHROME(0): I2C device "I2C Bus 2:ddc2" registered at
> address 0xA0.
> [    22.858] (--) CHROME(0): Did not detect a VGA monitor on I2C Bus 1 or
> I2C Bus 2.
> [    22.858] (--) CHROME(0): Now perform manual detection of a VGA monitor.
> [    22.858] (II) CHROME(0): EDID for output VGA-1
> [    22.858] (II) CHROME(0): Output VGA-1 disconnected
> [    22.858] (WW) CHROME(0): No outputs definitely connected, trying again...
> [    22.858] (II) CHROME(0): Output VGA-1 disconnected
> [    22.858] (WW) CHROME(0): Unable to find connected outputs

I hope you don't take the "reverting" part too personally.
The patch I uploaded that you tried was create before this bug report was filed, and it was really meant for Bug 91966.
I have seen the developer for r128 (ATI Technologies Rage 128 based graphics) change his code to activate VGA even if it was not detected via I2C bug.

https://cgit.freedesktop.org/xorg/driver/xf86-video-r128/commit/?id=562681414f38c6925da01b3fec0802f532cd9e53

Perhaps, I can change the code to remove manual VGA detection code, and just assume that a VGA monitor exists even if VGA monitor was not detected via I2C buses.
How do you think?
Comment 7 Kevin Brace 2016-02-29 05:38:34 UTC
Hi Benno,

Several more thoughts on what is going on with your particular system.
Do you own another monitor with a VGA input?
Whether we like it or not, there are some VGA monitors where the I2C bus fail after some years due to component degradation.
If you have another monitor, you may want to try that one.
At my place, I did encounter one VGA monitor that behaves erratically with OpenChrome's I2C bus detection.
It was manufactured by a company I have never heard of, and xserver does not seem to like it (i.e., EDID related API call fails).
    Second possibility can be a faulty cable.
If you have another VGA cable, you may want to try that one.
    Third possibility can be the mainboard's component degradation, although this is rather unlikely.
That being said, connector pins do get dirty over time, so if you are able to "clean" them, it might help you if that really is the cause (somewhat unlikely in this case).
VGA connector's pins are very hard to clean due to the way the connector is constructed.
Comment 8 Benno Schulenberg 2016-02-29 08:49:34 UTC
Hi Kevin,

No problems with the "reverting" part.  :)  It was just to see whether it would work.

(In reply to Kevin Brace from comment #6)
> Perhaps, I can change the code to remove manual VGA detection code, and just
> assume that a VGA monitor exists even if VGA monitor was not detected via
> I2C buses.

I wouldn't remove any detecttion code -- it's always nice to actually detect something, if possible, and to see in the log that it /was/ detected.  But indeed, when in the end nothing at all can be detected, simply enabling the VGA output as a fallback seems like a sensible idea.  Especially since there apparently exist faulty I2C busses and degraded monitors. (That is: /if/ this cannot damage the chip in any way when in fact there is nothing at all VGA-like connected to the chip's pins.)

One other little I'd change is this line:

> > [    22.858] (II) CHROME(0): EDID for output VGA-1

Don't print that line unless actually an EDID was found, or at least change the wording to something like: "Looking for an EDID for output VGA-1...".

Sorry, no, I don't have any other monitor or cable available.  I did unplug and replug the cable -- it appears to be in good shape.  On both sides pin 9 is missing, though, which is supposed to be +5V.  Would that prevent the I2C bus from working?
Comment 9 Kevin Brace 2016-03-05 04:28:41 UTC
(In reply to Benno Schulenberg from comment #8)
> 

Hi Benno,

> I wouldn't remove any detecttion code -- it's always nice to actually detect
> something, if possible, and to see in the log that it /was/ detected.  But
> indeed, when in the end nothing at all can be detected, simply enabling the
> VGA output as a fallback seems like a sensible idea.  Especially since there
> apparently exist faulty I2C busses and degraded monitors. (That is: /if/
> this cannot damage the chip in any way when in fact there is nothing at all
> VGA-like connected to the chip's pins.)
> 
> One other little I'd change is this line:
> 
> > > [    22.858] (II) CHROME(0): EDID for output VGA-1
> 
> Don't print that line unless actually an EDID was found, or at least change
> the wording to something like: "Looking for an EDID for output VGA-1...".
> 

I could be wrong on this, but my view is that the above message is generated by X Server, and not by OpenChrome itself.
Comment 10 Kevin Brace 2016-03-24 07:00:13 UTC
Hi Benno,

I will keep this bug report open for a while.
I will ultimately like to give a fix to this bug, but it will be worked on after some of the rewriting of the DVI / LVDS flat panel code is complete.
Thanks for your understanding, and I will definitely revisit the bug in the future.
Comment 11 Kevin Brace 2017-02-28 08:55:22 UTC
Hi Benno,

I tested fairly recent OpenChrome with a KN400 or KN400A chipset laptop, and analog VGA is working fine along with the laptop flat panel.
I suspect this is a hardware problem on your side, and not an OpenChrome bug.
Comment 12 Kevin Brace 2017-02-28 08:56:37 UTC
I have also tested OpenChrome with an ASUS mainboard that came inside HP Pavilion PC, and analog VGA worked fine as well.
Comment 13 Benno Schulenberg 2017-02-28 11:40:05 UTC
It is an openchrome bug.  When I connect the TFT monitor with the very same VGA cable to my laptop, and boot it, the monitor is somehow detected: it works.  Below is the essential diff between a boot without and a boot /with/ the TFT monitor connected.

@@ -97,6 +97,7 @@
 (II) intel(0): Output VIRTUAL1 has no monitor section
 (II) intel(0): Enabled output VIRTUAL1
 (--) intel(0): Output LVDS1 using initial mode 1024x600 on pipe 1
+(--) intel(0): Output VGA1 using initial mode 1024x768 on pipe 0
 (==) intel(0): TearFree disabled
 (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
 (==) intel(0): DPI set to (96, 96)
@@ -136,9 +137,10 @@
 (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
 (II) AIGLX: Loaded and initialized i915
 (II) GLX: Initialized DRI2 GL provider for screen 0
+(II) intel(0): switch to mode 1024x768@60.0 on VGA1 using pipe 0, position (0, 0), rotation normal, reflection none
 (II) intel(0): switch to mode 1024x600@60.0 on LVDS1 using pipe 1, position (0, 0), rotation normal, reflection none
-(II) intel(0): Setting screen physical size to 270 x 158
+(II) intel(0): Setting screen physical size to 270 x 203
 (**) Power Button: Applying InputClass "evdev keyboard catchall"
 (**) Power Button: Applying InputClass "libinput keyboard catchall"
 (**) Power Button: Applying InputClass "system-keyboard"

So my laptop is able to "see" the monitor, or at least: it sees that something is connected to its VGA output connector.  Now, it may be that the hardware of my openchrome box is somehow deficient or partially broken (although that is quite unlikely, as you said), but that shouldn't matter at all.  If the driver would just default to enabling VGA output when it cannot detect *anything*, then this problem would be solved.

Modern hardware should be detectable, sure.  But old hardware...  Better be lenient and forgiving and provide a sane default: enable VGA when unable to detect any screen.
Comment 14 Benno Schulenberg 2017-02-28 11:41:50 UTC
Created attachment 129983 [details]
Xorg.0.log of a boot with release candidate 0.5.900
Comment 15 GitLab Migration User 2019-09-18 20:49:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/openchrome/old-bug-database/issues/16.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.