Bug 381444 - Stuttering when compositing is on
Summary: Stuttering when compositing is on
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.10.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-20 14:03 UTC by Christoph Haag
Modified: 2017-10-09 15:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
supportInformation (5.84 KB, text/plain)
2017-06-20 15:18 UTC, Christoph Haag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Haag 2017-06-20 14:03:01 UTC
This may be similar to bug 353038 but that one is old and I noticed it only recently. Whether it has been happening longer and I just didn't notice, I don't know.

RX 480, latest mesa git, and I tried Linux 4.11-zen and 4.12-rc.

Reproduction is simple: Start glxgears, use kwin to put it in fullscreen, observe it closely for a minute or so. You should see several small stutters in that time. If you let it run some time, it randomly starts stuttering more visibly for 2-3 seconds and then goes back to normal.

If you don't see it, try adding the gallium fps graph and let it update every frame:
GALLIUM_HUD='.h1000.w1000.c70fps' GALLIUM_HUD_PERIOD=0 glxgears
Watching the fps line closely should make the stutters more visible.

I do not believe it's the fault of the drivers because with compton this does not happen.

I tried kwin 5.10.2 and latest git, it happens on both. I only really tried on Xorg.
Comment 1 Martin Flöser 2017-06-20 15:04:25 UTC
please provide output of:
qdbus org.kde.KWin /KWin supportInformation
Comment 2 Christoph Haag 2017-06-20 15:18:43 UTC
Created attachment 106191 [details]
supportInformation

I also tried playing with the options a bit

GLPreferBufferSwap=a,b,c
GLTextureFilter=0,2
WindowsBlockCompositing=true,false

I also tried adding MaxFPS=300

All to no real effect.
Comment 3 Martin Flöser 2017-06-21 05:09:22 UTC
please try default settings. Click reset in this dialog.
Comment 4 Christoph Haag 2017-06-21 07:11:10 UTC
"Defaults" in the Compositor settings? No effect.
I had also tried deleting ~/.config/kwinrc, so I'm sure it happens with the default settings.

The first question is, can anyone reproduce this? Maybe someone with radeonsi/amdgpu?
Comment 5 Martin Flöser 2017-06-21 14:55:19 UTC
I only have Intel hardware and have in general problems observing frame drops by just looking at them.
Comment 6 Christoph Haag 2017-10-09 12:44:40 UTC
Just got a new monitor (again 1920x1080@60Hz) and booted with a fresh mesa/xf86-video-amdgpu git + agd5f/drm-next-4.15-dc stack after not trying for a while and I'm happy to say that I can not reproduce it. With kwin compositing enabled, glxgears in fullscreen runs very smooth now.

One thought comes to mind looking at xrandr:
1920x1080     60.00*+  50.00    59.94
Maybe there were some timing issues when the exact refresh rate wasn't 60Hz?
I tried with
xrandr --output DisplayPort-0 --mode 1920x1080 --rate 59.94
but glxgears is still smooth, but maybe that's not the case for all "slightly off" refresh rates?

It bugs me that compton did not have this issue with the same ext_buffer_age synchronisation method, so it must be something kwin did/does...
Comment 7 Martin Flöser 2017-10-09 15:10:42 UTC
The refresh rate being off shouldn't be a problem, that's kind of normal given that one cannot divide 1 sec through 60 cleanly ;-)