Bug 112145 - System hangs on shutdown when using drm.edid kernel parameter
Summary: System hangs on shutdown when using drm.edid kernel parameter
Status: NEW
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 02:53 UTC by Neil Kownacki
Modified: 2019-11-05 13:59 UTC (History)
1 user (show)

See Also:
i915 platform: KBL
i915 features: power/GT


Attachments
dmesg log drm.debug=0xe (711.34 KB, text/x-log)
2019-10-28 02:53 UTC, Neil Kownacki
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Kownacki 2019-10-28 02:53:42 UTC
Created attachment 145831 [details]
dmesg log drm.debug=0xe

I am experiencing an issue where my system hangs instead of properly shutting down when my laptop is docked.  One of my monitors has EDID issues, so I have to force an EDID using drm.edid.  I noticed that when I remove the parameter, I have no issues shutting down.  This issue occurs on the current drm-tip kernel (compiled as of commit e2561817d912857cdf7437e73a8fb41256d06edb.)  I believe this may be a regression as I do not remember it happening before, but I will need to do more digging to find a previous kernel version that works.

Thinkpad X270 i7-7500U
UEFI version: R0IET58W (1.36)

How often: always

Steps to reproduce:

-Boot up laptop and login
-Close lid and put it on the dock
-Shutdown with the laptop still on the dock
Comment 1 Lakshmi 2019-10-30 09:56:40 UTC
Not sure if this part of dmesg is relevant here.

Oct 27 22:16:29 totbox kernel: BUG: kernel NULL pointer dereference, address: 0000000000000008
Oct 27 22:16:29 totbox kernel: #PF: supervisor read access in kernel mode
Oct 27 22:16:29 totbox kernel: #PF: error_code(0x0000) - not-present page
Oct 27 22:16:29 totbox kernel: PGD 0 P4D 0 
Oct 27 22:16:29 totbox kernel: Oops: 0000 [#1] SMP PTI
Oct 27 22:16:29 totbox kernel: CPU: 1 PID: 1121 Comm: Xorg Not tainted 5.4.0-drm-tip-e2561817d912857cdf7437e73a8fb41256d06edb+ #4
Oct 27 22:16:29 totbox kernel: Hardware name: LENOVO 20HNCTO1WW/20HNCTO1WW, BIOS R0IET58W (1.36 ) 04/19/2019
Oct 27 22:16:29 totbox kernel: RIP: 0010:set_root+0x25/0xb0
Oct 27 22:16:29 totbox kernel: Code: 00 00 00 00 00 0f 1f 44 00 00 55 65 48 8b 04 25 c0 6b 01 00 48 89 e5 41 54 53 48 89 fb 4c 8b a0 d8 06 00 00 f6 47 38 40 74 39 <41> 8b 4c 24 08 f6 c1 01 75 6e 49 8b 54 24 20 49 8b 44 24 18 48 89
Oct 27 22:16:29 totbox kernel: RSP: 0018:ffffaf0ec13ab640 EFLAGS: 00010202
Oct 27 22:16:29 totbox kernel: RAX: ffff982fd95e0000 RBX: ffffaf0ec13ab770 RCX: 0000000000000020
Oct 27 22:16:29 totbox kernel: RDX: ffffffffffffffe0 RSI: 0000000000000000 RDI: ffffaf0ec13ab770
Oct 27 22:16:29 totbox kernel: RBP: ffffaf0ec13ab650 R08: ffff982fef2ae5f0 R09: ffff982fd87dc040
Oct 27 22:16:29 totbox kernel: R10: ffff982fec92a000 R11: ffff9830ec929060 R12: 0000000000000000
Oct 27 22:16:29 totbox kernel: R13: ffff982fec92f020 R14: 0000000000000040 R15: ffff982fd6341800
Oct 27 22:16:29 totbox kernel: FS:  00007fb9fb3c2f00(0000) GS:ffff982fef280000(0000) knlGS:0000000000000000
Oct 27 22:16:29 totbox kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 27 22:16:29 totbox kernel: CR2: 0000000000000008 CR3: 000000037040a001 CR4: 00000000003606e0
Oct 27 22:16:29 totbox kernel: Call Trace:
Oct 27 22:16:29 totbox kernel:  path_init+0x230/0x310
Oct 27 22:16:29 totbox kernel:  path_openat+0x7e/0x1550
Oct 27 22:16:29 totbox kernel:  ? __wake_up_common_lock+0x8a/0xc0
Oct 27 22:16:29 totbox kernel:  ? ep_poll_callback+0x29a/0x2c0
Oct 27 22:16:29 totbox kernel:  do_filp_open+0x91/0x100
Oct 27 22:16:29 totbox kernel:  ? __wake_up_common_lock+0x8a/0xc0
Oct 27 22:16:29 totbox kernel:  ? string+0x42/0x50
Oct 27 22:16:29 totbox kernel:  ? vsnprintf+0x276/0x4f0
Oct 27 22:16:29 totbox kernel:  file_open_name+0x101/0x150
Oct 27 22:16:29 totbox kernel:  filp_open+0x2c/0x50
Oct 27 22:16:29 totbox kernel:  kernel_read_file_from_path+0x2c/0x70
Oct 27 22:16:29 totbox kernel:  fw_get_filesystem_firmware+0xd3/0x270
Oct 27 22:16:29 totbox kernel:  _request_firmware+0x1ca/0x3f0
Oct 27 22:16:29 totbox kernel:  request_firmware+0x33/0x50
Oct 27 22:16:29 totbox kernel:  edid_load+0x26a/0x330 [drm]
Oct 27 22:16:29 totbox kernel:  drm_load_edid_firmware+0xf1/0x38f [drm]
Oct 27 22:16:29 totbox kernel:  drm_get_override_edid+0x40/0x50 [drm]
Oct 27 22:16:29 totbox kernel:  ? kmalloc_array+0x20/0x20 [drm]
Oct 27 22:16:29 totbox kernel:  drm_do_get_edid+0x23/0x320 [drm]
Oct 27 22:16:29 totbox kernel:  drm_get_edid+0x66/0x380 [drm]
Oct 27 22:16:29 totbox kernel:  drm_dp_mst_get_edid+0x5b/0x70 [drm_kms_helper]
Oct 27 22:16:29 totbox kernel:  intel_dp_mst_get_modes+0x32/0x60 [i915]
Oct 27 22:16:29 totbox kernel:  drm_helper_probe_single_connector_modes+0x173/0x6c0 [drm_kms_helper]
Oct 27 22:16:29 totbox kernel:  drm_client_modeset_probe+0x276/0x10f0 [drm]
Oct 27 22:16:29 totbox kernel:  ? printk+0x58/0x6f
Oct 27 22:16:29 totbox kernel:  ? drm_fb_helper_hotplug_event.part.0+0x66/0xb0 [drm_kms_helper]
Oct 27 22:16:29 totbox kernel:  ? drm_dbg+0x87/0x90 [drm]
Oct 27 22:16:29 totbox kernel:  drm_fb_helper_hotplug_event.part.0+0x7e/0xb0 [drm_kms_helper]
Oct 27 22:16:29 totbox kernel:  drm_fb_helper_restore_fbdev_mode_unlocked+0x75/0xa0 [drm_kms_helper]
Oct 27 22:16:29 totbox kernel:  intel_fbdev_restore_mode+0x30/0x60 [i915]
Oct 27 22:16:29 totbox kernel:  i915_driver_lastclose+0xa/0x10 [i915]
Oct 27 22:16:29 totbox kernel:  drm_lastclose+0x2f/0x50 [drm]
Oct 27 22:16:29 totbox kernel:  drm_release+0xd7/0xe0 [drm]
Oct 27 22:16:29 totbox kernel:  __fput+0xc1/0x250
Oct 27 22:16:29 totbox kernel:  task_work_run+0x87/0xa0
Oct 27 22:16:29 totbox kernel:  do_exit+0x2da/0xb80
Oct 27 22:16:29 totbox kernel:  ? handle_mm_fault+0xc4/0x1f0
Oct 27 22:16:29 totbox kernel:  ? do_user_addr_fault+0x1e4/0x440
Oct 27 22:16:29 totbox kernel:  do_group_exit+0x3a/0xa0
Oct 27 22:16:29 totbox kernel:  __x64_sys_exit_group+0x14/0x20
Oct 27 22:16:29 totbox kernel:  do_syscall_64+0x5b/0x180
Oct 27 22:16:29 totbox kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Oct 27 22:16:29 totbox kernel: RIP: 0033:0x7fb9fb804e86
Oct 27 22:16:29 totbox kernel: Code: Bad RIP value.
Oct 27 22:16:29 totbox kernel: RSP: 002b:00007ffec711a808 EFLAGS: 00003246 ORIG_RAX: 00000000000000e7
Oct 27 22:16:29 totbox kernel: RAX: ffffffffffffffda RBX: 00007fb9fb8f8740 RCX: 00007fb9fb804e86
Oct 27 22:16:29 totbox kernel: RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
Oct 27 22:16:29 totbox kernel: RBP: 0000000000000000 R08: 00000000000000e7 R09: fffffffffffffc78
Oct 27 22:16:29 totbox kernel: R10: fffffffffffffcc6 R11: 0000000000003246 R12: 00007fb9fb8f8740
Oct 27 22:16:29 totbox kernel: R13: 00000000000000cf R14: 00007fb9fb901408 R15: 0000000000000000
Comment 2 Neil Kownacki 2019-11-04 01:17:56 UTC
Lakshmi, those errors show up right after I try to shut down, so I believe that is the relevant part.  After that, it hangs, and then you can see me SysRq to get the machine to reboot.
Comment 3 Lakshmi 2019-11-05 13:59:21 UTC
(In reply to Neil Kownacki from comment #0)
> Created attachment 145831 [details]
> dmesg log drm.debug=0xe
> 
> I am experiencing an issue where my system hangs instead of properly
> shutting down when my laptop is docked.  One of my monitors has EDID issues,
> so I have to force an EDID using drm.edid.  I noticed that when I remove the
> parameter, I have no issues shutting down.  This issue occurs on the current
> drm-tip kernel (compiled as of commit
> e2561817d912857cdf7437e73a8fb41256d06edb.)  I believe this may be a
> regression as I do not remember it happening before, but I will need to do
> more digging to find a previous kernel version that works.
> 
> Thinkpad X270 i7-7500U
> UEFI version: R0IET58W (1.36)
> 
> How often: always
> 
> Steps to reproduce:
> 
> -Boot up laptop and login
> -Close lid and put it on the dock
> -Shutdown with the laptop still on the dock

Good to bisection results, bad commit that caused this issue.


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.