Bug 353038 - Drawing is stuttering
Summary: Drawing is stuttering
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.4.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-22 13:06 UTC by Ralf Jung
Modified: 2023-09-06 10:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kwin support info (5.44 KB, text/plain)
2015-09-22 13:40 UTC, Ralf Jung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Jung 2015-09-22 13:06:28 UTC
When compositing is enabled, drawing of frames is not happening in regular time intervals - it is stuttering. This is particularly noticeable - and becomes almost unbearable - during video playback.

Reproducible: Always

Steps to Reproduce:
1. Get my gltest program from https://www.ralfj.de/git/gltest.git (or some video with lots of scrolling)
2. Start "./glxtest -i 1" (or start the video)
3. Compare how it looks with compositing enabled, and disabled. Also try maximized and full-screen (F1 in gltest).

Actual Results:  
With compositing disabled, the vertical bar moves smoothly, as it should. With compositing enabled, the bar starts to stutter, move irregularly. I am not sure if frames are dropped, or old frames are repeated.
(Without compositing, of course, there's tearing if the window is just maximized, but that's expected.)

Expected Results:  
It should be smooth, always.

This is a bad regression compared to the previous version of kwin I used (from KDE 4.12 or so). I now have to disable compositing to watch videos.

I tried both "Automatic" and "Full-scene repaint" as vsync settings, same behavior in both cases.

I'm on Debian testing, with an Intel HD graphics card.
Comment 1 Thomas Lübking 2015-09-22 13:09:13 UTC
KWIN_USE_BUFFER_AGE=0 kwin_x11 --replace &
Comment 2 Ralf Jung 2015-09-22 13:22:12 UTC
That doesn't look like it's changing anything.
Comment 3 Thomas Lübking 2015-09-22 13:27:37 UTC
Please provide the output of
   qdbus org.kde.KWin /KWin supportInformation
then.
Comment 4 Ralf Jung 2015-09-22 13:40:07 UTC
Created attachment 94677 [details]
kwin support info
Comment 5 Thomas Lübking 2015-09-22 14:12:42 UTC
Can you please try whether you get the same behavior on UXA acceleration?

--- /etc/X11/xorg.conf.d/20-intel.conf ----
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection
Comment 6 Ralf Jung 2015-09-22 19:42:56 UTC
That seems to make things much better in glxtest, and in watching a TV show. (The issue doesn't really show up when watching talks; not enough things move.)

However, the intel Xorg driver hasn't been updated on my system since July 23rd. Doesn't this mean that SNA was used (without trouble) even before the update to KDE5? The only recent X-related update was updating xserver-xorg-core from 2:1.17.2-1 to 2:1.17.2-1.1, which according to the changelog was only about some man pages.
Comment 7 Thomas Lübking 2015-09-22 19:56:45 UTC
It could mean that the driver is knocked out by the massive amount of glx contexts in plasma 5.
Can you log into a naked X11 server ("failsafe", only an xterm), run only kwin_x11 and your glxtest from there?
Comment 8 Ralf Jung 2015-09-27 14:17:22 UTC
Rather ironically, the "failsafe" session fails. The log of sddm says "invalid session /usr/share/xsession/failsafe.desktop", and indeed there is no such file - or any file with that name anywhere in /usr, or in any package I could install. I don't know why SDDM even offers that session. (This is a bug I will report with the Debian packages.)

I tried killing plasmashell (after disable UXA again), that did not change anything.
Comment 9 Thomas Lübking 2015-09-27 14:37:42 UTC
That doesn't cut it necessarily.

I usually don't run plasmashell. When I did for testing and "accidentally" triggered the calendar view after some other popups (on an nvidia system) *every* GL (inc. KWin) client went south (completely, I had to restart X11)

I've never seen such before :-(
Comment 10 Martin Flöser 2016-11-02 13:51:52 UTC
As it's Intel hardware - same question as in every Intel specific bug report: does switching to xorg modesettings driver improve the situation?
Comment 11 Alexander Mentyu 2018-04-10 16:25:46 UTC
There is stuttering in this app with OpenGL 2/3 and XRender and different VSync settings

Plasma: 5.12.4
Apps: 17.12.4
Frameworks: 5.44.0
Qt: 5.10.1
Kernel: 4.14.32-1-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
Driver: xf86-video-intel 1:2.99.917+823+gd9bf46e4-1
Screen: 1600x900
Comment 12 kde.org 2021-11-06 20:37:26 UTC
This issue report is quite old. Can you please confirm, that it still persists with KDE 5.23?
Comment 13 Ralf Jung 2021-11-06 22:27:05 UTC
I have not noticed issues with video playback in a while.

Using my test application, I did get a rather stuttering 20fps -- but then after restarting KWin, it is up to 60fps. So it seems like in principle KWin can handle this properly, but sometimes it might get into a degraded state? Not sure how to reproduce this though.
Comment 14 kde.org 2021-11-06 22:31:13 UTC
Thank you for your feedback. If it's hard to reproduce, it's usually even harder to fix :-( Not sure what can be done about this.
Comment 15 David Edmundson 2023-09-06 10:38:26 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.