Summary: | Kernel oops when docking laptop while on virtual console | ||
---|---|---|---|
Product: | DRI | Reporter: | Frederik Himpe <fhimpe> |
Component: | DRM/Intel | Assignee: | Chris Wilson <chris> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | jbarnes |
Version: | XOrg git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Description
Frederik Himpe
2011-04-19 06:17:21 UTC
Created attachment 45832 [details] [review] Warn if called without mode_config lock I tried this patch on top of 2.6.38.4. First of all, there was some fuzz in the first part of the patch, I do not know whether this is harmless or it is the cause of the following new problem. Now I get lots of new backtraces in the kernel log when docking the system: [ 7.644246] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]() [ 7.644248] Hardware name: Latitude E6400 [ 7.644250] Modules linked in: ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan] [ 7.644303] Pid: 454, comm: modprobe Not tainted 2.6.38.4-custom.2 #8 [ 7.644305] Call Trace: [ 7.644312] [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c [ 7.644330] [<ffffffffa03f3e5c>] ? intel_crt_detect+0x3e/0x373 [i915] [ 7.644336] [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper] [ 7.644340] [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper] [ 7.644344] [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper] [ 7.644349] [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f [ 7.644353] [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper] [ 7.644356] [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb [ 7.644376] [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915] [ 7.644390] [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915] [ 7.644398] [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm] [ 7.644406] [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm] [ 7.644410] [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d [ 7.644414] [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e [ 7.644417] [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6 [ 7.644422] [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d [ 7.644425] [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142 [ 7.644428] [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f [ 7.644431] [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f [ 7.644435] [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72 [ 7.644438] [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2 [ 7.644451] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.644455] [<ffffffff8123b314>] ? driver_register+0x8d/0xf5 [ 7.644467] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.644471] [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb [ 7.644483] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.644487] [<ffffffff81002173>] ? do_one_initcall+0x78/0x131 [ 7.644491] [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222 [ 7.644494] [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b [ 7.644497] ---[ end trace 4ab93381f5f8f265 ]--- [ 7.649631] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 7.695700] ------------[ cut here ]------------ [ 7.695727] WARNING: at drivers/gpu/drm/i915/intel_hdmi.c:218 intel_hdmi_detect+0x3f/0xc3 [i915]() [ 7.695730] Hardware name: Latitude E6400 [ 7.695732] Modules linked in: arc4 ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan] [ 7.695787] Pid: 454, comm: modprobe Tainted: G W 2.6.38.4-custom.2 #8 [ 7.695790] Call Trace: [ 7.695795] [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c [ 7.695815] [<ffffffffa03f8155>] ? intel_hdmi_detect+0x3f/0xc3 [i915] [ 7.695820] [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper] [ 7.695824] [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper] [ 7.695829] [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper] [ 7.695833] [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f [ 7.695837] [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper] [ 7.695840] [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb [ 7.695860] [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915] [ 7.695874] [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915] [ 7.695882] [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm] [ 7.695890] [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm] [ 7.695894] [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d [ 7.695898] [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e [ 7.695901] [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6 [ 7.695906] [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d [ 7.695909] [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142 [ 7.695912] [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f [ 7.695916] [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f [ 7.695919] [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72 [ 7.695922] [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2 [ 7.695935] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.695939] [<ffffffff8123b314>] ? driver_register+0x8d/0xf5 [ 7.695952] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.695955] [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb [ 7.695968] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.695971] [<ffffffff81002173>] ? do_one_initcall+0x78/0x131 [ 7.695975] [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222 [ 7.695978] [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b [ 7.695981] ---[ end trace 4ab93381f5f8f266 ]--- [ 7.697949] ------------[ cut here ]------------ [ 7.697969] WARNING: at drivers/gpu/drm/i915/intel_dp.c:1580 intel_dp_detect+0x35/0x1a8 [i915]() [ 7.697972] Hardware name: Latitude E6400 [ 7.697974] Modules linked in: arc4 ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan] [ 7.698017] Pid: 454, comm: modprobe Tainted: G W 2.6.38.4-custom.2 #8 [ 7.698019] Call Trace: [ 7.698022] [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c [ 7.698041] [<ffffffffa03f73ef>] ? intel_dp_detect+0x35/0x1a8 [i915] [ 7.698045] [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper] [ 7.698050] [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper] [ 7.698054] [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper] [ 7.698057] [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f [ 7.698061] [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper] [ 7.698065] [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb [ 7.698084] [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915] [ 7.698098] [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915] [ 7.698105] [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm] [ 7.698112] [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm] [ 7.698115] [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d [ 7.698119] [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e [ 7.698122] [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6 [ 7.698125] [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d [ 7.698129] [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142 [ 7.698132] [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f [ 7.698135] [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f [ 7.698138] [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72 [ 7.698142] [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2 [ 7.698154] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.698158] [<ffffffff8123b314>] ? driver_register+0x8d/0xf5 [ 7.698170] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.698174] [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb [ 7.698187] [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915] [ 7.698190] [<ffffffff81002173>] ? do_one_initcall+0x78/0x131 [ 7.698193] [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222 [ 7.698196] [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b [ 7.698198] ---[ end trace 4ab93381f5f8f267 ]--- [ 7.699198] ------------[ cut here ]------------ [...and much more...] Created attachment 45932 [details]
dmesg output after udocking/docking
Created attachment 45933 [details] [review] Take mode config lock for hotplug probe This should silence those (later) warnings. But I don't think this is the explanation for the upowerd BUG, yet. Care to run another test with this patch applied on top of the debugging patch and see what else happens? I've put this patch on top of drm-intel-staging, which also contains numerous bug fixes for intel_get_load_detect_pipe(). Those will also be interesting to test in connection with this bug. Created attachment 45936 [details] [review] Take mode config lock for hotplug probe Right patch this time... Created attachment 45946 [details]
dmesg after adding patch #45832 and patch #45936
The oops triggered by upowerd when docking is not happening anymore. The warnings which appear in this kernel log, happen while booting the system while it's docked. At 64s I undock the system, and at around 98s I dock it again. Also after docking, the system does not hang anymore when switching back from tty1 to X, like was the case without those 2 patches.
The initial warnings I still expected and are fortunately harmless for the time being. Keep on running and see if it does eventually oops. Otherwise, we can mark this bug as fixed. With this kernel, I experienced a totally blank screen when resuming from suspend during which there was a move from dual head to single head. It's different from bug #36082: in this case, virtual console also just showed a blank screen and even soft rebooting the machine (SSH was still working fine), did not fix the problem, even the BIOS messages were not shown anymore. There were no oopses or error messages in the kernel or X logs. Only after a complete power down of the machine, the screen worked fine again. I am not sure whether this might be caused by these patches, and I am currently unable to do any more tests. Hmm, that sounds deeply sinister. Have you checked 2.6.39-rc5 and drm-intel-staging to see if they exhibit the same symptoms? I just tried drm-intel-staging, but two times my machine completely powered off, once shortly after resuming from suspend and the second time shortly after docking. I think there were kernel messages on the console mentioning some kind of loop related to ACPI. Sorry, this stuff is all too broken for me to spend any more time testing this. I found some time to test this again. 2.6.39-rc6 still oopses when docking, however current drm-intel-staging does not. I tried suspending/resuming different times, and there was no problem now with drm-intel-staging. Maybe the sudden power off I experienced last time, was caused by a hardware problem or overheating, it's something which I experienced already a few times in the past too. (It's also interesting to note that on the single time I tested suspend/resume with removal of the second monitor, bug #36082 did not appear with drm-intel-staging (I have not tested this yet with stock 2.6.39-rc6), so maybe that bug is fixed too. I will do some more tests for this bug later and I will add my experiences to bug #36082.) I hope the patches can be added to 2.6.39 and maybe even 2.6.38.x too. If this and #36082 are fixed in current 3.0-rc2 bits can you close them out? If not, it would help to identify which patch in the drm-intel-staging tree you were using fixed the problem so we can get it queued up. This one is fixed in 2.6.39. Bug #36082 is definitely still happening with 2.6.39. A patch referencing this bug report has been merged in Linux v3.0-rc1: commit 7394371d85699a1d6d49b61f65583d6cd902a6a2 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 22 11:03:57 2011 +0100 drm: Take lock around probes for drm_fb_helper_hotplug_event |
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.