Bug 21127 - [945GT] LVDS wrongly detected as connected, monitor resolution incorrectly set
Summary: [945GT] LVDS wrongly detected as connected, monitor resolution incorrectly set
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: ykzhao
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-11 08:08 UTC by Markus
Modified: 2017-07-24 23:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg with drm.debug=1 after ignore LVDS patch (36.96 KB, text/plain)
2009-04-13 12:12 UTC, Markus
no flags Details
Xorg.0.log-nomodeset (103.93 KB, text/plain)
2009-06-11 08:02 UTC, Markus
no flags Details
xrandr-nomodeset (755 bytes, text/plain)
2009-06-11 08:02 UTC, Markus
no flags Details
Xorg.0.log-modeset (78.29 KB, text/plain)
2009-06-11 08:03 UTC, Markus
no flags Details
xrandr-modeset (622 bytes, text/plain)
2009-06-11 08:03 UTC, Markus
no flags Details
dmidecode (8.07 KB, text/plain)
2009-06-11 08:03 UTC, Markus
no flags Details
dmidecode-u (4.93 KB, text/plain)
2009-06-11 08:04 UTC, Markus
no flags Details
check the LID device to decide whether LVDS device should be initialized (4.16 KB, patch)
2009-06-16 01:42 UTC, ykzhao
no flags Details | Splinter Review
acpidump (93.68 KB, application/octet-stream)
2009-06-16 12:45 UTC, Markus
no flags Details
vbios.bin (64.00 KB, application/octet-stream)
2009-06-16 12:45 UTC, Markus
no flags Details
dmesg-after-patch (32.53 KB, text/plain)
2009-06-16 15:24 UTC, Markus
no flags Details
Xorg.0.log after patch (58.87 KB, text/plain)
2009-06-16 15:24 UTC, Markus
no flags Details

Description Markus 2009-04-11 08:08:43 UTC
Description of problem:
-----------------------
The TFT's native resolution is 1280x1024 but it runs at 1024x768 after boot.

The mainboard (Abit iL-90MV (Intel i945GT-ICH7m-DH)) has two connectors: Analog-VGA and HDMI. The TFT is connected to the HDMI connector via HDMI->DVI Adapter. The kernel lists the DVI _and_ LVDS connectors as connected, but it can not read the EDID data from LVDS (because it incorrectly detects the LVDS as connected?) It then sets the resolution to 1024x768, instead of the TFT's native resolution 1280x1024.

Operating System: Fedora 11 rawhide with kernel mode setting enabled.
Kernel: 2.6.29.1-54.fc11.i586
Xorg Intel driver: 2.6.99.902-2.fc11.i586

I've already filed a bug on the Redhat bugtracker, but I thought it would be appropriate to file a bug here, too?!

https://bugzilla.redhat.com/show_bug.cgi?id=493472 

I've posted debugging info (dmesg drm.debug=1, ...) there.

If you need more information just tell me what I should report.
Comment 1 Gordon Jin 2009-04-11 21:31:58 UTC
Before this is resolved, you could use workaround it by explicitly Ignore LVDS like http://bugs.freedesktop.org/show_bug.cgi?id=16757#c2.
Comment 2 Markus 2009-04-13 12:10:05 UTC
Thank you very much for the suggestion.

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
[...]

Is the "invalid" modeline a pointer to the origin of the bug?
Comment 3 Markus 2009-04-13 12:12:06 UTC
Created attachment 24768 [details]
dmesg with drm.debug=1 after ignore LVDS patch
Comment 4 Bernie Innocenti 2009-06-01 18:47:51 UTC
Similar issue on a Thinkpad X200s, but at least the panel resolution is correct:


1!bernie@giskard:~/src/kernel$ xrandr
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1440x900       50.0* 
DVI1 connected (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
DVI2 connected (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  

I don't even have those DVI1 and DVI2 connectors :-)

This happens on a Fedora 11 system:

bernie@giskard:~/src/kernel$ rpm -q xorg-x11-drv-intel kernel
xorg-x11-drv-intel-2.7.0-6.fc11.x86_64
kernel-2.6.29.4-162.fc11.x86_64
Comment 5 ykzhao 2009-06-08 19:59:07 UTC
Hi, Markus
    Will you please boot the system with kms disabled("nomodeset") and attach the output of Xorg.0.log?
   note: Please add the modedebug in the xorg.conf
   >Option "ModeDebug" "on"

    Will you please also attach the output of dmidecode, vbios dump?
    Thanks.
Comment 6 Markus 2009-06-11 08:02:28 UTC
Created attachment 26678 [details]
Xorg.0.log-nomodeset
Comment 7 Markus 2009-06-11 08:02:55 UTC
Created attachment 26679 [details]
xrandr-nomodeset
Comment 8 Markus 2009-06-11 08:03:20 UTC
Created attachment 26680 [details]
Xorg.0.log-modeset
Comment 9 Markus 2009-06-11 08:03:42 UTC
Created attachment 26681 [details]
xrandr-modeset
Comment 10 Markus 2009-06-11 08:03:59 UTC
Created attachment 26682 [details]
dmidecode
Comment 11 Markus 2009-06-11 08:04:19 UTC
Created attachment 26684 [details]
dmidecode-u
Comment 12 Markus 2009-06-11 08:10:10 UTC
I'm running Fedora 11 Release now, but the problem is still there.
 * kernel: 2.6.29.4-167.fc11.i586
 * intel driver: 2.7.0-7.fc11

I've attached some files, but I'm not sure know how to dump the VBIOS.

Without KMS the DVI Resolution gets detected correctly, but resolution stays at 1024x768. Probably because the LVDS connector is wrongly detected as connected.
Comment 13 ykzhao 2009-06-16 01:41:14 UTC
Will you please attach the output of acpidump?
     The latest acpidump tool(pmtools-20071116) can be found in
     http://www.lesswatts.org/projects/acpi/utilities.php
    Thanks.
Comment 14 ykzhao 2009-06-16 01:42:36 UTC
Created attachment 26832 [details] [review]
check the LID device to decide whether LVDS device should be initialized

Will you please try the attached patch and see whether it can work well for you?
    Thanks.
Comment 15 ykzhao 2009-06-16 01:46:52 UTC
(In reply to comment #12)
> I'm running Fedora 11 Release now, but the problem is still there.
>  * kernel: 2.6.29.4-167.fc11.i586
>  * intel driver: 2.7.0-7.fc11
> 
> I've attached some files, but I'm not sure know how to dump the VBIOS.
you can get the vbios dump by using the following commands:
   1. echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
   2. cat /sys/devices/pci0000:00/0000:00:02.0/rom > vbios.bin
   3. echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom
Thanks.
> 
> Without KMS the DVI Resolution gets detected correctly, but resolution stays at
> 1024x768. Probably because the LVDS connector is wrongly detected as connected.
> 

Comment 16 Markus 2009-06-16 12:45:19 UTC
Created attachment 26866 [details]
acpidump
Comment 17 Markus 2009-06-16 12:45:47 UTC
Created attachment 26867 [details]
vbios.bin
Comment 18 Markus 2009-06-16 15:23:53 UTC
I've tested the patch with kernel 2.6.29.4-167.fc11. The LVDS connector does not show up anymore. Very good, but...

$ xrandr 
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 338mm x 271mm
   1024x768       60.0* 
   800x600        60.3  
   640x480        60.0  
   720x400        70.1  
TV1 unknown connection (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9

...this mainboard has no TV connector either. :/

In dmesg appears (over and over):
[drm] TV-10: set mode NTSC 480i 0
[drm] TV-10: set mode NTSC 480i 0
[drm] TV-10: set mode NTSC 480i 0
[drm] TV-10: set mode NTSC 480i 0
[drm] TV-10: set mode NTSC 480i 0
[drm] TV-10: set mode NTSC 480i 0

And the resolution is still limited to a maximum of 1024x768 during boot and under X, too. The TFT's EDID gets detected correctly as shown in Xorg.log, but 1280x1024 does not show up. During boot and while starting X the display flickers as if something gets detected (I suppose)
Comment 19 Markus 2009-06-16 15:24:28 UTC
Created attachment 26868 [details]
dmesg-after-patch
Comment 20 Markus 2009-06-16 15:24:56 UTC
Created attachment 26869 [details]
Xorg.0.log after patch
Comment 21 ykzhao 2009-06-16 19:18:06 UTC
(In reply to comment #18)
> I've tested the patch with kernel 2.6.29.4-167.fc11. The LVDS connector does
> not show up anymore. Very good, but...
> 
> $ xrandr 
> Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
> VGA1 disconnected (normal left inverted right x axis y axis)
> DVI1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 338mm x
> 271mm
>    1024x768       60.0* 
>    800x600        60.3  
>    640x480        60.0  
>    720x400        70.1  
> TV1 unknown connection (normal left inverted right x axis y axis)
>    1024x768       60.0  
>    800x600        60.3  
>    640x480        59.9
> 
> ...this mainboard has no TV connector either. :/
Thanks for the test. Now the issue of LVDS detection is fixed.
But another issue about TV detection is remained. 

will you please check whether the TV is detected correctly in UMS mode?

Please also try the latest Eric's drm-intel-next git tree and see whether this issue still exists?

Thanks.

> 
> In dmesg appears (over and over):
> [drm] TV-10: set mode NTSC 480i 0
> [drm] TV-10: set mode NTSC 480i 0
> [drm] TV-10: set mode NTSC 480i 0
> [drm] TV-10: set mode NTSC 480i 0
> [drm] TV-10: set mode NTSC 480i 0
> [drm] TV-10: set mode NTSC 480i 0
> 
> And the resolution is still limited to a maximum of 1024x768 during boot and
> under X, too. The TFT's EDID gets detected correctly as shown in Xorg.log, but
> 1280x1024 does not show up. During boot and while starting X the display
> flickers as if something gets detected (I suppose)
> 

Comment 22 Eric Anholt 2009-07-10 14:43:29 UTC
Comment on attachment 26832 [details] [review]
check the LID device to decide whether LVDS device should be initialized

queued:

commit e99da35f060f9a3407f7def474a1df31f3b8643a
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Fri Jun 26 09:46:18 2009 +0800

    drm/i915: Check the LID device to decide whether the LVDS should be initialized
Comment 23 Michael Fu 2009-07-27 17:41:01 UTC
looks this bug should marked as fixed then.


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.