dc=1 kernels somehow trigger a disconnect of an lg ultrawide monitor during DP link training while attempting a wakeup
Submitted by Mariusz Mazur
Assigned to Default DRI bug account
Link to original bug (#106529)
Description
Created attachment 139577
ubuntu's 4.15 dmesg with amdgpu.dc_log=1
It appears that the display-handling code in 4.15+ (including 4.17-rc5) marks any display not fully woken up as disconnected or something to that effect. So when I have multiple monitors and they get woken up from sleep (doesn't matter whether the computer was suspended or just idle for a long period), and my primary display wakes up slower than the any of the other displays (and it does), then for a few hundred ms KDE tries to change the primary display to the one that first woke up (I'm guessing it thinks that's the only one available), then changes its mind a bit later, when all displays wake up.
End result looks like crap and is not usable, since all my windows get displaced. Here's how it looks like in practice:
Setup:
Radeon RX 560
Primary display: bottom right, displayport, on
Secondary display 1: left, hdmi, on
Secondary display 2: top right, dvi, off
Video of how it used to work, using 4.4.15: https://www.youtube.com/watch?v=h7nMYbm5ZxU
Note how even though the left (secondary) display wakes up first, both instantly display their proper desktops.
Video of how it works with ubuntu 18.04's default 4.15 kernel/4.16.7/4.17-rc5: https://www.youtube.com/watch?v=VdVFNXPszSI
Note how when the left (secondary) display wakes up first, KDE decides that this is probably the only display available, so tries to switch the primary desktop to it, then a split second later the bottom right wakes up and KDE knows that should be the primary according to the config, so it switches back.
Attached is dmesg from ubuntu's 4.15 with dc_log=1. I put the computer to sleep, then wake it up and get the behavior like in the video.
Attachment 139577, "ubuntu's 4.15 dmesg with amdgpu.dc_log=1":
dmesg-ubuntu-4.15.log