Bug 493472

Summary: [945GM] KMS: LVDS wrongly detected as connected, DVI monitor resolution incorrectly set
Product: [Fedora] Fedora Reporter: Markus B. <markusthe3rd>
Component: kernelAssignee: Kristian Høgsberg <krh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: airlied, bookreviewer, dcantrell, fedora, kernel-maint, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-21 22:12:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 473303    
Attachments:
Description Flags
dmesg
none
lspci -vv
none
monitor-edid
none
xrandr
none
Xorg.0.log
none
dmesg with drm.debug=1
none
dmesg with drm.debug=1 after ignore LVDS patch
none
Xorg.0.log on boot none

Description Markus B. 2009-04-01 20:52:25 UTC
Description of problem:
-----------------------
The TFT's native resolution is 1280x1024 but it runs at 1024x768 after boot. The kernel reports "i915 0000:00:02.0: LVDS-1: no EDID data". The command monitor-edid reports the EDID data correctly. The maximum resolution reported by xrandr is 1024x768.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
Linux noname 2.6.29-0.258.2.3.rc8.git2.fc11.i586 #1 SMP Tue Mar 24 18:37:23 EDT 2009 i686 i686 i386 GNU/Linux

Actual results:
---------------
Resolution is set to 1024x768

Expected results:
-----------------
Resolution is set to 1280x1024

Additional info:
----------------
On Fedora 10 the resolution after boot was 1024x768, too. I had to invoke xrandr to switch the resolution to 1280x1080 after login.

Comment 1 Markus B. 2009-04-01 20:53:39 UTC
Created attachment 337658 [details]
dmesg

Comment 2 Markus B. 2009-04-01 20:54:13 UTC
Created attachment 337659 [details]
lspci -vv

Comment 3 Markus B. 2009-04-01 20:54:39 UTC
Created attachment 337660 [details]
monitor-edid

Comment 4 Markus B. 2009-04-01 20:55:09 UTC
Created attachment 337661 [details]
xrandr

Comment 5 Markus B. 2009-04-08 16:35:30 UTC
Created attachment 338751 [details]
Xorg.0.log

Comment 6 Markus B. 2009-04-08 16:40:20 UTC
(In reply to comment #0)
Problem remains after upgrade to the latest rawhide kernel "Linux localhost.localdomain 2.6.29.1-52.fc11.i586 #1 SMP Mon Apr 6 03:25:10 EDT 2009 i686 i686 i386 GNU/Linux"

Comment 7 Markus B. 2009-04-09 20:19:42 UTC
The mainboard has two connectors: Analog-VGA and HDMI. The TFT is connected via HDMI->DVI Adapter. The kernel lists four connectors: VGA, LVDS, DVI, TV. LVDS _and_ DVI are listed as connected:

[drm:drm_enable_connectors] connector 7 enabled? yes
[drm:drm_enable_connectors] connector 10 enabled? yes

The kernel tries to read EDID data from LVDS, but is not able to read the data. (Because it is not connected and the kernel only thinks it was connected?)

[drm:drm_helper_probe_single_connector_modes] LVDS-1
i2c-adapter i2c-1: unable to read EDID block.
i915 0000:00:02.0: LVDS-1: no EDID data

Then the kernel checks the DVI connector, but prunes an invalid mode 27?!

[drm:drm_helper_probe_single_connector_modes] DVI-D-1
[drm:intel_sdvo_detect] SDVO response 1 0
[drm:drm_mode_debug_printmodeline] Modeline 27:"0x0" 0 0 0 0 0 0 0 0 0 0 0x0 0x0
[drm:drm_mode_prune_invalid] Not using 0x0 mode 16
[drm:drm_helper_probe_single_connector_modes] Probed modes for DVI-D-1
[drm:drm_mode_debug_printmodeline] Modeline 26:"1024x768" 60003 65000 1024 1048 
1184 1344 768 771 777 806 0x40 0xa
[...]

Then it lists the preferred modes of both connectors:

[drm:drm_target_preferred] looking for preferred mode on connector 7
[drm:drm_target_preferred] found mode 1024x768
[drm:drm_target_preferred] looking for preferred mode on connector 10
[drm:drm_target_preferred] found mode 1024x768

This should be one(?) connector and preferred mode "1280x1024".

I hope somebody with more insight than me could look at this. I will provide more information on request.

Comment 8 Markus B. 2009-04-09 20:20:32 UTC
Created attachment 338991 [details]
dmesg with drm.debug=1

Comment 9 Markus B. 2009-04-14 21:35:16 UTC
I have added my board to the lvds quirk list in intel-lvds.c and then I
recompiled the Fedora rawhide kernel, hoping this could solve the problem.

-----
diff -uNrp kernel-2.6.29.orig/drivers/gpu/drm/i915/intel_lvds.c
kernel-2.6.29.new/drivers/gpu/drm/i915/intel_lvds.c
--- kernel-2.6.29.orig/drivers/gpu/drm/i915/intel_lvds.c        2009-04-12
20:25:54.327203301 +0200
+++ kernel-2.6.29.new/drivers/gpu/drm/i915/intel_lvds.c 2009-04-13
00:25:06.549684527 +0200
@@ -424,6 +424,14 @@ static const struct dmi_system_id __init
                        DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"),
                },
        },
+       {
+               .callback = intel_no_lvds_dmi_callback,
+               .ident = "Abit iL-90MV",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
+                       DMI_MATCH(DMI_BOARD_NAME, "iL-90MV(Intel
i945GT-ICH7m-DH)"),
+               },
+       },

        /* FIXME: add a check for the Aopen Mini PC */
-----

After this change LVDS does not show up, but the DVI resolution is still
1024x768 :/

1280x1024 works under X if I add a custom modeline with xrandr:

$ xrandr --newmode 1280x1024 108 1280 1328 1440 1688 1024 1025 1028 1066 +HSync
+VSync
$ xrandr --addmode DVI1 1280x1024
$ xrandr --output DVI1 --mode 1280x1024

but the Linux console still runs at 1024x768 and on startup the modes get
changed which is not as pretty as it could be.

I have attached the dmesg output after boot with drm.debug=1.

1280x1024 does not get listed under the probed modes for DVI-D-1:

[drm:drm_mode_debug_printmodeline] Modeline 23:"0x0" 0 0 0 0 0 0 0 0 0 0 0x0
0x0
[drm:drm_mode_prune_invalid] Not using 0x0 mode 16
[drm:drm_helper_probe_single_connector_modes] Probed modes for DVI-D-1
[drm:drm_mode_debug_printmodeline] Modeline 22:"1024x768" 60003 65000 1024 1048
1184 1344 768 771 777 806 0x40 0xa
[...]

Comment 10 Markus B. 2009-04-14 21:36:00 UTC
Created attachment 339586 [details]
dmesg with drm.debug=1 after ignore LVDS patch

Comment 11 Ben Boeckel 2009-04-18 05:32:42 UTC
I have a similar issue. I have VGA and DVI outputs on the motherboard (Intel GMA X4500HD). I only have VGA hooked up, but DVI is detected as connected and forces 1024x768 resolution for the VGA (which supports 1440x900). I'll attach Xorg.0.log.

Comment 12 Ben Boeckel 2009-04-18 05:34:11 UTC
Created attachment 340126 [details]
Xorg.0.log on boot

There is no cable connected to the DVI port. VGA modelines detected correctly.

Comment 13 Ben Boeckel 2009-04-18 05:35:27 UTC
Versions:

kernel-2.6.29.1-70.fc11.x86_64
xorg-x11-drv-intel-2.6.99.902-3.fc11.x86_64
xorg-x11-server-Xorg-1.6.1-1.fc11.x86_64
xorg-x11-server-common-1.6.1-1.fc11.x86_64

Comment 14 Bug Zapper 2009-06-09 13:01:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Danny Yee 2009-06-13 08:20:53 UTC
I think I have the same problem.  Fedora 11 with updates to 2009 June 06.

I have a motherboard (Asus P5Q-VM) with X4500 onboard graphics, driving a 1920x1200 monitor (with VGA and DVI, but I'm using VGA).  It worked fine in Fedora 10, but after upgrading to Fedora 11 running X drops be into 1024x768 (or something like that).

Running system-config-display locks up the display (including the virtual consoles).

Comment 16 Warren Togami 2009-06-16 18:51:38 UTC
> I have a motherboard (Asus P5Q-VM) with X4500 onboard graphics, driving a
> 1920x1200 monitor (with VGA and DVI, but I'm using VGA).  It worked fine in
> Fedora 10, but after upgrading to Fedora 11 running X drops be into 1024x768
> (or something like that).

It worked in Fedora 10 because it didn't have working KMS for intel.  The KMS code isn't parsing the BIOS tables properly to detect if the LVDS is connected.  UMS (within X itself) was doing the right thing prior.

http://bugs.freedesktop.org/show_bug.cgi?id=21496
Here is the upstream bug.

krh said to put this on the F12Blocker list.

Comment 17 Ben Boeckel 2009-07-07 02:05:26 UTC
Ping? Any progress on this? Does the .30 kernel help fix this?

Comment 18 Ben Boeckel 2009-07-29 23:56:03 UTC
I got a DVI cable finally today and I think I've discovered something. There seems to be an internal DVI connection that doesn't actually exist yet reports modelines with a max of 1024x768. KDM/KDE sees this and puts all (1) monitors at this resolution. Is there a way to distinguish real ports from...whatever the ghost port is?

Comment 19 Markus B. 2009-10-21 17:09:11 UTC
The problem is solved _for me_ in Fedora 12 beta. The monitor detection works as expected now.

Comment 20 Jesse Keating 2009-10-21 22:12:16 UTC
Closing as per comment #19

Comment 21 Ben Boeckel 2009-10-21 22:45:31 UTC
I can confirm, works here now. Thanks.