Bug 22778

Summary: "0x0" mode in xrandr mode list with KMS
Product: xorg Reporter: Bryce Harrington <bryce>
Component: Driver/intelAssignee: ykzhao <yakui.zhao>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: freedesktop.org
Version: 7.4 (2008.09)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
XorgConf.txt
none
XorgLog.txt
none
Xrandr.txt
none
xdpyinfo.txt
none
Xorg.0.log on Karmic with KMS disabled
none
dmesg with drm.debug=0x6
none
Xorg.log with drm.debug=0x6
none
dmesg with drm.debug=0x6 on the 'next tree'
none
Xorg.log with drm.debug=0x6 on the 'next tree'
none
dmesg with drm.debug=0x6 and CONFIG_DRM=y on the 'next tree'
none
Xorg.log with drm.debug=0x6 and CONFIG_DRM=y on the 'next tree'
none
add the detailed mode debug info related with the output
none
dmesg with drm.debug=0x6 and CONFIG_DRM[_I915]=y on the 'next tree'
none
Xorg.log with mode_debug patch on the 'next tree' none

Description Bryce Harrington 2009-07-14 23:26:39 UTC
Created attachment 27714 [details]
dmesg

Forwarding this bug from Ubuntu reporter Andreas Schildbach:
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/398188

[Problem]
On Karmic with KMS enabled, xrandr lists a mode with no resolution and no hsync:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1968, maximum 2048 x 2048
VGA1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200 60.0*+
   1280x1024 75.0
   1024x768 75.1 60.0
   800x600 75.0 60.3
   640x480 75.0 60.0
   720x400 70.1
LVDS1 connected 1280x768+349+1200 (normal left inverted right x axis y axis) 264mm x 159mm
   1280x768 59.9*+
   800x600 60.3
   640x480 59.9
   0x0 0.0
TV1 disconnected (normal left inverted right x axis y axis)

This feels weird. Note that there used to be a 1024x768 mode detected on LVDS1, so maybe the 0x0 mode is a remnant of this.

ProblemType: Bug
Architecture: i386
Date: Sat Jul 11 17:06:57 2009
DistroRelease: Ubuntu 9.10
MachineType: Dell Inc. Latitude X1
Package: xserver-xorg-video-intel 2:2.7.99.901+git20090702.74227141-0ubuntu1
ProcCmdLine: root=UUID=b17e1aff-9f02-4fbd-81e5-9b1e6899baad ro quiet splash
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-2.17-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu5
 libgl1-mesa-glx 7.5~rc4-1ubuntu3
 libdrm2 2.4.11-1ubuntu1
 xserver-xorg-video-intel 2:2.7.99.901+git20090702.74227141-0ubuntu1
 xserver-xorg-video-ati 1:6.12.99+git20090629.f39cafc5-0ubuntu1
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.31-2-generic i686
dmi.bios.date: 04/05/2005
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A02
dmi.board.name: 0G6951
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA02:bd04/05/2005:svnDellInc.:pnLatitudeX1:pvr:rvnDellInc.:rn0G6951:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude X1
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: i686kernel: 2.6.31-2-generic
Comment 1 Bryce Harrington 2009-07-14 23:27:24 UTC
Created attachment 27715 [details]
XorgConf.txt

xorg.conf is plain stock config
Comment 2 Bryce Harrington 2009-07-14 23:27:48 UTC
Created attachment 27716 [details]
XorgLog.txt
Comment 3 Bryce Harrington 2009-07-14 23:28:09 UTC
Created attachment 27717 [details]
Xrandr.txt
Comment 4 Bryce Harrington 2009-07-14 23:28:29 UTC
Created attachment 27718 [details]
xdpyinfo.txt
Comment 5 ykzhao 2009-07-15 20:47:15 UTC
Will you please attach the xrandr/xorg under UMS mode?
Thanks.
Comment 6 Andreas Schildbach 2009-07-15 22:38:38 UTC
Here is how xrandr looks like on Jaunty xserver-xorg-video-intel 2:2.6.3-0ubuntu9.3 with no KMS. Note the additional 1024x768 resolution and the missing TV1 (which is correct since my hardware does not have TV out).

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1968, maximum 1920 x 1968
VGA connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      75.0     60.0  
   1152x864       75.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3  
   640x480        75.0     59.9  
   720x400        70.1  
LVDS connected 1280x768+0+1200 (normal left inverted right x axis y axis) 264mm x 159mm
   1280x768       59.9*+
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
Comment 7 Andreas Schildbach 2009-07-16 00:57:42 UTC
And here is how xrandr looks like under Karmic xserver-xorg-video-intel 2:2.7.99.901+git20090702.74227141-0ubuntu1 with KMS disabled (booted with kernel option i915.modeset=0):

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1968, maximum 2048 x 2048
VGA connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
   1600x1200      60.0  
   1680x1050      60.0  
   1280x1024      75.0     60.0  
   1152x864       75.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3  
   640x480        75.0     59.9  
   720x400        70.1  
LVDS connected 1280x768+330+1200 (normal left inverted right x axis y axis) 264mm x 159mm
   1280x768       59.9*+
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
Comment 8 Andreas Schildbach 2009-07-16 01:01:03 UTC
Created attachment 27751 [details]
Xorg.0.log on Karmic with KMS disabled

Here is the Xorg.0.log on Karmic with KMS disabled (i915.modeset=0).

ykzhao, I hope this is what you meant with 'UMS mode'. Do you need more information?
Comment 9 ykzhao 2009-07-16 02:20:54 UTC
Thanks for so quick response.
   What you have done is right. I expect to get the log with KMS disabled.
Thanks.
Comment 10 ykzhao 2009-07-23 18:41:01 UTC
Sorry for the late response.
   Will you please try the following patch set on the latest Eric's drm-intel-next tree and see whether the issue still exists?
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003560.html
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003561.html
    >http://lists.freedesktop.org/archives/intel-gfx/2009-July/003562.html

After the test, please attach the output of Xorg/xrandr.
   thanks.
Comment 11 Andreas Schildbach 2009-07-27 12:05:09 UTC
Just for the records, kernel 2.6.31-4-generic does not fix the problem. Will try that patchset now.
Comment 12 Andreas Schildbach 2009-07-27 13:11:33 UTC
Hmmm, are there step-by-step instructions of how to checkout that branch from git, apply the patches and install the kernel to Ubuntu Karmic?
Comment 13 ykzhao 2009-07-29 18:44:02 UTC
As the three patches are already shipped in Dave's drm-next tree, this bug will be marked as resolved.
   1. commit d782c3f95c9263dc0b98e7115f75f1e18b9600b3
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Jun 22 13:17:08 2009 +0800

    drm/mode: add the CVT algorithm in kernel space

   2. commit 26bbdadad356ec02d33657858d91675f3e9aca94
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Jun 22 13:17:09 2009 +0800

    drm/mode: add the GTF algorithm in kernel space

   3. commit 5c61259e6c7290082108e93815f7f72f27da14f4
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Jun 22 13:17:10 2009 +0800

    drm/mode: get the modeline for standard timing in EDID by using CVT/GTF

   Please try the Dave's drm-next tree and see whether the issue is already fixed.
If the issue still exists, please reopen it again.
   Thanks.
Comment 14 Andreas Schildbach 2009-08-04 09:13:54 UTC
Kernel 2.6.31-5-generic did _not_ fix the problem.
Comment 15 ykzhao 2009-08-04 17:38:47 UTC
(In reply to comment #14)
> Kernel 2.6.31-5-generic did _not_ fix the problem.
The patch I mentioned in comment #13 is not shipped in 2.6.31-rc5 kernel.
Please try the Dave's next tree.
Thanks.
> 

Comment 16 Andreas Schildbach 2009-08-07 11:10:53 UTC
Where can I find this "next tree"? I was asking for instructions.
Comment 17 Andreas Schildbach 2009-08-07 14:32:03 UTC
Dozends of howto's and hours of git clone and compile time later, I am running "linux 2.6.31-rc2my" which is hopefully based on that "next tree".

And it does not fix this problem:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1968, maximum 4096 x 4096
VGA1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200      60.0*+
   1280x1024      75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
LVDS1 connected 1280x768+304+1200 (normal left inverted right x axis y axis) 264mm x 159mm
   1280x768       59.9*+
   800x600        60.3  
   640x480        59.9  
   0x0             0.0  
TV1 disconnected (normal left inverted right x axis y axis)
Comment 18 ykzhao 2009-08-12 18:46:22 UTC
Will you please add the boot option of "drm.debug=0x6" and attach the output of dmesg, xorg.log?
Thaks.
Comment 19 Andreas Schildbach 2009-08-12 23:48:55 UTC
Created attachment 28581 [details]
dmesg with drm.debug=0x6
Comment 20 Andreas Schildbach 2009-08-12 23:49:50 UTC
Created attachment 28582 [details]
Xorg.log with drm.debug=0x6
Comment 21 Andreas Schildbach 2009-08-12 23:51:33 UTC
(Oh sorry, I produced the two log files on the stock Karmic kernel. Should I have used the "next tree"?)
Comment 22 ykzhao 2009-08-13 00:51:44 UTC
(In reply to comment #21)
> (Oh sorry, I produced the two log files on the stock Karmic kernel. Should I
> have used the "next tree"?)
> 
It will be great if you can do the test on Dave's drm-next tree.
Thanks.

Comment 23 Andreas Schildbach 2009-08-13 03:18:31 UTC
Created attachment 28585 [details]
dmesg with drm.debug=0x6 on the 'next tree'
Comment 24 Andreas Schildbach 2009-08-13 03:19:14 UTC
Created attachment 28586 [details]
Xorg.log with drm.debug=0x6 on the 'next tree'
Comment 25 ykzhao 2009-08-13 18:27:39 UTC
(In reply to comment #23)
> Created an attachment (id=28585) [details]
> dmesg with drm.debug=0x6 on the 'next tree'
From the dmesg it seems that the boot option of "drm.debug=0x06" has no effect.
Will you please enable "CONFIG_DRM=y" in kernel configuration and re-do the test again?
Thanks.
> 

Comment 26 Andreas Schildbach 2009-08-14 01:45:59 UTC
Created attachment 28616 [details]
dmesg with drm.debug=0x6 and CONFIG_DRM=y on the 'next tree'
Comment 27 Andreas Schildbach 2009-08-14 01:47:11 UTC
Created attachment 28617 [details]
Xorg.log with drm.debug=0x6 and CONFIG_DRM=y on the 'next tree'
Comment 28 Andreas Schildbach 2009-08-14 01:48:56 UTC
I switched CONFIG_DRM from 'm' to 'y' in '.config' and clean compiled the whole 'next tree' again. However, it does not look like there is any additional debug output.
Comment 29 Andreas Schildbach 2009-08-14 03:03:34 UTC
I've tried everything to set DRM_CONFIG from 'm' to 'y'. It is always being reverted to 'm'. make menuconfig errors when switching to 'y' (dependency problem but there seems to be no option to set all dependencies to 'y').

So, please, would you exactly describe what I have to do in order to produce the required log files? (refering to existing howtos is ok of course)
Comment 30 Andreas Schildbach 2009-08-14 03:04:00 UTC
sorry meant CONFIG_DRM in the above comment
Comment 31 ykzhao 2009-08-14 03:22:11 UTC
(In reply to comment #29)
> I've tried everything to set DRM_CONFIG from 'm' to 'y'. It is always being
> reverted to 'm'. make menuconfig errors when switching to 'y' (dependency
> problem but there seems to be no option to set all dependencies to 'y').
> 
Will you please compile the i915 as built-in driver and attach the required output?
Please confirm that the test is based on the drm-dave/drm-next tree.
   >http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commit;h=cfcf4738cd6b5d7bed1473acad76d6430cf1fb0a

Thanks.
> So, please, would you exactly describe what I have to do in order to produce
> the required log files? (refering to existing howtos is ok of course)
> 

Comment 32 ykzhao 2009-08-14 03:23:31 UTC
Created attachment 28620 [details] [review]
add the detailed mode debug info related with the output

Will you please also try the debug patch on the xserver and attach the xorg.log after the system is booted?
thanks.
Comment 33 Andreas Schildbach 2009-08-14 15:54:17 UTC
Again, switching CONFIG_DRM_I915 yields the error "This This feature depends on another which has been configured as a module. As a result, this feature will be built as a module." when trying to switch from 'm' to 'y' within 'make menuconfig'. Could you give detailed instructions?

I do not know how to "confirm that the test is based on the drm-dave/drm-next tree". Could you give detailed instructions?

I do not know how to apply the patch on xserver. I have fetched the xserver source with "apt-get source xserver-xorg", but the source does not contain the file to be patched (xf86Crtc.c). Could you give detailed instructions?
Comment 34 Andreas Schildbach 2009-08-16 07:43:52 UTC
Created attachment 28666 [details]
dmesg with drm.debug=0x6 and CONFIG_DRM[_I915]=y on the 'next tree'
Comment 35 Andreas Schildbach 2009-08-16 08:35:55 UTC
Created attachment 28667 [details]
Xorg.log with mode_debug patch on the 'next tree'
Comment 36 ykzhao 2009-08-16 18:46:31 UTC
(In reply to comment #33)
> Again, switching CONFIG_DRM_I915 yields the error "This This feature depends on
> another which has been configured as a module. As a result, this feature will
> be built as a module." when trying to switch from 'm' to 'y' within 'make
> menuconfig'. Could you give detailed instructions?
> 
> I do not know how to "confirm that the test is based on the drm-dave/drm-next
> tree". Could you give detailed instructions?
> 
> I do not know how to apply the patch on xserver. I have fetched the xserver
> source with "apt-get source xserver-xorg", but the source does not contain the
> file to be patched (xf86Crtc.c). Could you give detailed instructions?
You can download the xorg-xserver source code from
http://cgit.freedesktop.org/xorg/xserver/commit/?id=xorg-server-1.6.3
and then apply the patch on it.
Thanks.
> 

(In reply to comment #33)
> Again, switching CONFIG_DRM_I915 yields the error "This This feature depends on
> another which has been configured as a module. As a result, this feature will
> be built as a module." when trying to switch from 'm' to 'y' within 'make
> menuconfig'. Could you give detailed instructions?
> 
> I do not know how to "confirm that the test is based on the drm-dave/drm-next
> tree". Could you give detailed instructions?
> 
> I do not know how to apply the patch on xserver. I have fetched the xserver
> source with "apt-get source xserver-xorg", but the source does not contain the
> file to be patched (xf86Crtc.c). Could you give detailed instructions?
> 

Comment 37 ykzhao 2009-08-16 19:09:25 UTC
(In reply to comment #33)
> Again, switching CONFIG_DRM_I915 yields the error "This This feature depends on
> another which has been configured as a module. As a result, this feature will
> be built as a module." when trying to switch from 'm' to 'y' within 'make
> menuconfig'. Could you give detailed instructions?
> 
> I do not know how to "confirm that the test is based on the drm-dave/drm-next
> tree". Could you give detailed instructions?
please use the following command to get the Dave's drm-2.6 tree and then switch to drm-next.
   git clone git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
> 
> I do not know how to apply the patch on xserver. I have fetched the xserver
> source with "apt-get source xserver-xorg", but the source does not contain the
> file to be patched (xf86Crtc.c). Could you give detailed instructions?
> 
You can download the xorg-xserver source code from
http://cgit.freedesktop.org/xorg/xserver/commit/?id=xorg-server-1.6.3
and then apply the patch on it.
And from the xorg log  it seems that the patch is already applied. And it confirms that the mode(0x0) is related with the linux kernel.

In fact when patch set in comment #13 is applied, the issue will be fixed.
Thanks.
> 


Comment 38 Andreas Schildbach 2009-08-17 00:11:50 UTC
I was cloning git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel, which is containing a branch called 'drm-intel-next'.

However, after cloning git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git, how can I 'switch to drm-next'?

$ git branch
* master

$ git checkout drm-next
error: pathspec 'drm-next' did not match any file(s) known to git.
Comment 39 ykzhao 2009-08-17 03:05:27 UTC
(In reply to comment #38)
> I was cloning git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel,
> which is containing a branch called 'drm-intel-next'.
> 
> However, after cloning
> git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git, how can I
> 'switch to drm-next'?
> 
> $ git branch
> * master
> 
> $ git checkout drm-next
> error: pathspec 'drm-next' did not match any file(s) known to git.
please use the following command to switch to drm-next branch.
  git branch -r 
  git checkout -b origin/drm-next

thanks.
> 

Comment 40 Andreas Schildbach 2009-08-17 16:46:49 UTC
I can confirm that with a kernel obtained with the above instructions, the 0x0 mode is not present any more. Also, several missing modes are restored.
Comment 41 ykzhao 2009-08-17 19:08:20 UTC
(In reply to comment #40)
> I can confirm that with a kernel obtained with the above instructions, the 0x0
> mode is not present any more. Also, several missing modes are restored.
> 
Thanks for the confirmation.
As the patch in comment #13 is already shipped in Dave's drm-next tree, IMO this bug can be marked as resolved.
thanks.

Comment 42 Andreas Schildbach 2009-09-02 04:48:54 UTC
I just noticed that the 1024x768 mode is still missing from LVDS1. Should I open a new bugreport for this?
Comment 43 ykzhao 2009-09-02 17:57:21 UTC
(In reply to comment #42)
> I just noticed that the 1024x768 mode is still missing from LVDS1. Should I
> open a new bugreport for this?
> 
If the mode of 1024x768 is still missing for LVDS1, please open a new bug and attach the required xorg.0.log.

It will be great if you can try the patch in https://bugs.freedesktop.org/show_bug.cgi?id=22761#C8 on the xserver and attach the output of xorg.0.log.
thanks.

Comment 44 Andreas Schildbach 2009-09-03 02:36:55 UTC
(In reply to comment #43)

> If the mode of 1024x768 is still missing for LVDS1, please open a new bug and
> attach the required xorg.0.log.

Done: https://bugs.freedesktop.org/show_bug.cgi?id=23676

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.