Open LinAGKar opened 3 years ago
I can also reproduce it after building the latest master (0282196f4a3e8c6f0c6613cbd461fcc2f426dca5), with this configure output.
In this situation, you need to capture the backtraces from all the threads in the process. You've got the main thread's backtrace here and it's waiting for something, but that something is on another thread. In practice, you're almost certain to find something deep inside the nvidia libraries on the vo thread which we won't be able to do anything about.
Then I got this
It does look like the vo thread is somewhere in /lib64/libcuda.so.1
Yeah, you've got the vo_thread plus three additional cuda threads, one waiting, one attempting to yield and two doing who know's what. I'm afraid we can't do much in this situation as there's no way to debug what's going on inside. I have not seen the symptoms you describe, unfortunately.
You could try rebooting the machine and trying again. That has solved nvidia problems for me in the past...
Rebooting does not fix it. This has been happening for a long time.
So, it's stuck inside the OpenGL interop code. One option available to you is to use Vulkan instead, and see if this avoids the problem. On nvidia, it works great and it's how I use mpv on a day to day basis.
Try:
mpv --hwdec=nvdec --gpu-context=x11vk <filename>
I'll test that for a while and see how it works then
I've had this problem for the last month or so (exactly as described in the original post) and it became so disruptive that I eventually figured out the right search terms to find this issue. Then I started using --gpu-context=x11vk
a couple days ago and I haven't seen the problem at all since!
Thank you @philipl for gpu-context option. It kinda solved itself on x11vk.
Important Information
Provide following Information:
Reproduction steps
Play a video file with --hwdec=nvdec. Seems to work with any file with hardware decoding, at least AVC and HEVC.
Expected behavior
The video plays as normal, with hardware decoding.
Actual behavior
Some of the time (though not every time), mpv will completely hang, and just display an empty window (filled with whatever was behind it). It will use 100% CPU (on one core). At this point, mpv needs to be killed (SIGTERM or SIGINT twice).
It doesn't seem to happen if you try it multiple times in rapid succession. If you successfully play the file, you have to wait for a bit to reproduce the issue.
Log file
Log and backtrace