Bug 392749 - Moving windows stutters the entire desktop
Summary: Moving windows stutters the entire desktop
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.11.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-05 07:48 UTC by Bart Ribbers
Modified: 2018-05-05 16:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kwin supportInformation (6.31 KB, text/plain)
2018-04-05 08:18 UTC, Bart Ribbers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Ribbers 2018-04-05 07:48:53 UTC
On my RX480 using the AMDGPU drivers with DC enabled (Linux 4.16 and Mesa 18.0.0, but happens with Mesa 17.2.8 as well), kwin stutters a lot when either moving windows around or drawing the item selection box on the desktop.

HW/SF setup:
KDE Frameworks 5.43.0
Qt 5.9.4
KDE Plasma 5.11.5
Kernel 4.16.0 (Gentoo) with AMDGPU-DC enabled
Xorg 1.19.5
libdrm 2.4.91
Mesa 18.0.0

AMD RX480
Comment 1 Bhushan Shah 2018-04-05 07:53:00 UTC
Please also include the supportInformation output

Alexy: is it possible that this is related to your recent change about mesa-18? and maybe it needs similar change in X11 side?
Comment 2 Bart Ribbers 2018-04-05 08:18:05 UTC
Created attachment 111837 [details]
kwin supportInformation
Comment 3 Bart Ribbers 2018-04-05 08:18:52 UTC
Also note that these performance issues don't occur in a Wayland session (although that has it's own (unrelated) problems), so it seems to be X related.
Comment 4 Alexey Min 2018-04-05 08:34:57 UTC
(In reply to Bhushan Shah from comment #1)
> Alexey: is it possible that this is related to your recent change about
> mesa-18? and maybe it needs similar change in X11 side?

It is possible that x11 side also needs a change.
But there's the problem, I'm using mesa from git (mesa-9999 in Gentoo terms), also amdgpu (only 4.15 kernel, not 4.16), and when I was trying X11 session, I did not see problems. If this bug happens with Mesa-17.2, then it is probably some other issue.
My fix was about kwin_wayland failed to init OpenGL compositing, and was falling back to QPainter, but this bug's supportInformation shows that OpenGL compositing is used.
Comment 5 Bart Ribbers 2018-04-06 22:52:11 UTC
I just installed Redshift, and although it makes the screen red like it's supposed to, it flickers a ton. I guess it's the same issue, and it honestly slowly becomes quite unbearable. What can I do to debug this more?
Comment 6 Alexey Min 2018-04-06 23:24:01 UTC
(In reply to Bart Ribbers from comment #5)
> I just installed Redshift, and although it makes the screen red like it's
> supposed to, it flickers a ton. I guess it's the same issue, and it honestly
> slowly becomes quite unbearable. What can I do to debug this more?

Do you also have =x11-drivers/xf86-video-amdgpu-18.0.1 installed?
Did you try with older kernel version...?
Comment 7 Alexey Min 2018-04-06 23:30:57 UTC
Or maybe do you have amdgpu-pro drivers? My kwin supportInformation has much lower versions numbers for opengl, glsl:

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 560 Series (POLARIS11 / DRM 3.23.0 / 4.15.12-gentoo, LLVM 5.0.1)
OpenGL version string: 2.1 Mesa 18.1.0-devel (git-d60eaf7b1f)
OpenGL platform interface: GLX
OpenGL shading language version string: 1.40
Driver: Unknown
GPU class: Unknown
OpenGL version: 2.1
GLSL version: 1.40
Mesa version: 18.1
X server version: 1.19.5
Linux kernel version: 4.15.12
Direct rendering: Requires strict binding: yes
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no
Comment 8 Bart Ribbers 2018-04-06 23:49:00 UTC
> Or maybe do you have amdgpu-pro drivers?

No. As I said in my original bug report, I use Mesa 18.0.0.

Downgrading my kernel to Linux 4.15.15 seems to have "fixed" the issue. Strange, since I use the same kernel configuration for it and I don't recall anything new related to AMD cards being added. Obviously I can't stay on this kernel forever though.
Comment 9 Alexey Min 2018-04-07 00:26:04 UTC
(In reply to Bart Ribbers from comment #8)
> Downgrading my kernel to Linux 4.15.15 seems to have "fixed" the issue.
> Strange, since I use the same kernel configuration for it and I don't recall
> anything new related to AMD cards being added.

Iteresting. I can also try 4.16 kernel to see if I will also have this issue.

According to phoronix article [1] 4.16 kernel had lots of changes to AMDGPU DC stack, especially this "Multi-Display Sync" thing, whatever it is, and you have 3 sccreens, right...?

> Obviously I can't stay on this kernel forever though.
Obviously you can stay on 4.15 for a looong time, because Gentoo only has 4.9 as stable kernel version.

1. https://www.phoronix.com/scan.php?page=article&item=linux-416-changes&num=2
Comment 10 Alexey Min 2018-04-07 01:11:20 UTC
Well, I tried 4.16 kernel and it could not even boot - I got kernel panic immediately after boot started. So I still cannot confirm this bug on kernel 4.16 :( Guess I'll stay on 4.15 for a long time, too. Will wait for 4.17 or at least 4.16.10 )
Comment 11 Bart Ribbers 2018-04-15 09:52:29 UTC
(In reply to Alexey Min from comment #9)
> According to phoronix article [1] 4.16 kernel had lots of changes to AMDGPU
> DC stack, especially this "Multi-Display Sync" thing, whatever it is, and
> you have 3 sccreens, right...?

Yeah you're right, 4.16 did change things. I do indeed use multiple screens, so I guess there lays the problem.

(In reply to Alexey Min from comment #9)
> Obviously you can stay on 4.15 for a looong time, because Gentoo only has
> 4.9 as stable kernel version.

I mean, I can, but I use the newest kernel because I'm using quite recent hardware and I'd like to have the best support possible. 4.16 is another example that added new stuff that my hardware uses which I'd like to make use of (Freesync for example), so I'm not really willing to stay behind.


Can I do something else to get some more detailed info?
Comment 12 Alexey Min 2018-04-21 18:17:16 UTC
4.16 brought only rgressions for me, after "fixing" kernel panic on boot (effectively by disabling AMD Crypto device driver that caused problems - https://forums.gentoo.org/viewtopic-p-8209394.html?sid=5dab9ea2149faa091c563274ac590528) I finally could boot with 4.16.3. And now I can see what you're talking about in this bug. Whole screen blinks sometimes when moving window (sometimes not). I use only 1 monitor (3840x2160). ( https://www.youtube.com/watch?v=xxn5GyX2N8U )

In 4.15 no problems. With the same kwin versions. Looks like amdgpu regression :(
I will stay with 4.15 for now
Comment 13 Bart Ribbers 2018-04-21 18:20:59 UTC
Sure that's an option, but eventually all distributions will move to 4.16+. Seeing this is pretty easily reproducible (literally just use the newest kernel and have na AMD card) and has quite a big impact on usability, it seems important to be fixed. Maybe not now, but definitely before all major distros move to 4.16+.
Comment 14 Christoph Feck 2018-04-22 02:51:59 UTC
Alexey, what exactly are you confirming? If you could confirm the bug is caused by the amdgpu driver, please resolve as 'downstream'. If you wanted to confirm the bug is caused by kwin, please add your findings for developers interested to fix the issue.
Comment 15 Alexey Min 2018-04-22 07:41:30 UTC
The bug exists, I'm just not sure where exactly. Looks like not in kwin.
Sorry
Comment 16 Alexey Min 2018-05-05 15:35:09 UTC
Can't reproduce this anymore with kernel 4.16.7 (both X11 and wayland).
Just tested with kernel 4.16.3, both X11 and wayland had this.
Bart Ribbers can you test?
Comment 17 Bart Ribbers 2018-05-05 16:03:54 UTC
You're right, I can confirm that the issue is gone on 4.16.7. Thanks for reporting it!