Summary: | [amdgpu] Switching to tty fails with DisplayPort 1.2 monitor going to sleep (REG_WAIT timeout / dce110_stream_encoder_dp_blank) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Shmerl <shtetldik> | ||||||||||
Component: | DRM/AMDgpu | Assignee: | Default DRI bug account <dri-devel> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | medium | CC: | b.bellec, ben.r.xiao, ddstreet, dominik, freedesktop, harry.wentland, me, nicholas.kazlauskas, sunpeng.li | ||||||||||
Version: | unspecified | ||||||||||||
Hardware: | x86-64 (AMD64) | ||||||||||||
OS: | Linux (All) | ||||||||||||
Whiteboard: | |||||||||||||
i915 platform: | i915 features: | ||||||||||||
Attachments: |
|
Description
Shmerl
2018-09-18 13:01:09 UTC
Same thing happens with kernel 4.19-rc4. Still broken with 4.19.0-rc6-amd64. Is this issue Debian specific or anyone observed it in other distros? Because if it's something wrong with Debian's kernel build I should probably file a Debian bug about it. I have same problem on Fedora F28 with 4.18 kernel. I have since switched back to DVI interface which does not exhibit this bug. My card doesn't have DVI, and HDMI produces horrible colors, so DisplayPort is the only sane option and it's broken :( I haven't observed this behavior occurring under Ubuntu 18.04 or Arch on 4.18 or 4.19 kernels with a Vega 56. Do you mind posting a full dmesg log with drm.debug=4 and an xorg log? It would also help to know what desktop environment you're using. I'm using KDE Plasma 5.13.5, current Debian testing x86_64. Can you try it with Debian? Ubuntu stack is not that close anymore. I also noticed one detail. When screen mode is chaning (like before sddm comes up), the monitor goes to sleep briefly and then wakes up. That wasn't happening before and it's not a correct behavior. In 4.18 it wasn't waking up at all, and it was fixed in 4.19. Similar thing is happening during switch to tty (screen mode is changing indicated by the DP monitor icon appearing), except the monitor isn't waking up anymore. Created attachment 141960 [details]
dmesg with drm.debug=4 and Xorg.0.log
Attaching logs.
By the way, I tested it with this kernel: https://github.com/M-Bab/linux-kernel-amdgpu-binaries/blob/master/linux-image-4.19.0-rc6_18.09.30.amdgpu_amd64.deb Which is built from AMD's tree. This issue is also present in it. I just found something. My monitor - Dell U2413 has a setting for toggling DisplayPort 1.2. It was enabled until now. When I disable that setting, tty starts working! My cable is supposed to support DP 1.2 and be Vesa compliant. It's Accel UltraAV DP 1.2 cable. I hope this can help narrow down the problem. (In reply to Shmerl from comment #10) > I just found something. My monitor - Dell U2413 has a setting for toggling > DisplayPort 1.2. It was enabled until now. When I disable that setting, tty > starts working! > > My cable is supposed to support DP 1.2 and be Vesa compliant. It's Accel > UltraAV DP 1.2 cable. > > I hope this can help narrow down the problem. Interesting, I have the exact same monitor, Dell U2413, I'll give this a try! @Nicholas Kazlauskas: does it help to identify the source of the problem? (In reply to Shmerl from comment #12) > @Nicholas Kazlauskas: does it help to identify the source of the problem? If I had to guess I would say this is an issue specific to that monitor - DP 1.2 should generally work without issue. This does help narrow down the problem, thanks. (In reply to Nicholas Kazlauskas from comment #13) > > If I had to guess I would say this is an issue specific to that monitor - DP > 1.2 should generally work without issue. It did work fine before in DP 1.2 mode (like with kernel 4.17.x), so there must have been some regression which caused this behavior. I own a DELL U2414H and a U2913WM, and are daisy chained via DisplayPort. I'm currently running into this issue. A quick bisect gave this result: # first bad commit: [0d99889109892396a8164bf6dd178e36d3fe3166] drm/fb-helper: Eliminate the .best_encoder() usage I own a Dell U3415W also connected via DisplayPort and I have the same issue. Worked like a charm in the past. (In reply to Nicholas Kazlauskas from comment #13) > > This does help narrow down the problem, thanks. Is there any chance of fixing this in 4.20? Same problem for me. Using 2 identical DELL U2415 and a Radeon RX 580. On Arch with 4.18.x Daisychainig both monitors worked like a charm. After upgrading to 4.19 the monitors only work when I`m disableing DP1.2. But then I obviously can't Daisychain. Is there any way I can help troubleshoot this? This seem to commonly affect Dell monitors. Do they not follow DisplayPort 1.2 spec, or amdgpu is doing something incorrectly after all? The fix is showing up since 4.20-rc5. Please give a try. (In reply to Jerry Zuo from comment #20) > The fix is showing up since 4.20-rc5. Please give a try. 4.20-rc5 solves the problem for me! Great news! Debian didn't get 4.20 rc kernels yet, but I can try building one from source to test. Switching to tty now works for me , I still get the [drm:generic_reg_wait [amdgpu]] *ERROR* REG_WAIT timeout 10us * 3000 tries - dce110_stream_encoder_dp_blank line:944 message though Does KWin Wayland session work for you now? It was crashing also because of this. Just built 4.20-rc5+. This is indeed fixed, and KWin Wayland session is finally working with DisplayPort 1.2 enabled! And I don't see ERROR* REG_WAIT anymore. I'm using latest Vega firmware. The dce110_stream_encoder_dp_blank timeout is something I am working on. It doesn't break anything, but pretty annoying. Not sure if it's related, but with 4.20.0-rc6 the regression when monitor goes to sleep before reaching sddm is back. It's erratic, i.e. doesn't happen on every boot. And I do see this REG_WAIT in dmesg when it does. Turning monitor off and on, then going to tty and restarting sddm works around it. Similar bug was fixed in the previous kernels, so I wonder if the fix for this one somehow brought that issue back. GPU: Sapphire Pulse Vega 56. Created attachment 142834 [details] [review] parch for reg_wait timeout for dce Please try the patch, and see if you can see reg_wait timeout dce110_stream_encoder_dp_blank() (In reply to Jerry Zuo from comment #30) > Please try the patch, and see if you can see reg_wait timeout > dce110_stream_encoder_dp_blank() Can you attach a non-zipped version? Created attachment 142835 [details] [review] Patch for dp_blank timeout Just tried the patch, so far no reg_wait warnings. Looking good! I tested the patch. I don't see the error message now, but the startup monitor sleep regression is still present. Is it a separate issue? I can open another bug if needed. "startup monitor sleep regression". Please give more details on that. Thanks. (In reply to Jerry Zuo from comment #35) > "startup monitor sleep regression". Please give more details on that. Thanks. This behavior used to happen in the previous kernerls but got fixed at one point. Now it's back. Basically, after GRUB, the system boots (I usually enable loglevel=4 to see system output), but right before reaching graphical login (sddm in my case), the monitor simply switched to sleep mode. To work around it, I have to: 1. Turn the monitor off and on. 2. Switch to tty1, and restart sddm from there. This enables graphical login. I wonder if it's some kind of distro specific race condition that happens during boot. Happens to me in Debian testing (you can try reproducing it there). (In reply to Jerry Zuo from comment #30) > Please try the patch, and see if you can see reg_wait timeout > dce110_stream_encoder_dp_blank() Do you plan to backport at least this patch to 4.20.x? FYI: the dmesg message fix should be already included in 5.0-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/amd/display/dc/core/dc_link.c?h=v5.0-rc1&id=8c9d90eebd23b6d40ddf4ce5df5ca2b932336a06 Just tested kernel 5.0-rc1, the boot problem with monitor going to sleep is still happening. Same workaround (turn the monitor off / on, switch to tty1, restart sddm) helps. Same thing still happen with 5.0-rc2. Does anyone else experience this race condition when the monitor goes to sleep right after boot? It is related to the same setup (DisplayPort 1.2), since it's not happening with it disabled. We are currently looking at the startup issue now. We observed MST cannot light up in every reboot since 4.20, and we've already got the reboot/poweroff sequence fixed. The fix will show up soon ... Created attachment 143225 [details] [review] Patch for fixing MST reboot/poweroff sequence Please try the patch and see if that fixes your issue. We will come up with proper solution later. (In reply to Jerry Zuo from comment #45) > Please try the patch and see if that fixes your issue. We will come up with > proper solution later. I tested the patch, and it didn't fix the issue for me. You observed the monitor goes to sleep right after reboot, did you? Hotplug will have the display back on. Is that what you observed? (In reply to Jerry Zuo from comment #47) > You observed the monitor goes to sleep right after reboot, did you? Hotplug > will have the display back on. Is that what you observed? After any boot, not necessarily reboot. The system boots to the point where sddm should start, and monitor turns sleep mode on.Toggling the monitor off and (and then restarting sddm) works around it. Though my tests mostly focused on reboots. Let me double check what happens after actual cold off and boot. I think I know what happened. When I was rebooting, I still had the older kernel running (without the fix), to actually test the new one, so probably the bug still kicked in after reboot. I now rebooted a few more times already from the patched kernel, and I don't see the issue anymore. It also doesn't happen with boot from complete off state. Thanks! Good to hear that the patch fixes your issue. The official patch will be merged to the next kernel release. Thank you so much for your dedicated testing and prompt feedback ^_^ (In reply to Jerry Zuo from comment #51) > Good to hear that the patch fixes your issue. The official patch will be > merged to the next kernel release. Thank you so much for your dedicated > testing and prompt feedback ^_^ Thanks! Do you mean the fix will land in 5.0 or the one release after that? The fix should show up in the coming release. (In reply to Jerry Zuo from comment #53) > The fix should show up in the coming release. Great, thanks! Looks like the fix didn't make it into 5.0-rc7: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c?h=v5.0-rc7#n789 I see the fix in this submission though: https://lists.freedesktop.org/archives/amd-gfx/2019-February/031437.html So it's coming in 5.1 only? (In reply to Shmerl from comment #56) > I see the fix in this submission though: > https://lists.freedesktop.org/archives/amd-gfx/2019-February/031437.html This patch missed the window for last week's -fixes pull. > > So it's coming in 5.1 only? It can still land in 5.0 and prior kernels via stable if it doesn't make it in for 5.0 final. The fix now merged in release branch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6ee2846cb4e7c6e8acdcb265299ad1c6de42b437 Closing, since it's already fixed in the released kernels. |
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.