Bug 14957 - Blank screen with KMS enabled
Summary: Blank screen with KMS enabled
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_other
URL:
Keywords:
Depends on:
Blocks: 14885
  Show dependency tree
 
Reported: 2009-12-30 00:08 UTC by Philipp Kohlbecher
Modified: 2010-01-24 21:46 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.33-rc2
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
vbios.dump (64.00 KB, application/octet-stream)
2010-01-02 18:03 UTC, Vasyl Demin
Details
dmesg.lod when KMS disabling (23.37 KB, application/octet-stream)
2010-01-02 18:06 UTC, Vasyl Demin
Details
dmesg.log when KMS enabling (31.36 KB, application/octet-stream)
2010-01-02 22:04 UTC, Vasyl Demin
Details
dmesg.log with issue (26.27 KB, application/octet-stream)
2010-01-03 15:29 UTC, Vasyl Demin
Details
dmidecode output (7.69 KB, text/plain)
2010-01-05 01:23 UTC, Vasyl Demin
Details
try the patch that adds HP nx9020/Samsung SX20s to ACPI LID quirk list (1.45 KB, patch)
2010-01-06 05:34 UTC, ykzhao
Details | Diff
the updated patch (1.59 KB, patch)
2010-01-07 06:16 UTC, ykzhao
Details | Diff

Description Philipp Kohlbecher 2009-12-30 00:08:12 UTC
When the i915 module is loaded with modeset=1, the screen is blanked and stays that way, with the following in dmesg:

[drm] DAC-6: set mode 640x480 0
[drm] TV-14: set mode NTSC 480i 0
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/drm_crtc_helper.c:1032 drm_helper_initial_config+0x36/0x52 [drm_kms_helper]()
Hardware name: SX20S
No connectors reported connected with modes
Modules linked in: snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_intel8x0(+) firewire_ohci snd_intel8x0m(+) pcmcia snd_pcm_oss snd_ac97_codec firewire_core ac97_bus snd_mixer_oss i915(+) joydev crc_itu_t yenta_socket snd_pcm drm_kms_helper snd_timer drm rsrc_nonstatic b44 ipw2200 sdhci_pci ohci1394 snd cfbcopyarea soundcore psmouse video ssb sdhci pcmcia_core i2c_i801 libipw ieee1394 iTCO_wdt serio_raw snd_page_alloc pcspkr lib80211 iTCO_vendor_support output cfbimgblt cfbfillrect led_class mii aes_i586 aes_generic xts gf128mul
Pid: 1226, comm: modprobe Not tainted 2.6.32 #1
Call Trace:
 [<c0126274>] warn_slowpath_common+0x65/0x7c
 [<f9b5dd62>] ? drm_helper_initial_config+0x36/0x52 [drm_kms_helper]
 [<c01262bf>] warn_slowpath_fmt+0x24/0x27
 [<f9b5dd62>] drm_helper_initial_config+0x36/0x52 [drm_kms_helper]
 [<fa31c6e6>] i915_driver_load+0xddb/0xe80 [i915]
 [<f96a8b55>] drm_get_dev+0x2ad/0x38a [drm]
 [<fa33cd90>] i915_pci_probe+0xd/0x9f [i915]
 [<c026ded7>] local_pci_probe+0xe/0x10
 [<c026e823>] pci_device_probe+0x43/0x66
 [<c02d197f>] driver_probe_device+0x8a/0x109
 [<c02d1a41>] __driver_attach+0x43/0x5f
 [<c02d11c3>] bus_for_each_dev+0x3d/0x67
 [<c02d1847>] driver_attach+0x14/0x16
 [<c02d19fe>] ? __driver_attach+0x0/0x5f
 [<c02d1568>] bus_add_driver+0x8f/0x1bf
 [<c025edc9>] ? kset_find_obj+0x1b/0x43
 [<c02d1c7f>] driver_register+0x79/0xe0
 [<c026e9bb>] __pci_register_driver+0x31/0x8e
 [<f96a5259>] drm_init+0x5d/0xb5 [drm]
 [<fa354000>] ? i915_init+0x0/0x4d [i915]
 [<fa35404b>] i915_init+0x4b/0x4d [i915]
 [<c0101133>] do_one_initcall+0x4b/0x130
 [<c0149f79>] sys_init_module+0xa7/0x1de
 [<c010296b>] sysenter_do_call+0x12/0x22
---[ end trace 2d06d367c79ff13a ]---
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Things worked fine under 2.6.31. (I can bisect if necessary.)

Disabling KMS by passing modeset=0 as a module parameter works around this issue.

I am using a Samsung X20 laptop with an Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03).
Comment 1 Vasyl Demin 2009-12-30 23:56:01 UTC
Same problem on laptop HP Compaq nx9020.
Video: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
OS: Arch Linux i686
Kernel: 2.6.32.2

[drm] set up 31M of stolen space
[drm] DAC-6: set mode 640x480 0
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/drm_crtc_helper.c:1032 drm_helper_initial_config+0x57/0x60 [drm_kms_helper]()
Hardware name: compaq nx9020 (PG711ES#ABB)       
No connectors reported connected with modes
Modules linked in: i915(+) drm_kms_helper drm i2c_algo_bit button i2c_core video output intel_agp agpgart
Pid: 33, comm: modprobe Not tainted 2.6.32-ARCH #1
Call Trace:
 [<c103ea9e>] ? warn_slowpath_common+0x6e/0xb0
 [<ee77bb27>] ? drm_helper_initial_config+0x57/0x60 [drm_kms_helper]
 [<c103eb2b>] ? warn_slowpath_fmt+0x2b/0x30
 [<ee77bb27>] ? drm_helper_initial_config+0x57/0x60 [drm_kms_helper]
 [<ee8a3b0c>] ? i915_driver_load+0x136c/0x1540 [i915]
 [<ee8a2780>] ? i915_vga_set_decode+0x0/0x20 [i915]
 [<ee75faf0>] ? drm_get_minor+0x1b0/0x2e0 [drm]
 [<ee75feb9>] ? drm_get_dev+0x299/0x4c0 [drm]
 [<c11322ef>] ? sysfs_addrm_start+0x3f/0xb0
 [<c1182990>] ? pci_match_device+0xa0/0xc0
 [<c118281b>] ? local_pci_probe+0xb/0x10
 [<c1183601>] ? pci_device_probe+0x61/0x80
 [<c11f697b>] ? driver_probe_device+0x7b/0x170
 [<c1182990>] ? pci_match_device+0xa0/0xc0
 [<c11f6ae9>] ? __driver_attach+0x79/0x80
 [<c11f6a70>] ? __driver_attach+0x0/0x80
 [<c11f61e2>] ? bus_for_each_dev+0x52/0x80
 [<c11f6816>] ? driver_attach+0x16/0x20
 [<c11f6a70>] ? __driver_attach+0x0/0x80
 [<c11f5ad6>] ? bus_add_driver+0xc6/0x2b0
 [<c1183540>] ? pci_device_remove+0x0/0x40
 [<c11f6d83>] ? driver_register+0x63/0x120
 [<ee75b52d>] ? drm_init+0x2d/0xf0 [drm]
 [<ee8e4000>] ? i915_init+0x0/0x48 [i915]
 [<c118382d>] ? __pci_register_driver+0x3d/0xb0
 [<c100112f>] ? do_one_initcall+0x2f/0x190
 [<c1073294>] ? sys_init_module+0xb4/0x220
 [<c1003ad4>] ? syscall_call+0x7/0xb
---[ end trace bff4d44a38794df4 ]---
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0


The problem remains, even when I turn off KMS:

[drm] DAC-6: set mode 640x480 0
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/drm_crtc_helper.c:1032 drm_helper_initial_config+0x57/0x60 [drm_kms_helper]()
Hardware name: compaq nx9020 (PG711ES#ABB)       
No connectors reported connected with modes
Modules linked in: pcmcia snd_seq_dummy ipw2200 yenta_socket snd_seq_oss rsrc_nonstatic snd_seq_midi_event libipw pcmcia_core lib80211 snd_seq 8139too mii joydev snd_seq_device i915(+) snd_intel8x0 snd_intel8x0m drm_kms_helper snd_ac97_codec drm iTCO_wdt snd_pcm_oss fan snd_mixer_oss psmouse uhci_hcd iTCO_vendor_support i2c_algo_bit ac97_bus i2c_i801 intel_agp container ehci_hcd shpchp wmi battery video output snd_pcm snd_timer i2c_core agpgart thermal serio_raw sg evdev processor pci_hotplug usbcore button ac snd soundcore snd_page_alloc fuse rtc_cmos rtc_core rtc_lib ext4 mbcache jbd2 crc16 sr_mod cdrom sd_mod ata_generic pata_acpi ata_piix libata scsi_mod
Pid: 1388, comm: modprobe Not tainted 2.6.32-ARCH #1
Call Trace:
 [<c103ea9e>] ? warn_slowpath_common+0x6e/0xb0
 [<ee7e5b27>] ? drm_helper_initial_config+0x57/0x60 [drm_kms_helper]
 [<c103eb2b>] ? warn_slowpath_fmt+0x2b/0x30
 [<ee7e5b27>] ? drm_helper_initial_config+0x57/0x60 [drm_kms_helper]
 [<eeb13b0c>] ? i915_driver_load+0x136c/0x1540 [i915]
 [<eeb12780>] ? i915_vga_set_decode+0x0/0x20 [i915]
 [<ee888af0>] ? drm_get_minor+0x1b0/0x2e0 [drm]
 [<ee888eb9>] ? drm_get_dev+0x299/0x4c0 [drm]
 [<c113230b>] ? sysfs_addrm_start+0x5b/0xb0
 [<c1182990>] ? pci_match_device+0xa0/0xc0
 [<c118281b>] ? local_pci_probe+0xb/0x10
 [<c1183601>] ? pci_device_probe+0x61/0x80
 [<c11f697b>] ? driver_probe_device+0x7b/0x170
 [<c11f6ae9>] ? __driver_attach+0x79/0x80
 [<c11f6a70>] ? __driver_attach+0x0/0x80
 [<c11f61e2>] ? bus_for_each_dev+0x52/0x80
 [<c11f6816>] ? driver_attach+0x16/0x20
 [<c11f6a70>] ? __driver_attach+0x0/0x80
 [<c11f5ad6>] ? bus_add_driver+0xc6/0x2b0
 [<c1183540>] ? pci_device_remove+0x0/0x40
 [<c11f6d83>] ? driver_register+0x63/0x120
 [<ee88452d>] ? drm_init+0x2d/0xf0 [drm]
 [<ee909000>] ? i915_init+0x0/0x48 [i915]
 [<c118382d>] ? __pci_register_driver+0x3d/0xb0
 [<c100112f>] ? do_one_initcall+0x2f/0x190
 [<c1073294>] ? sys_init_module+0xb4/0x220
 [<c10039f3>] ? sysenter_do_call+0x12/0x28
---[ end trace e8496b6b910ab714 ]---
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
Comment 2 Vasyl Demin 2009-12-31 01:00:12 UTC
Philipp is right, disabling KMS solves the problem. Forget the second half of my previous post
Comment 3 Philipp Kohlbecher 2010-01-01 16:27:44 UTC
This bug persists in 2.6.33-rc2.
Comment 4 Philipp Kohlbecher 2010-01-01 16:38:00 UTC
For what it's worth, under 2.6.33-rc2, the relevant part of the log is:
(At least the line number in drm_crtc_helper differs, which might be relevant when looking for other reports of this bug.)

[drm] initialized overlay support
[drm] DAC-6: set mode 640x480 0
[drm] TV-14: set mode NTSC 480i 0
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/drm_crtc_helper.c:1035 drm_helper_initial_config+0x3d/0x59 [drm_kms_helper]()
Hardware name: SX20S
No connectors reported connected with modes
Modules linked in: snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_intel8x0(+) joydev snd_intel8x0m(+) snd_pcm_oss firewire_ohci i915(+) snd_ac97_codec firewire_core drm_kms_helper crc_itu_t pcmcia ac97_bus snd_mixer_oss snd_pcm drm ipw2200 snd_timer sdhci_pci libipw sdhci cfbcopyarea yenta_socket snd ohci1394 cfbimgblt iTCO_wdt b44 video ieee1394 i2c_i801 led_class soundcore iTCO_vendor_support cfbfillrect rsrc_nonstatic cfg80211 psmouse snd_page_alloc ssb output pcmcia_core lib80211 serio_raw pcspkr mii aes_i586 aes_generic xts gf128mul
Pid: 1225, comm: modprobe Not tainted 2.6.33-rc2 #1
Call Trace:
 [<c01269eb>] warn_slowpath_common+0x65/0x7c
 [<f88ced82>] ? drm_helper_initial_config+0x3d/0x59 [drm_kms_helper]
 [<c0126a36>] warn_slowpath_fmt+0x24/0x27
 [<f88ced82>] drm_helper_initial_config+0x3d/0x59 [drm_kms_helper]
 [<f89c4728>] i915_driver_load+0xdde/0xe73 [i915]
 [<f87b711d>] drm_get_dev+0x2bf/0x39c [drm]
 [<f89e7a78>] i915_pci_probe+0xd/0xa8 [i915]
 [<c026c6ab>] local_pci_probe+0xe/0x10
 [<c026cfeb>] pci_device_probe+0x43/0x66
 [<c02d06ab>] driver_probe_device+0x8a/0x109
 [<c02d076d>] __driver_attach+0x43/0x5f
 [<c02cfeef>] bus_for_each_dev+0x3d/0x67
 [<c02d0573>] driver_attach+0x14/0x16
 [<c02d072a>] ? __driver_attach+0x0/0x5f
 [<c02d0294>] bus_add_driver+0x8f/0x1bf
 [<c025cbb1>] ? kset_find_obj+0x1b/0x43
 [<c02d09ab>] driver_register+0x79/0xe0
 [<c026d183>] __pci_register_driver+0x31/0x8e
 [<f87b3176>] drm_init+0x5d/0xb5 [drm]
 [<f8a00000>] ? i915_init+0x0/0x4d [i915]
 [<f8a0004b>] i915_init+0x4b/0x4d [i915]
 [<c0101133>] do_one_initcall+0x4b/0x130
 [<c014bbb0>] sys_init_module+0xa7/0x1db
 [<c0102813>] sysenter_do_call+0x12/0x22
---[ end trace 0bd1d61b30ff7cdc ]---
[drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
Comment 5 Philipp Kohlbecher 2010-01-01 16:44:39 UTC
At first glance, this might be related to bug #14854 and http://article.gmane.org/gmane.linux.kernel/931719 = http://groups.google.com/group/linux.kernel/msg/9fb6cc54fcd2046a

It's not the same issue, though. (For one thing, these two bugs did not occur under 2.6.32.)
Comment 6 ykzhao 2010-01-02 13:26:19 UTC
Will you please add the boot option of "drm.debug=0x06" and attach the output of dmesg?

Will you please add the boot option of "nomodeset"(KMS disabled) and attach the output of dmesg, Xorg.0.log, xrandr -q --verbose?

Please also attach the output of vbios.dump, which can be obtained by using the following command:
   echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
   cat /sys/devices/pci0000:00/0000:00:02.0/rom >vbios.dump
   echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom
Comment 7 Philipp Kohlbecher 2010-01-02 13:36:44 UTC
Ah. I've figured out what the problem is (at least for me). The commit that introduced the problem was b42d4c5c6a872815d711e5d51a600f5122c38eee ("drm/i915: use ACPI LID status for LVDS ->detect hook"). As the commit message states, it only works "assuming the lid device status is correct." In my case, it isn't.

Unfortunately, that is a much older issue that never bothered me much until now. I will open a new bug for that.

zersaa, can you test whether reverting said commit fixes the issue for you?

ykzhao, do you still need those files?
Comment 8 Vasyl Demin 2010-01-02 18:03:56 UTC
Created attachment 24409 [details]
vbios.dump
Comment 9 Vasyl Demin 2010-01-02 18:06:45 UTC
Created attachment 24410 [details]
dmesg.lod when KMS disabling
Comment 10 Vasyl Demin 2010-01-02 22:01:41 UTC
I can't reproduce a bug! Kernel configuration hasn't changed, I just ran mkinitcpio several times (turn on/off KMS) and then rebooted the laptop. Now KMS works, but in dmesg.log still have some error.

When KMS disabling, works only vesa driver. If using intel's driver, X-server freezes shortly after startup and I can't find Xorg.0.log. Do you need Xorg.0.log and xrandr -q --verbose, obtained using driver vesa?
Comment 11 Vasyl Demin 2010-01-02 22:04:50 UTC
Created attachment 24411 [details]
dmesg.log when KMS enabling
Comment 12 Vasyl Demin 2010-01-03 15:27:24 UTC
Today I woke up a laptop, opening its lid. Before I could enter my password in welcome window, the screen became blank and the laptop stops responding to anything. After reboot the issue came back. Now I can attach the necessary log.

Perhaps Philipp is right, and the cause of the problem is an incorrect lid device status.
Comment 13 Vasyl Demin 2010-01-03 15:29:43 UTC
Created attachment 24419 [details]
dmesg.log with issue
Comment 14 klimas 2010-01-03 17:00:05 UTC
(In reply to comment #10)
> I can't reproduce a bug! Kernel configuration hasn't changed, I just ran
> mkinitcpio several times (turn on/off KMS) and then rebooted the laptop. Now
> KMS works, but in dmesg.log still have some error.
> 
> When KMS disabling, works only vesa driver. If using intel's driver, X-server
> freezes shortly after startup and I can't find Xorg.0.log. Do you need
> Xorg.0.log and xrandr -q --verbose, obtained using driver vesa?

I have the exact same problem with my Asus laptop using the Intel Corporation 82852/855GM Integrated Graphics Device (rev 02). I should mention that the new Intel driver never did function properly with my computer. Since the depreciation of the i810 driver, I have been forced to use the vesa driver.

I can reproduce the following situations:
- KMS loads fine;
- X loads intel driver and freezes within 10-20 seconds of loading,
- or X freezes during startup with vesa driver (with blank screen).

OR

- disabling KMS;
- X freezes during startup with Intel driver (with a blank screen),
- vesa driver works as expected.

Please let me know if I can assist in any way.
Comment 15 ykzhao 2010-01-05 01:12:21 UTC
Thanks for bisecting this issue.

Now it seems that this issue is related with the incorrect LID state.

Hi, Zersaa/Philips
Will you please attach the output of dmidecode on our box?

thanks.
Comment 16 Vasyl Demin 2010-01-05 01:23:25 UTC
Created attachment 24436 [details]
dmidecode output
Comment 17 Philipp Kohlbecher 2010-01-05 09:08:38 UTC
For me this is definitely caused by the incorrect lid state. So it's really bug #14977. Please see there for dmidecode output.
Comment 18 Andrew Morton 2010-01-06 01:05:00 UTC
I reassigned this to ACPI.
Comment 19 ykzhao 2010-01-06 05:34:47 UTC
Created attachment 24459 [details]
try the patch that adds HP nx9020/Samsung SX20s to ACPI LID quirk list

Will you please try the attached patch on the latest upstream kernel and see whether the issue can be fixed?

thanks.
Comment 20 Philipp Kohlbecher 2010-01-06 11:36:02 UTC
Thanks for the patch! It works if you replace
DMI_MATCH(DMI_SYS_VENDOR, "Phoenix Technologies LTD")
with:
DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics")

Phoenix would be the DMI_BIOS_VENDOR.

I have only tested this with 2.6.32.2 so far. I am assuming it also works with 2.6.33-rc3, but I will verify that later.

Please note that, at least for me, this is more of a workaround: The patch fixes this bug, but the underlying issue (bug #14977) remains.

Again, thank you for working on this!
Comment 21 ykzhao 2010-01-06 13:08:57 UTC
Hi, Philipp
    thanks for pointing out this issue. You are right. It is my fault.
 
Thanks again.
Comment 22 Philipp Kohlbecher 2010-01-06 13:12:08 UTC
Sure, no problem. (You're fixing *my* bug, after all!)
Also, I have verified that the (corrected) patch works on 2.6.33-rc3, as well.
Comment 23 ykzhao 2010-01-06 13:12:35 UTC
Hi, Philipp
    thanks for pointing out this issue. You are right. It is my fault. I will send the updated patch to mailing list.
 
Thanks again.
Comment 24 Rafael J. Wysocki 2010-01-06 22:32:50 UTC
Handled-By : Zhao Yakui <yakui.zhao@intel.com>

Yakui, care to attach the updated patch here or provide a patchwork link?
Comment 25 ykzhao 2010-01-07 06:16:51 UTC
Created attachment 24476 [details]
the updated patch
Comment 26 Rafael J. Wysocki 2010-01-07 20:19:46 UTC
Patch : http://bugzilla.kernel.org/attachment.cgi?id=24476
Comment 27 Vasyl Demin 2010-01-11 17:00:15 UTC
Patch works for me. Kernel 2.6.32.3
Comment 28 Rafael J. Wysocki 2010-01-11 19:21:14 UTC
*** Bug 14977 has been marked as a duplicate of this bug. ***
Comment 29 Len Brown 2010-01-11 22:43:19 UTC
patch in comment #25 added to acpi-test tree
Comment 30 Len Brown 2010-01-20 06:13:17 UTC
Eric has this in the drm tree, so I'm dropping it from the acpi tree

Today's linux-next merge of the acpi tree got a conflict in
drivers/gpu/drm/i915/intel_lvds.c between commit
40f33a92100f4d9b6e85ad642100cfe42d7ff57d ("drm/i915: Add HP
nx9020/SamsungSX20S to ACPI LID quirk list") from Linus' tree and commit
25fbdd0b66c193607ed058662e06d29345766c17 ("drm/i915: Add HP
nx9020/Samsung SX20S to ACPI LID quirk list") from the acpi tree.

Clearly two (slightly different) versions of the same change.  I used the
version from the drm tree.
Comment 31 Philipp Kohlbecher 2010-01-20 17:14:57 UTC
Len,

I haven't been able to locate commit 
25fbdd0b66c193607ed058662e06d29345766c17, but I know that commit 
40f33a92100f4d9b6e85ad642100cfe42d7ff57d (that's currently in Linus' 
mainline) is incorrect. It's the old version of the patch. For the 
Samsung X20, the DMI_SYS_VENDOR must match "Samsung Electronics", NOT 
"Phoenix Technologies LTD".
Can you make sure you merged the correct commit?

Thanks for working on this!
Comment 32 ykzhao 2010-01-21 07:02:23 UTC
Hi, Philipp
    You are very careful about this issue. The older version patch is picked up by Eric.
    I will try to send a patch to fix this issue.

Thanks.
Comment 33 Rafael J. Wysocki 2010-01-24 21:46:45 UTC
Fixed by commit 40f33a92100f4d9b6e85ad642100cfe42d7ff57d.

Note You need to log in before you can comment on or make changes to this bug.