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, kernel-maint, mathstuf, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-21 18:12:16 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 473303    
Description Flags
lspci -vv
dmesg with drm.debug=1
dmesg with drm.debug=1 after ignore LVDS patch
Xorg.0.log on boot none

Description Markus B. 2009-04-01 16:52:25 EDT
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- #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 16:53:39 EDT
Created attachment 337658 [details]
Comment 2 Markus B. 2009-04-01 16:54:13 EDT
Created attachment 337659 [details]
lspci -vv
Comment 3 Markus B. 2009-04-01 16:54:39 EDT
Created attachment 337660 [details]
Comment 4 Markus B. 2009-04-01 16:55:09 EDT
Created attachment 337661 [details]
Comment 5 Markus B. 2009-04-08 12:35:30 EDT
Created attachment 338751 [details]
Comment 6 Markus B. 2009-04-08 12:40:20 EDT
(In reply to comment #0)
Problem remains after upgrade to the latest rawhide kernel "Linux localhost.localdomain #1 SMP Mon Apr 6 03:25:10 EDT 2009 i686 i686 i386 GNU/Linux"
Comment 7 Markus B. 2009-04-09 16:19:42 EDT
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 16:20:32 EDT
Created attachment 338991 [details]
dmesg with drm.debug=1
Comment 9 Markus B. 2009-04-14 17:35:16 EDT
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.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
+               },
+       },

        /* 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
$ 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
[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 17:36:00 EDT
Created attachment 339586 [details]
dmesg with drm.debug=1 after ignore LVDS patch
Comment 11 Ben Boeckel 2009-04-18 01:32:42 EDT
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 01:34:11 EDT
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 01:35:27 EDT

Comment 14 Bug Zapper 2009-06-09 09:01:29 EDT
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:
Comment 15 Danny Yee 2009-06-13 04:20:53 EDT
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 14:51:38 EDT
> 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.

Here is the upstream bug.

krh said to put this on the F12Blocker list.
Comment 17 Ben Boeckel 2009-07-06 22:05:26 EDT
Ping? Any progress on this? Does the .30 kernel help fix this?
Comment 18 Ben Boeckel 2009-07-29 19:56:03 EDT
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 13:09:11 EDT
The problem is solved _for me_ in Fedora 12 beta. The monitor detection works as expected now.
Comment 20 Jesse Keating 2009-10-21 18:12:16 EDT
Closing as per comment #19
Comment 21 Ben Boeckel 2009-10-21 18:45:31 EDT
I can confirm, works here now. Thanks.