https://bugs.freedesktop.org/show_bug.cgi?id=106159
Bug ID: 106159 Summary: When connecting or disconnecting a displayport to a DP hub with 4.16.2+ kernel, hard freeze with frozen video output Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: sass.joel@gmail.com
Created attachment 138956 --> https://bugs.freedesktop.org/attachment.cgi?id=138956&action=edit dpkg -l |grep mesa
When connecting a displayport monitor to an active DP hub with working outputs, my workstation experiences a hard freeze requiring a cold reboot. Network services stop responding, including ping and SSH.
root@nope:~# uname -a Linux nope 4.16.2+ #1 SMP Fri Apr 13 17:51:14 CEST 2018 x86_64 x86_64 x86_64 GNU/Linux
root@nope:~# lsmod |grep -i amdgpu amdgpu 2695168 2 chash 16384 1 amdgpu i2c_algo_bit 16384 1 amdgpu gpu_sched 20480 1 amdgpu ttm 94208 1 amdgpu drm_kms_helper 143360 1 amdgpu drm 348160 6 amdgpu,gpu_sched,ttm,drm_kms_helper
Mesa drivers from padoka PPA
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #1 from Joel Sass sass.joel@gmail.com --- Created attachment 138957 --> https://bugs.freedesktop.org/attachment.cgi?id=138957&action=edit Xorg.0.log
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #2 from Joel Sass sass.joel@gmail.com --- Created attachment 138958 --> https://bugs.freedesktop.org/attachment.cgi?id=138958&action=edit dmesg output
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #3 from Joel Sass sass.joel@gmail.com --- Created attachment 138959 --> https://bugs.freedesktop.org/attachment.cgi?id=138959&action=edit lshw output
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #4 from Harry Wentland harry.wentland@amd.com --- Created attachment 139069 --> https://bugs.freedesktop.org/attachment.cgi?id=139069&action=edit [PATCH 1/2] drm/amd/display: Update MST edid property every time
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #5 from Harry Wentland harry.wentland@amd.com --- Created attachment 139070 --> https://bugs.freedesktop.org/attachment.cgi?id=139070&action=edit [PATCH 2/2] drm/amd/display: Check dc_sink every time in MST hotplug
Can you try patches 1 and 2?
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #6 from Joel Sass sass.joel@gmail.com --- Will do! Sorry, I haven't had much time for testing recently.
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #7 from dwagner jb5sgc1n.nya@20mm.eu --- I cannot comment on how useful above patches are for the topic of this bug report, but they are helpful for bug report https://bugs.freedesktop.org/show_bug.cgi?id=103277
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #8 from Joel Sass sass.joel@gmail.com --- Alright! First, I appreciate the help with this.
I decided to just roll with what I was being given and roll the kernel after applying the patches you'd recommended. I downloaded the newest unstable source this morning from here: git://kernel.ubuntu.com/ubuntu/unstable.git
did a make menuconfig to make sure that amdgpu.dc was included, along with custom processor flags for new core2/xeon processors, and then applied the patches you'd mentioned. Sadly, neither of them were verbatim because I've taken too long to get back to working on this, so I had to apply them manually.
You'll find my diff patches attached. Nothing overtly different.
I'm going to start compiling this, and then go to lunch. Thanks!
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #9 from Joel Sass sass.joel@gmail.com --- Created attachment 139100 --> https://bugs.freedesktop.org/attachment.cgi?id=139100&action=edit amdgpu_dm.c patch I had to manually apply
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #10 from Joel Sass sass.joel@gmail.com --- Created attachment 139101 --> https://bugs.freedesktop.org/attachment.cgi?id=139101&action=edit amdgpu_dm_mst_types.c patch I had to manually apply
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #11 from Joel Sass sass.joel@gmail.com --- It appears that the patch I manually created isn't working out so hot. During compiling, I'm seeing this error for amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c: In function ‘dm_dp_mst_dc_sink_create’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:205:2: error: ‘dc_sink’ undeclared (first use in this function) dc_sink = dc_link_add_remote_sink( ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:205:2: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:209:4: error: ‘init_params’ undeclared (first use in this function) &init_params); ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c: In function ‘dm_dp_mst_get_modes’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:232:28: warning: unused variable ‘init_params’ [-Wunused-variable] struct dc_sink_init_data init_params = { ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:231:19: warning: unused variable ‘dc_sink’ [-Wunused-variable] struct dc_sink *dc_sink; ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:251:5: error: request for member ‘sink_signal’ in something not a structure or union .sink_signal = SIGNAL_TYPE_DISPLAY_PORT_MST }; ^ scripts/Makefile.build:332: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.o' failed make[4]: *** [drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.o] Error 1 scripts/Makefile.build:606: recipe for target 'drivers/gpu/drm/amd/amdgpu' failed make[3]: *** [drivers/gpu/drm/amd/amdgpu] Error 2 scripts/Makefile.build:606: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2 scripts/Makefile.build:606: recipe for target 'drivers/gpu' failed make[1]: *** [drivers/gpu] Error 2 make[1]: *** Waiting for unfinished jobs....
Could someone take a look at the file I've attached please?
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #12 from Joel Sass sass.joel@gmail.com --- Created attachment 139112 --> https://bugs.freedesktop.org/attachment.cgi?id=139112&action=edit The modified file causing the problem in my comment.
Looks like there's some missing nomenclature between the patch you'd suggested, and the kernel source I acquired from git://kernel.ubuntu.com/ubuntu/unstable.git
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #13 from Alex Deucher alexdeucher@gmail.com --- Try the patches from this branch: https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-fixes-4.17
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #14 from Joel Sass sass.joel@gmail.com --- Alex, I just rebooted to this kernel after building. This problem still exists, but it's not a hard freeze!
I'll attach the dmesg showing the error.
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #15 from Joel Sass sass.joel@gmail.com --- Created attachment 139132 --> https://bugs.freedesktop.org/attachment.cgi?id=139132&action=edit This is the dmesg from an ssh session after attaching a monitor to my MST hub
root@nope:~/errors# uname -a Linux nope 4.16.0-rc7+ #2 SMP Thu Apr 26 08:45:00 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Kernel git acquired here: https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-fixes-4.17
Key message from dmesg:
[ 526.900234] Call Trace: [ 526.900280] dm_dp_mst_get_modes+0xce/0x120 [amdgpu] [ 526.900288] drm_helper_probe_single_connector_modes+0x199/0x6c0 [drm_kms_helper] [ 526.900294] ? jbd2_journal_stop+0xf3/0x3e0 [ 526.900297] ? __ext4_journal_stop+0x37/0xa0 [ 526.900309] drm_mode_getconnector+0x2c4/0x300 [drm] [ 526.900314] ? _cond_resched+0x16/0x40 [ 526.900324] ? drm_mode_connector_property_set_ioctl+0x60/0x60 [drm] [ 526.900333] drm_ioctl_kernel+0x67/0xb0 [drm] [ 526.900342] drm_ioctl+0x2a9/0x350 [drm] [ 526.900352] ? drm_mode_connector_property_set_ioctl+0x60/0x60 [drm] [ 526.900381] amdgpu_drm_ioctl+0x46/0x80 [amdgpu] [ 526.900385] do_vfs_ioctl+0xa2/0x5f0 [ 526.900389] ? vfs_write+0x162/0x1a0 [ 526.900391] SyS_ioctl+0x74/0x80 [ 526.900395] do_syscall_64+0x60/0x110 [ 526.900399] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #16 from Joel Sass sass.joel@gmail.com --- Created attachment 139134 --> https://bugs.freedesktop.org/attachment.cgi?id=139134&action=edit Here's the kernel .config I used for making the kernel
Key changes:
I added AMDGPU module, checked all 4 boxes. Looks like amdgpu.dc switch is gone, assuming that's intentional.
I also checked the optimization for Intel Core 2/Xeon processors kernel checkbox instead of generic x86
https://bugs.freedesktop.org/show_bug.cgi?id=106159
--- Comment #17 from Harry Wentland harry.wentland@amd.com --- I think we had a fix for that. Can you check if this is still a problem on https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next
https://bugs.freedesktop.org/show_bug.cgi?id=106159
Martin Peres martin.peres@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|NEW |RESOLVED
--- Comment #18 from Martin Peres martin.peres@free.fr --- -- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/348.
dri-devel@lists.freedesktop.org