Skip to contentSkip to conversation

amdgpu kernel 5.2 blank display after resume from suspend

Bug 111244 [email protected] 1 participant 39 messages Jul 29, 2019 – Nov 19, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Bug ID: 111244
Summary: amdgpu kernel 5.2 blank display after resume from
suspend
Product: DRI
Version: DRI git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

Created attachment 144901
--> https://bugs.freedesktop.org/attachment.cgi?id=144901&action=edit
kernel log

Model: Lenovo Ideapad S340 15"
CPU: AMD Ryzen 5 3500U

Starting with kernel 5.2, laptop has a blank display after resuming from suspend. Problem doesn't appear with recent kernels up to 5.1.16. Attached is a kernel log and git bisect logs.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #2 from [email protected] ---
Created attachment 144903
--> https://bugs.freedesktop.org/attachment.cgi?id=144903&action=edit
second bisect log

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #144901|text/x-log                  |text/plain
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Michel Dänzer <[email protected]> ---
The fact that you got two different bisection results indicates that the problem might be not 100% reproducible, and you accidentally marked some affected commits as good. Please test a given commit longer / more often before declaring it "good".

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #4 from [email protected] ---
The first bisect pointed to a merge commit so the second was done to bisect within the merged commits.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #5 from Michel Dänzer <[email protected]> --- (In reply to cspack from comment #4)

Quoted 2 lines

The first bisect pointed to a merge commit so the second was done to bisect within the merged commits.

That doesn't invalidate my previous comment. :) git bisect identifying a merge commit already indicates the same thing by itself. In particular, the fact that it identified a merge commit means that you declared all of its parent commits good.

(There *are* rare cases where a problem is actually introduced by a merge commit itself, but then the second bisection should have either identified the same merge commit again (if you tested it again), or failed, because all the other commits you tested should have been good again.)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #6 from [email protected] ---
I see your point, and you are correct. It seems the issue is not 100% reproducible. I will redo the bisect and test more thoroughly. Thank you.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Samuele Decarli <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #7 from Samuele Decarli <[email protected]> --- @cspack I am currently repeating your bisection on similar hardware, however I have found 27eaa4927dc3be669ed70670241597ac73595caf to be bad. Could you please retest that commit as well?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Acked-by Alex Deucher Reviewed-by Marek Olšák
#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #8 from Samuele Decarli <[email protected]> --- Created attachment 144928
--> https://bugs.freedesktop.org/attachment.cgi?id=144928&action=edit
Result of git bisect

Model: HP EliteBook 745 G5
CPU/GPU: AMD Ryzen 7 PRO 2700U

I completed my bisection and this is the log.
The first bad commit seems to be this one. It's actually a fairly innocent commit, so it's probably causing a bug somewhere else.

df8368be1382b442384507a5147c89978cd60702 is the first bad commit commit df8368be1382b442384507a5147c89978cd60702

Author: Nicholas Kazlauskas <[email protected]>
Date:   Wed Feb 27 12:56:36 2019 -0500

drm/amdgpu: Bump amdgpu version for per-flip plane tiling updates

To help xf86-video-amdgpu and mesa know DC supports updating the tiling attributes for a framebuffer per-flip.

 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #9 from Samuele Decarli <[email protected]> --- Created attachment 144929
--> https://bugs.freedesktop.org/attachment.cgi?id=144929&action=edit
Kernel log displaying issue

Compressed here is my kernel log, which shows repeating stack traces

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #10 from Samuele Decarli <[email protected]> --- Interestingly the same commit is blamed for anther issue
https://bugs.freedesktop.org/show_bug.cgi?id=111122

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Samuele Decarli <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           See Also|                            |https://bugs.freedesktop.or
                   |                            |g/show_bug.cgi?id=111122
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #11 from [email protected] ---
@Samuele Yes, after redoing the bisect I got the same result as you did. Thanks.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #12 from [email protected] ---
One thing to note, the problem doesn't seem to occur for me if a compositor isn't running. In my case, after disabling compton I could not reproduce the problem.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Samuele Decarli <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #13 from Samuele Decarli <[email protected]> --- Similar thing for me: disabling composition in Plasma makes suspend/resume work again.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #14 from Damian Kaczmarek <[email protected]> --- Another workaround is to switch to the text terminal (Ctrl+Alt+F2) before suspending.

Occuring on Thinkpad T495, Ryzej 3700U, openSUSE Tumbleweed (kernel 5.2.2-1)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #15 from Damian Kaczmarek <[email protected]> --- Are any other known workarounds? Perhaps some kernel options?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #16 from [email protected] ---
This commit in xf86-video-amdgpu seem to be where things break
https://github.com/freedesktop/xorg-xf86-video-amdgpu/commit/a2b32e72fdaff3007a79b84929997d8176c2d512

Adding amdgpu.dc=1 to kernel options seems fix the issue for me.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#19 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #17 from [email protected] ---
Created attachment 144967
--> https://bugs.freedesktop.org/attachment.cgi?id=144967&action=edit
xf86-video-amdgpu git bisect

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#20 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #144967|text/x-log                  |text/plain
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #18 from Michel Dänzer <[email protected]> --- (In reply to cspack from comment #16)

Quoted 1 line

Adding amdgpu.dc=1 to kernel options seems fix the issue for me.

Presumably you mean amdgpu.dc=0 ?

Your findings indicate that the kernel driver DC code doesn't handle flipping between buffers with different tiling parameters correctly in some cases.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#23 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #20 from Michel Dänzer <[email protected]> --- (In reply to cspack from comment #19)

Quoted 1 line

With amdgpu.dc=0, X doesn't start ((EE) AMDGPU(0): No modes.)

Right (I realized the amdgpu kernel driver doesn't support display with your GPU without DC), but amdgpu.dc=1 is the default. It was probably just luck that it worked once, which is why your first bisect attempts failed.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#24 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #21 from [email protected] ---
The default is -1 according to the docs and /sys/module/amdgpu/parameters/dc. I assume it should effectively be the same but it seems to result in different behavior vs. setting it to 1. DC is enabled in both cases (the log shows "Display Core initialized"), but setting it to default results in a suspend/resume failure 100% of the time. Whereas setting it to 1 results in success most of time, although it did fail eventually after several reboots. Very strange.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#25 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #22 from Michel Dänzer <[email protected]> --- (In reply to cspack from comment #21)

Quoted 2 lines

The default is -1 according to the docs and
/sys/module/amdgpu/parameters/dc.

What I meant is it's enabled by default for you, so amdgpu.dc=1 has no effect.

Quoted 2 lines

I assume it should effectively be the same but it seems to result in different behavior vs. setting it to 1.

The different behaviour is just luck, which is why you had trouble bisecting initially, not related to amdgpu.dc=1.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#26 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #23 from Samuele Decarli <[email protected]> --- amdgpu.dc=1 had no effect on my machine. On my computer resume fails quite consistently

Any idea on what should be done to fix this, or even what is the cause?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#27 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #24 from [email protected] ---
Having the same issue on a ThinkPad T495s (BIOS 1.06) with a Ryzen 7 PRO 3700U, Kernel 5.2.8-arch1-1-ARCH, Mesa 19.1.4-1 and running sway (wayland) as a window manager.

dmesg shows me:
[drm] Fence fallback timer expired on ring sdma0
amdgpu 0000:05:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on gfx (-110).
[drm:amdgpu_device_ip_late_init_func_handler [amdgpu]] *ERROR* ib ring test failed (-110).

One thing to note is that setting amd_iommu=off as a kernel parameter makes this issue really rare but it'll still sometimes happen, maybe it's also just luck.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#28 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #25 from Andrey Grodzovsky <[email protected]> --- (In reply to miba_c from comment #24)

Quoted 11 lines

Having the same issue on a ThinkPad T495s (BIOS 1.06) with a Ryzen 7 PRO 3700U, Kernel 5.2.8-arch1-1-ARCH, Mesa 19.1.4-1 and running sway (wayland) as a window manager.

dmesg shows me:
[drm] Fence fallback timer expired on ring sdma0
amdgpu 0000:05:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on gfx (-110). [drm:amdgpu_device_ip_late_init_func_handler [amdgpu]] *ERROR* ib ring test failed (-110).

Quoted 3 lines

One thing to note is that setting amd_iommu=off as a kernel parameter makes this issue really rare but it'll still sometimes happen, maybe it's also just luck.

Please attach full log, also it looks log.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#29 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #26 from [email protected] ---
Created attachment 145065
--> https://bugs.freedesktop.org/attachment.cgi?id=145065&action=edit
failed suspend log

Attached full log

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#31 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #28 from [email protected] ---
Created attachment 145406
--> https://bugs.freedesktop.org/attachment.cgi?id=145406&action=edit
failed suspend 5.2.14

Still occasionally happens on 5.2.14. Hard to figure out what's causing this since it seems rather random and only happens once in a while.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#32 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #29 from Gabriel C <[email protected]> --- Michael,

I see the same on a Ryzen 7 35750H APU + RX 560x Nitro5 Laptop.

reverting
https://github.com/freedesktop/xorg-xf86-video-amdgpu/commit/a2b32e72fdaff3007a79b84929997d8176c2d512

fixes the problem for me.

I tested kernels 5.2*, 5.3, and all have the same problem when suspending from X with that commit, without the commit everything is working fine.

( will test 5.4git once drm-next is in but I tested amd-staging-drm-next some days ago and that didn't work also )

If you need more informations please let me know.

I can test any kind patches kernel/X/mesa and/or give you debug info if you tell me what you may need.

Best Regards,

Gabriel C

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#33 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #30 from Gabriel C <[email protected]> --- (In reply to Gabriel C from comment #29)

Quoted 3 lines

Michael,

I see the same on a Ryzen 7 35750H APU + RX 560x Nitro5 Laptop.

It is 3750H :-)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#34 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #31 from Gabriel C <[email protected]> --- I tested now 5.4git on commit 10169-g574cc4539762.

mesa 19.1.7
xorg-server 1.20.5
xf86-video-amdgpu 19.0.1

Suspend to ram seems to work better, 8 of 10 suspends worked. Suspend to disk is still the same, broken.

With the commit reverted suspend to ram or to disk are fine.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#37 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

--- Comment #34 from Carmen Bianca Bakker <[email protected]> --- Created attachment 145793
--> https://bugs.freedesktop.org/attachment.cgi?id=145793&action=edit
failed suspend 5.4.0rc2

Issue still occurs on 5.4rc2. In these logs, on the second suspension.

Thinkpad X395, Ryzen 3500U.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#38 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=111244

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #35 from Martin Peres <[email protected]> --- -- 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/883.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel