Skip to contentSkip to conversation

Tearing after screen wakeup/on

Bug 103791 [email protected] 1 participant 24 messages Nov 17, 2017 – Oct 4, 2018

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 103791
Summary: Tearing after screen wakeup/on
Product: DRI
Version: XOrg git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

Hi

Sometimes after screen wakeup/turning on I start to experience tearing. Tear free mode works fine before sleep/turning display off.

My hardware is XFX Radeon RX580.
Software:
kernel-4.13.13+ck1,
xorg-1.19.5,
xf86-video-amdgpu (git 3a4f7422913093ed9e26b73ecd7f9e773478cb1e), libdrm-2.4.88

See dmesg, Xorg.0.log, xorg.conf attached.

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=103791

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

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=103791

--- Comment #3 from [email protected] ---
Created attachment 135554
--> https://bugs.freedesktop.org/attachment.cgi?id=135554&action=edit
Xorg.0.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

#4 lore raw
In reply to [email protected]

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

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

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

 Attachment #135554|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

#5 lore raw
In reply to [email protected]

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

--- Comment #4 from Michel Dänzer <[email protected]> ---
We need to find out why the kernel starts returning -EINVAL from the page flip and wait for vblank ioctls.

Can you try writing 255 to /sys/module/drm/parameters/debug before reproducing the problem, and attach the resulting dmesg output? (Note that writing non-0 to /sys/module/drm/parameters/debug will cause a lot of debugging output to be generated, so you'll want to write 0 to it again soon afterwards)

In case that doesn't reveal why -EINVAL is being returned, are you able to recompile the drm.ko / amdgpu.ko kernel modules with a patch applied?

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=103791

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

Quoted 8 lines

We need to find out why the kernel starts returning -EINVAL from the page flip and wait for vblank ioctls.

Can you try writing 255 to /sys/module/drm/parameters/debug before reproducing the problem, and attach the resulting dmesg output? (Note that writing non-0 to /sys/module/drm/parameters/debug will cause a lot of debugging output to be generated, so you'll want to write 0 to it again soon afterwards)

Got it. I'll attach dmesg as soon as I reproduce the issue.

Quoted 2 lines

In case that doesn't reveal why -EINVAL is being returned, are you able to recompile the drm.ko / amdgpu.ko kernel modules with a patch applied?

Sure. Gentoo is there :)

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=103791

--- Comment #6 from [email protected] ---
Created attachment 135701
--> https://bugs.freedesktop.org/attachment.cgi?id=135701&action=edit
dmesg + debug

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=103791

--- Comment #9 from Michel Dänzer <[email protected]> --- Created attachment 135808
--> https://bugs.freedesktop.org/attachment.cgi?id=135808&action=edit
Add debugging output why the ioctls return -EINVAL

Sorry, been busy with other fires.

Please recompile the drm.ko module with this patch applied, reproduce the result with the resulting binary and attach the dmesg output.

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=103791

--- Comment #10 from Michel Dänzer <[email protected]> --- BTW, the patch is completely untested; if it fails to compile, hopefully it won't be hard to fix it up.

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=103791

--- Comment #11 from [email protected] ---
Yes, I fixed some small issues with the patch.
Now I have following appear in dmesg:

[ 2108.319205] [drm] drm_crtc_vblank_get returned -EINVAL
[ 2108.319235] [drm] crtc 0 failed to acquire vblank counter, -22
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=103791

--- Comment #12 from [email protected] ---
Created attachment 135917
--> https://bugs.freedesktop.org/attachment.cgi?id=135917&action=edit
dmesg with debug

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=103791

--- Comment #13 from Michel Dänzer <[email protected]> --- Created attachment 135923
--> https://bugs.freedesktop.org/attachment.cgi?id=135923&action=edit
drm_vblank_get debugging output

Please do the same with this patch, to see why drm_vblank_get returns -EINVAL.

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=103791

--- Comment #14 from [email protected] ---
Created attachment 135938
--> https://bugs.freedesktop.org/attachment.cgi?id=135938&action=edit
dmesg with vblank debug

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=103791

--- Comment #15 from Michel Dänzer <[email protected]> --- Created attachment 135969
--> https://bugs.freedesktop.org/attachment.cgi?id=135969&action=edit
Debugging output related to enabling/disabling the vblank interrupt

Another iteration, to find out why the vblank interrupt doesn't get enabled.

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=103791

--- Comment #16 from [email protected] ---
Created attachment 135989
--> https://bugs.freedesktop.org/attachment.cgi?id=135989&action=edit
dmesg with vblank interrupt

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=103791

--- Comment #17 from Michel Dänzer <[email protected]> --- Thanks. I think I see what's happening, but I need some time to think about how to address it.

Meanwhile, you should be able to re-enable TearFree by forcing a modeset, e.g. by re-enabling the TearFree property:

xrandr --output DisplayPort-0 --set TearFree on

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=103791

--- Comment #18 from Anthony Parsons <[email protected]> --- Hi, I'm seeing the same problem on an RX550 (polaris12). Running xrandr doesn't seem to work as a workaround but flipping VTs does. Would having the debug output for this one be useful, or was the other log enough?

kernel 4.14.5-zen+
xorg 1.19.5
xf86-video-amdgpu 1.4.0
libdrm 2.4.88

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=103791

--- Comment #19 from [email protected] ---
Still better to have a proper fix first as New Year present to us (poor users) ;)

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=103791

--- Comment #20 from [email protected] ---
Doing

$ xrandr --output DisplayPort-0 --set TearFree on

... does not help. Tearing is still present.

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

#22 lore raw
In reply to [email protected]

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

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

Quoted 1 line

Running xrandr doesn't seem to work as a workaround but flipping VTs does.

Have you tried turning it off and on again? (Who gets the reference? :)

xrandr --output DisplayPort-0 --set TearFree off
xrandr --output DisplayPort-0 --set TearFree on

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=103791

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

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

           Assignee|[email protected] |[email protected]
                   |.org                        |
         QA Contact|                            |[email protected]
          Component|DRM/AMDgpu                  |Driver/AMDgpu
            Version|XOrg git                    |git
            Product|DRI                         |xorg
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