mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.13k stars 2.88k forks source link

Black screen, flickering, persistent Latte-dock issues with fullscreen mpv #9582

Closed smsteward closed 2 years ago

smsteward commented 2 years ago

Important Information

I have a dual monitor setup and have noticed an issue with the latest mpv. When playing an mpv video on either monitor and making said video fullscreen, the bottom ~15% of the other monitor (the one without the mpv window) is covered in a black bar for a few seconds, then that entire monitor flickers once. I utilize Latte-dock, and whilst the mpv video is playing fullscreen, the dock on the second monitor has an ugly black border around it, and the dock animations (bouncing, zooming, etc) and any KDE screen-edge controls (like Show All Windows) are completely disabled until the mpv window is no longer fullscreen, at which point the second monitor goes black and flickers for a second or two before going back to normal and re-enabling all animations and window flair.

I am not utilizing any custom profiles as far as I know. This happens when I simply call mpv <URL> to watch a video for which I have the link, but also happens when using the ani-cli script which calls mpv in the background. It happens when the active mpv window is active on either monitor, causing whichever monitor is secondary to have the issues.

I've attached a screenshot that shows the latte-dock problem, and can provide a video upon request.

Here is my system info:

Reproduction steps

Issue IS reproducible with --no-config option.

Describe the reproduction steps as precise as possible. It's very likely that the bug you experience wasn't reproduced by the developer because the workflow differs from your own.

Expected behavior

Actual behavior

Log file

mpv_log.txt

The issue will be closed for ignoring the issue template.

qmega commented 2 years ago

Sounds like the result of KWin's compositing being disabled, which mpv requests in fullscreen by default. Normally kwin takes the content of all windows on the screen and renders them again with its effects applied. When compositing is disabled, each window draws directly to the screen and kwin can't apply its effects (including alpha transparency).

If you don't want mpv to disable compositing, you can add x11-bypass-compositor=no to your config file. The downside of this is potentially reduced performance (possible lag, stuttering, or dropped frames, especially if your machine is weak) or broken display sync leading to tearing, etc., depending on your system. You may not notice a difference at all, and some people even have better experiences with compositing enabled. You will have to determine for yourself whether leaving the compositor on is worthwhile or not.

Another option would be to try something like kwin-lowlatency and trying to unredirect the mpv's fullscreen window without disabling compositing for other windows. That might give you the best of both worlds, or it might not work at all. I haven't tried it and can't provide any more information about it.

psifidotos commented 2 years ago

you can forbid to KWin to disable your compositing from : plasma systemsettings -> Display And Monitor->Compositor-> [disable] Allow applications to block compositing

smsteward commented 2 years ago

Thank you both very much for your assistance! It was in fact a matter of mpv disabling the compositor. All is fixed on my end, and I have no other issues so far. Thanks again!

aziham commented 2 years ago

@qmega Thanks man. This issue was driving me nuts