Closed rijnhard closed 1 week ago
You need to use DRI_PRIME=1
for this and a new enough Mesa (24.3 or newer) https://gitlab.freedesktop.org/mesa/mesa/-/commit/ed781c74032ec3ff893bd0d60d9b88a3055476f5
DRI_PRIME=1 will probably work under x11 on your current mesa, if you want to use that as well
Also --vulkan-device
would control the rendering device here, not the hwdec device, you'd need to use hwdec=vulkan for this to affect hardware accelerated video decoding but your gpus probably don't support it. The vaapi equivalent --vaapi-device
only works with vaapi-copy
mode.
I have been using DRI_PRIME but didn't include it in the ticket because it had no effect, but I didn't know about the mesa bug! Thank you soo much for sharing that, 24.3 should be out soon, so that should then solve the problem.
And thank you for explaining the difference. It's been rough getting this new gpu and not being able to use it.
Yeah the mesa team AFAIK is still experimenting with the vulkan decoding on amd, so it totally fails and doesn't have the required extension.
You can make it work right now as well if you switch to x11 session on kwin, or run mpv under xwayland with --gpu-context=x11vk
Yeah the mesa team AFAIK is still experimenting with the vulkan decoding on amd, so it totally fails and doesn't have the required extension.
For this you have to define RADV_PERFTEST=video_decode
to expose extensions, if your gpu is supported.
You can make it work right now as well if you switch to x11 session on kwin, or run mpv under xwayland with
--gpu-context=x11vk
I mean I can, but ewww. Tbh I haven't used x11 in the last 8 years on my htpc. And it's mostly been fine :p. I'd rather just keep experimenting and logging bugs and try to be helpful to the maintainers.
But I do appreciate the workaround
Yeah the mesa team AFAIK is still experimenting with the vulkan decoding on amd, so it totally fails and doesn't have the required extension.
For this you have to define
RADV_PERFTEST=video_decode
to expose extensions, if your gpu is supported.
Oooooooooo it worked on the kaveri! That's kinda insane, considering it's age. (I mean playback is still choppy, but it rendered), I'll be playing with this in the future.
mpv Information
Other Information
Reproduction Steps
Bare with me on this, I'm trying to make best of a broken world.
I have a TV connected to Kaveri (iGPU) HDMI, because of an outstanding amdgpu bug affecting my RX 6400 (which causes the TV to frequently disconnect), this means switcheroo is active. So the idea is to use the RX 6400 (dGPU) for the video decoding because the kaveri cannot handle H265@4k.
To simplify things, I can confirm that having the dGPU connected to the TV can play 4k H265 with hdr perfectly (barring screen disconnects), with the following profile.
Now after some digging I found
--vulkan-device
which returns:Now with the HDMI connected to the kaveri and switcheroo active, and simply adding the flag specifying the RX 6400 via name or uuid, doesn't error but doesn't change results. Results are as choppy as just using the kaveri without the RX 6400 installed.
Notes:
--vulkan-device
and it does indeed error.Expected Behavior
Should offload video decoding to the dGPU even under switcheroo when requested.
Actual Behavior
Always uses primary gpu for decoding.
Log File
mpv.log
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.