mpv-player / mpv

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

Fullscreen video always freezing in Wayland session, sound still playing (Fedora 40, Gnome 46, Nvidia GTX 1060) #14385

Closed encomosxii closed 1 day ago

encomosxii commented 1 week ago

mpv Information

mpv v0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v6.338.2
FFmpeg version: n7.0.1
FFmpeg library versions:
   libavutil       59.8.100
   libavcodec      61.3.100
   libavformat     61.1.100
   libswscale      8.1.100
   libavfilter     10.1.100
   libswresample   5.1.100

Other Information

Reproduction Steps

When switching to fullscreen (not maximise), movie freezes after a few moments, sound still playing for some time, up to 2-3 minutes sometimes, than mpv crashes.

Additional information that maybe help? This also happens in Celluloid (0.26 Flatpak and RPM) which is based on mpv. Screen freeze occurs there too under same conditions, but the freeze can be prevented there by forcing the controls not to fade out (mouseover).

Every video player has problems with fullscreen under Wayland on my machine: Clapper is freezing too after a few moments with sound still playing, just like mpv. Plex starts stuttering in fullscreen after a few moments. VLC runs fine when X/X11 is used for video output, switching to OpenGL leads to stuttering video just like Plex.

Because of the sample file for output.txt, Big Buck Bunny from Blender: big_buck_bunny_480p_h264.mov

Expected Behavior

Video playback

Actual Behavior

Video freezing

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

Dudemanguy commented 1 week ago

Every video player has problems with fullscreen under Wayland on my machine

This is just a bug with nvidia drivers on wayland judging by your description. Nothing we can do here.

spaceman7777 commented 1 week ago

Fix in link might be related. Poster removed the vulkan-nouveau packages, and the system appears to have reverted to correctly using the nvidia vulkan implementation. (I'm assuming you're using official nvidia drivers rather than nouveau.) You shouldn't need nouveau around to use nvidia drivers, and it is generally encouraged to blacklist the nouveau kernel module if they are still needed on the system for package management reasons.

Good luck :)

https://forum.endeavouros.com/t/error-with-lutris-drm-kernel-driver-nvidia-drm-in-use-nvk-requires-nouveau/53845/3

encomosxii commented 1 day ago

Thanks for your help Dudemanguy and spaceman7777! By the way, Noveau is deactivated, kernel modules are blacklisted.

Dudemanguy is right, seems to be a nvidia driver or maybe wayland and... problem. I was able to identify the problem.

I'm using a "multi monitor" setup. I use screen mirroring, not the extend screen mode for this setup. Screen mirroring causes all videoplayers to freeze and crash in fullscreen mode when using wayland.

The second monitor is my TV/Surround receiver which passes the TV signal through. I noticed since years different problems over many distributions with multi monitor setup. For example the second monitor, the TV, connected directly or via passthrough will be set to wrong refresh rate and resolution by the system. Nothing can prevent this, after a few reboots every config will be messed up again. Monitors.xml will be rebuild with the wrong settings, no matter how often you correct them. Setting a nvidia.conf file under /etc/x11 won't help, because all settings regarding monitor resolution and refresh rate will always be ignored.

The never ending story, wayland, xorg, nvidia, multi monitor... But fortunatly for all linux users, the real problems always have been in the focus. For example desktop icons in Gnome or the announcement of a new DE every week.....

encomosxii commented 1 day ago

Wayland Nvidia related problem. Setting a multi monitor setup to screen mirroring causes the problem.