0

When playing videos like movies with the Kodi media center, the videos often have lots of glitches. I tried it with the VLC player, MPV and DragonPlayer on Debian11/KDE and it occurs with all of these and only if the video is played in fullscreen (details below).

With glitches I'm referring to some kind of "cuts" or "lines" - a form of "screen tearing", but looking different than in many images about this (not just large lines but smaller, all over and milder).

Edit: Disabling "Allow applications to block compositing" in Display Configuration -> Compositor solved this as did switching to Wayland. I may test further. One can switch to Wayland by logging out and choosing "Plasma (Wayland)" in the upper left.

-> Why was it getting blocked in fullscreen and why was neither of the two solutions set as the default option in Debian11/KDE (if required, the used hardware, configured settings and even running processes could be checked to make either the default option if that's apparently needed for proper video playback...and maybe there are additional settings that would improve video playback e.g. when not having a dedicated graphics card)?


Details:

  • it does not occur with all files, only some

  • when recording it with screenrecorder the recorded video doesn't have these glitches

  • it does not occur when playing the file in the window mode of the media player...even if the image is as large as the fullscreen one (only parts of the two black bars at the top and bottom are not shown when playing it windowed instead of fullscreen)

  • it is worst with MPV and Dragonplayer has least of these glitches (all at fullscreen)

  • VLC is a bit better with these glitches than MPV (only sometimes but I changed the default player to an external player in Kodi due to this; first to MPV then to VLC). Strangely, a test video just played without glitches at fullscreen which still show in MPV and showed in VLC earlier. Now the video in VLC is too dark even though I haven't changed the config and it didn't look this way when I played the same video in VLC earlier. It does not make a difference if I use firejail vlc or vlc to launch the video. I also just tried Dragonplayer and no glitches are shown there currently but it's too bright (probably mostly Gamma issues).

First I thought it may be caused by some missing graphics drivers / graphics card or even codecs but as this occurs at fullscreen but not in the windowed mode (same video-image size) it appears to be caused by something else...probably my monitor or display-related things as I can't record it. It's a very strange but annoying problem (many video files are barely watchable due to this). Debian11 currently uses X11 v1.20.11 by default.

There is no new console output of MPV when these glitches are shown. It does display:

AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1920x1080 => 2592x1080 yuv420p

The => 2592x1080 part is not displayed for other videos so it may be relevant.

I recently had to restart KDE Plasma so in another console window its output displayed during playing the video. It may not be relevant and is (duplicate lines removed):

libpng warning: iCCP: known incorrect sRGB profile
qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.
qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 29557, resource id: 0, major code: 53 (CreatePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 29558, resource id: 35652120, major code: 55 (CreateGC), minor code: 0
qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 29941, resource id: 35652124, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 29942, resource id: 35652125, major code: 60 (FreeGC), minor code: 0
qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.

Exiting... (Quit)
qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:494:39: QML StreamListItem: Binding loop detected for property "width"

Any ideas and tips what to check or try are very much appreciated.

6
  • 1
    Compositing problems ? What are your systemsettings>display&monitor>compositor settings ?
    – MC68020
    Dec 29, 2021 at 15:41
  • The default ones: Enabled at startup, smooth scaling, OpenGL 2.0, automatic vsync, keep window thumbnails only shown for windows, allow applications to block compositing. Changing it to OpenGL 3.1 didn't help, neither did changing to any other vsync/tearing prevention option. Disabling "Allow applications to block compositing" seems to have helped. Will test further, do you know what's blocking compositing and why and if it's fine to just disable that option and why it's not set by default? Also: is there a way to test (incl benchmarking) to see which graphics options and packages wouldb best?
    – mYnDstrEAm
    Dec 29, 2021 at 16:07
  • The answers to your last questions depends on what version of kwin you are running. < 5.21 or not. And additionally what video drivers you are using (particularly if running nvidia proprietary drivers)
    – MC68020
    Dec 29, 2021 at 16:21
  • You don't say what kind of hardware you have. What are the brands and models for your CPU, GPU, and monitor? What driver and version are you using for your GPU? What kernel version? 2592x1080 is a very odd resolution - do you have some kind of ultra-wide monitor, or multiple monitors? BTW, the fact that it only happens in full-screen mode doesn't mean that it isn't a GPU or driver problem - full-screen may be setting a different resolution or frequency (doesn't mean that it definitely IS the GPU or driver, either...just that there isn't enough info to eliminate them yet).
    – cas
    Dec 29, 2021 at 16:21
  • kwin is the default version of Debian 11, currently v5.20.5. Not running Nvidea proprietary drivers but an open source one for onboard graphics. I'll try using Wayland next (x11 still seems to be default?). For finding out the cause of compositor getting blocked there probably is or should be some way to check/log which app is blocking it (and why). The glitches seem to be a form of "screen tearing", but looking different than in many images (not large lines but smaller all over and milder). Please also comment if other settings are good for video if not having a dedicated graphics cards.
    – mYnDstrEAm
    Dec 29, 2021 at 22:10

1 Answer 1

1

OP is running kwin < 5.21

Up to 5.21 kwin gets some suboptimal algorithm in order to sync on vblank. This was changed for the better starting with 5.21

In these dark times, the only way I could watch videos in acceptable conditions was to disable compositing entirely :

1/ Select NEVER for the sync to vblank option (in system-settings/display) (No need for extra system resources consumption for such a suboptimal result)

2/ Check the Allow applications to disable compositing. (That Mplayers can do)

3/ Have a keyboard shortcut to force disable of compositing when playing via browsers which apparently cannot ask for that.

Some had suggested to replace kwin compositor with compton or picom compositors. I never tried.

The very best advice I can give here is to upgrade the whole kde-plasma package to >=5.21 (and probably also the kde-frameworks to the minimum version accepted by the kde-plasma package version you want to upgrade to.

4
  • The Plasma version would need to be updated in Debian's repos. Did checking "Allow applications to block compositing" help in your case? For me disabling it (unchecking it) helped. But I have switched to Wayland by now so this option is no longer there. Maybe it only works in combination with your "sync to vblank option" config - however, I don't have that option in KDE (only tearing prevention ("vsync") and a "Never" option there).
    – mYnDstrEAm
    Dec 30, 2021 at 16:05
  • @mYnDstrEAm : As written in the answer, yes indeed. Allow applications to block compositing did help… to avoid myself having to manually disable compositing. That is of course for apps being able to suspend compositing. That is mplayer based frontends SMPlayer & the like. Browsers don't.
    – MC68020
    Dec 30, 2021 at 16:21
  • @mYnDstrEAm And yes, I apologize, the correct choice is NEVER and not NONE as I had written. In fact it as not much to do with compositing per se. Setting it to whatever else was consuming system resources for a suboptimal result.
    – MC68020
    Dec 30, 2021 at 16:23
  • @mYnDstrEAm And, so sorry, I won't be of any help for you under wayland. Running nvidia proprietary drivers, wayland has just never been an option for me.
    – MC68020
    Dec 30, 2021 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.