Bug 311067 - video playback stutters when enabling destop effects (likely memory throughput)
Summary: video playback stutters when enabling destop effects (likely memory throughput)
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: 4.9.3
Platform: Unlisted Binaries Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugs.freedesktop.org/show_bug...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-03 10:35 UTC by bbutscheidt
Modified: 2021-12-07 04:36 UTC (History)
1 user (show)

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


Attachments
Snapshot of show fps (17.84 KB, image/jpeg)
2012-12-03 22:53 UTC, bbutscheidt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bbutscheidt 2012-12-03 10:35:37 UTC
When I enable "System Settings // Desktop Effects // General // Enable desktop dffects on startup" every video playback (e.g xine with vdpau or vlc not using vdpau) suffers from the same problem:
the picture doesn't move smoothly, at least every one or two seconds the picture seems to stop for a nearly not noticeable moment and then quickly jumps over the lost frames to the current one.
The audio doesn't seem to be affected.

I can find hints like the one in the URL box in www that other people notice this too - but nothing here so I just want to drop a notice.

On my machine, this problem came with KDE 4 and the introduction of desktop effects in general, so I had them deactivated. Just gave it a try with new 4.9.3, but the problem is still there.

By the way: looking at a cpu-Monitor the CPU seems to be at ease.

Reproducible: Always

Steps to Reproduce:
1. Enable OpenGL (Desktop Effects)
2. Play a video with xine/ vlc (x-driver seems to be of no relevance) - 

Actual Results:  
playback shutters/ shivers/ shortly hangs

Expected Results:  
Playback should look like when OpenGL (Desktop Effects) are disabled


I am using nvidia-drivers - but I don't know if this is of relevance here
Comment 1 Thomas Lübking 2012-12-03 15:13:35 UTC
Please provide the output of
qdbus org.kde.kwin /KWin supportInformation

Does this happen when playing back windowed or fullscreen or regardless and with all video material or only HD content?
Comment 2 bbutscheidt 2012-12-03 18:47:02 UTC
I remember having this effect first with mpeg2-SD(PAL) material, but this was some tome ago on a slower machine. 
Currently the effect isn't there or isn't visible with SD-mpeg2. With h264-720p I can see the problems described with desktops effects turned on. The size of the window (or full screen or not) doesn't seem to have any impact.

The required output with desktops effects turned on:

qdbus org.kde.kwin /KWin supportInformation
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
tiling: false
tilingLayout: 1
tilingRaisePolicy: 0
separateScreenFocus: false
activeMouseScreen: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
showDesktopIsMinimizeAll: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
electricBorders: false
electricBorderDelay: 150
electricBorderCooldown: 350
electricBorderPushbackPixels: 1
electricBorderMaximize: true
electricBorderTiling: true
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
unredirectFullscreen: false
glSmoothScale: 2
glVSync: true
xrenderSmoothScale: false
maxFpsInterval: 17
refreshRate: 0
vBlankTime: 6144
glDirect: true
glStrictBinding: false
glStrictBindingFollowsDriver: true

Compositing
===========
Qt Graphics System: native
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 210/PCIe/SSE2
OpenGL version string: 3.3.0 NVIDIA 304.64
Driver: NVIDIA
Driver version: 304.64
GPU class: G80/G90
OpenGL version: 3.3
X server version: 1.12.4
Linux kernel version: 3.6
Direct rendering: yes
Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
OpenGL 2 Shaders are used

Loaded Effects:
---------------
kwin4_effect_zoom
kwin4_effect_slidingpopups
kwin4_effect_minimizeanimation
kwin4_effect_translucency
kwin4_effect_screenshot
kwin4_effect_slide
kwin4_effect_desktopgrid
kwin4_effect_dialogparent
kwin4_effect_highlightwindow
kwin4_effect_taskbarthumbnail
kwin4_effect_presentwindows
kwin4_effect_blur
kwin4_effect_logout
kwin4_effect_dashboard
kwin4_effect_outline
kwin4_effect_startupfeedback

Currently Active Effects:
-------------------------
kwin4_effect_blur

Effect Settings:
----------------
kwin4_effect_zoom:
zoomFactor: 1.25
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

kwin4_effect_slidingpopups:
fadeInTime: 250
fadeOutTime: 250

kwin4_effect_minimizeanimation:

kwin4_effect_translucency:
decoration: 1
moveResize: 0.8
dialogs: 1
inactive: 1
comboboxPopups: 1
menus: 1
individualMenuConfig: false
dropDownMenus: 1
popupMenus: 1
tornOffMenus: 1

kwin4_effect_screenshot:

kwin4_effect_slide:

kwin4_effect_desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

kwin4_effect_dialogparent:
changeTime: 300

kwin4_effect_highlightwindow:

kwin4_effect_taskbarthumbnail:

kwin4_effect_presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0
dragToClose: false

kwin4_effect_blur:
blurRadius: 12
cacheTexture: true

kwin4_effect_logout:
useBlur: true

kwin4_effect_dashboard:
brightness: 0.5
saturation: 0.5
blur: false

kwin4_effect_outline:

kwin4_effect_startupfeedback:
Comment 3 Thomas Lübking 2012-12-03 19:10:13 UTC
pot. a double sync issue (since 4.9.3 should no longer have the server grab during the paint)

Try to deactivate vertical syncing i kwin (it's not working on nvidia chips anyway, see https://git.reviewboard.kde.org/r/107198/) and if that helps, check the various sync settings in nvidia-settings.

If it should still happen with all syncing disabled (run "kwin --replace &" after adjusting nvidia-settings) please activate the "show fps" plugin, play such video. See whether it still judders.

If yes, make a screenshot that reflects the "common" appearance of the "show fps" output or describe what you see (colors and line bars)
Comment 4 bbutscheidt 2012-12-03 22:53:37 UTC
Created attachment 75618 [details]
Snapshot of show fps

The more complicated the video gets (the more movements) the more the amount of broader grey bars.
Comment 5 bbutscheidt 2012-12-03 22:55:57 UTC
Puh, I am a litlle bit lost in all these configuration possibilities.

First tries, feedback so far:

Disabling "Use VSync" in the advanced tab in combination choosing "smooth" instead of "accurate" in the Scale method box does bring some ease, kwin show fps plugin shows about 8 to ten frames more than with  "Use VSync" enabled when there are complicated picture moves in the video (about 65).

All in all I see no effect turning options like "Sync to VBlank" off or on in nvidia-settings (after doing "kwin --replace &" ) or choosing XRender instead of OpenGL (apart from the show fps plugin showing no fps with XRender choosen ...).

But still, the best playback is achieved with Desktop effects turned off. With Desktop Effects turned on something seems to pause the playback for some hundred milliseconds every one or some more seconds - I don't know how to describe it better.

In addition I uploaded a hopefully typical output of show fps during video playback.
Comment 6 Thomas Lübking 2012-12-04 22:37:50 UTC
- At what framerate does that video play?
- What's the output of 
kreadconfig --file kwinrc --group Compositing --key MaxFPS
- What happens after
kwriteconfig --file kwinrc --group Compositing --key MaxFPS 120
qdbus org.kde.kwin /KWin reconfigure
and toggling the compositor (press Shift+Alt+F12 twice)
Comment 7 bbutscheidt 2012-12-07 10:15:34 UTC
- At what framerate does that video play?
50 fps

- What's the output of kreadconfig --file kwinrc --group Compositing --key MaxFPS
The output is empty

- What happens after kwriteconfig --file kwinrc --group Compositing --key MaxFPS 120
  qdbus org.kde.kwin /KWin reconfigure
The output of the former command shows 120. The video playback doesn't seem to be effected (=isn't getting better).

This time, I used a 1080i video @25fps with xine and vdpau as output video driver. In generally, the problems are more visible here than with the 720p video I used recently. 
And again, leaving the settings as just proposed and turning desktops effects off, the video playback becomes smooth (no shuttering, no dropped frames). Turning desktops effect on, I see the video pause and skip at the same timecodes where it ran o.k. with desktops effects turned off.
Comment 8 Andrew Crouthamel 2018-11-10 03:24:25 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Andrew Crouthamel 2018-11-21 04:22:22 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 10 kde.org 2021-11-07 10:21:32 UTC
This issue report is quite old. Can you please confirm, that it still persists with Plasma 5.23?
Comment 11 Bug Janitor Service 2021-11-22 04:38:30 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
mark the bug 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 Bug Janitor Service 2021-12-07 04:36:10 UTC
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!