Bug 294863 - Sometimes dragging Windows gets choppy
Summary: Sometimes dragging Windows gets choppy
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 4.8.0
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2012-02-26 13:16 UTC by Björn Sonnenschein
Modified: 2018-10-27 02:46 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Sonnenschein 2012-02-26 13:16:51 UTC
Version:           4.8.0 (using KDE 4.8.0) 
OS:                Linux

Some time dragging windows is perfectly smooth on my two machines (Desktop with 6-Core and GTX460 and Netbook Convertible with Intel graphics).
But often dragging gets Choppy without any obvious reason. There may even be opened only two windows. 

Here's a small video of that behavior. Even if it's heavily compressed by vimeo and the framerate is not my desktops refresh rate (You can see it on the choppy cursor), it displays the effect quite well.

https://vimeo.com/37464714

Reproducible: Sometimes

Steps to Reproduce:
Drag windows from time to time

Actual Results:  
Choppy dragging, other effects could be affected too.

Expected Results:  
Smooth dragging

Fedora 16, also tried with Kubuntu. Same result.
Happens with Nvidia as well as Intel graphics. ATI not tested.
Comment 1 Thomas Lübking 2012-02-26 15:32:20 UTC
related to the translucency effect?
Comment 2 Björn Sonnenschein 2012-02-26 15:57:41 UTC
No, when translucency is disabled, the problem does still occur.

When a dolphin window with information panel is opened, the text inside the information panel shows slight flickering which is not there when dragging is smooth. Appeas on other texts,too, but due to the font size and contrast it is most obvious there.
Comment 3 Björn Sonnenschein 2012-02-26 16:02:06 UTC
sorry for double posting, I forgot to say that the flickering appears while dragging the dolphin window ;)
Comment 4 Thomas Lübking 2012-02-26 16:05:54 UTC
Nevermind.

a) dolphin dragging /ONLY/?
b) does it usually remain choppy or is it just like 1 frame is lost every now
and then
c) does it also happen with XRender or OpenGL w/o vsyncing?
c.1) in case, does it still happen is you raise MaxFPS
        kwriteconfig --file kwinrc --group Compositing --key MaxFPS 800 #don't
try > 999
        at least suspend / resume compositing afterwards or "kwin --replace&"
d) how's system (that is CPU & I/O) load under these circumstances
Comment 5 Björn Sonnenschein 2012-02-26 17:45:11 UTC
a. No, it may be with every window.

b. Choppy means it feels like slight, continuous stuttering. The Framerate drops to 30-43 FPS while choppy dragging, while smooth dragging when the issue doesn't happen still shows 60 fps.

c. It is hard to tell if it happens without vsync (and so on x render), too because it is hard to distinguish the effect from the stuttering from tearing. But I think it's there with Xrender and Opengl without v-sync, too.

c.1 raising MaxFPS solves the issue in Xrender. 
ShowFPS effect (I know it's not always accurate) does still show 60 fps for OpenGL and while Dragging is Choppy around 30-43 FPS. 
On Xrender the framerate increase is shown by MaxFPS.

d. the system load does not increase visibly when it happens.

I have noticed that the framerate drops on other effects (tested with slide back, present windows and desktop grid), too while the bug is present.
Comment 6 Martin Flöser 2012-02-26 18:32:03 UTC
Just an idea: are you using (sometimes) the quick tiling on screenedge 
feature? I got once a feedback that it makes moving windows choppy, but have 
never been able to reproduce the issue.
Comment 7 Björn Sonnenschein 2012-02-26 20:34:22 UTC
Yes, I am using it quite often, but testing showed that it's not related to the bug.

Disabling V-Sync when MaxFPS value is raised gives me 100 FPS constantly with OpenGL displayed in Show FPS. KDE is smoother with this setting at all and the Problem does not come up then. The default 50-60 FPS seem to be quite jerky at all ;)
Comment 8 Martin Flöser 2012-02-26 21:01:19 UTC
> Yes, I am using it quite often, but testing showed that it's
> not related to the bug.
ok, thanks for cheking
> 
> Disabling V-Sync when MaxFPS value is raised gives me 100 FPS constantly
> with OpenGL displayed in Show FPS. 
disabling v-sync means rendering as much as possible. The FPS meter is capped 
at 100 FPS.
> KDE is smoother with this setting at all
> and the Problem does not come up then. The default 50-60 FPS seem to be
> quite jerky at all ;)
the default is oriented at the refresh rate of the screen and that is what 
most users prefer over rendering at everything what's possible :-)

Something is triggereing the jerkinies, we need to find and fix it. Better 
than introduce high CPU usages for all users
Comment 9 Björn Sonnenschein 2012-02-27 10:07:00 UTC
Yes of cause, nobody wants to blow up their machines ;)
Of cause the monitor's refresh rate is the optimal framerate for kde, but at least on my machine the 60 fps are not held up continuously? Many effects let it drop down to around 55 to 57 fps also if this bug does not occur and it is visible that kwin does not run as perfectly smooth as without v-sync. 
But that is an other discussion...

Anyway, is it useful for you if I run Kwin with gdb to find out what is triggering the slowdowns?
Comment 10 Thomas Lübking 2012-02-27 16:26:13 UTC
V'syncing is under (yet another) re-do anyway (just re-started yesterday)

However not reaching the full screen refresh rate using vsync is expectable because the renderer doesn't run in a second tread (initially possible at all with Qt4.8) and the approach to wait for the next refresh in the same thread sometimes misses a tick.

I doubt this is the source of your lagging, because 50Hz is still "smooth"

On the nvidia GPU i'd say you've the driver global vsync enabled (resulting in two syncs per frame) and eg. the slideback effect might miss an exit and keel the screen in full repaints using glSwapBuffers() what adds the global sync, but that doesn't cover the intel driver...
Comment 11 Andrew Crouthamel 2018-09-22 01:52:37 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Andrew Crouthamel 2018-10-27 02:46:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!