mpv
mpv copied to clipboard
Linux 5.18 + Intel 10th gen iGPU iHD GPU + Vulkan gives VK_ERROR_DEVICE_LOST
Important Information
Provide following Information:
- mpv version : 0.34.1
- Linux Distribution and Version: nixos-unstable
- Source of the mpv binary: distro
- If known which version of mpv introduced the problem:
- Window Manager and version: sway
- GPU driver and version: mpv.log
mpv throws this Vulkan error while running on Linux 5.18 . Linux 5.16 doesn't give any error
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6880
I get the same error on:
- mpv version:
mpv 0.34.1-dirty
&FFmpeg version: n5.1.2
- Linux version:
Linux 5.19.13-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 04 Oct 2022 14:36:58 +0000
- Window manager: Wayland/Sway
- GPU: Intel 12th Gen iGPU i5-1240p
- mpv config:
vo=gpu
hwdec=vaapi
gpu-context=waylandvk
gpu-api=vulkan
icc-profile=...
- Exact error followed by video playback freezing (audio continues fine)
[vo/gpu/vulkan] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../src/vulkan/command.c:382)
[vo/gpu/vulkan] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../src/vulkan/gpu.c:111)
[vo/gpu/vulkan] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../src/vulkan/command.c:382)
[vo/gpu/vulkan] Failed holding swapchain image for presentation
[vo/gpu] Failed presenting frame!
Facing the same issues with gpu-api=vulkan, mpv 0.35 and sway on wayland.
Can you try appending --gpu-debug
to your tests and seeing if that picks up anything? (Also make sure to install the vulkan validation layers)
adding --gpu-debug doesn't seem to add any additional output, though I'm not sure what's meant with 'vulkan validation layers'
~ > mpv Sync-Footage-V1-H264-Sync-Footage-V1-H264.mp4 --gpu-debug 20:23:36
(+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
[vo/gpu-next/libplacebo] Storable format 'bgr565' has no matching GLSL format qualifier but read/write without format is not supported.. disabling
[vo/gpu-next/libplacebo] Storable format 'rgb565' has no matching GLSL format qualifier but read/write without format is not supported.. disabling
[vo/gpu-next/libplacebo] Storable format 'bgr5a1' has no matching GLSL format qualifier but read/write without format is not supported.. disabling
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu-next] 1920x1080 vaapi[nv12]
AV: 00:00:31.017 / 00:02:00.064 (26%) A-V: -0.000
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Failed holding swapchain image for presentation
[vo/gpu-next] Failed presenting frame!
AV: 00:00:31.033 / 00:02:00.064 (26%) A-V: -0.000
[vo/gpu-next/libplacebo] vkQueueSubmit: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/command.c:390)
[vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../libplacebo-v5.229.1/src/vulkan/gpu.c:111)
I had same experience, on Intel 10th gen mobile, Opensuse 15.4 + updated kernel 6.0.x + updated Mesa 22.2.3
- Installing vulkan validation layers, vulkan playback doesn't crash but hwdec is now locked to vaapi-copy (+ higher CPU usage)
- Then updating base vulkan libraries (libSPIRV, libvulkan1, ... which are NOT part of Mesa) to current 1.3.231, full VAAPI is back and playback does not crash anymore (somehow stock opensuse 15.4 is still shipping vulkan 1.2 base libs)
Further testing,
Without --gpu-debug
, VK_ERROR_DEVICE_LOST shows in matter of seconds.
Using up-to-date validation layers + --gpu-debug
, playback does not crash -so- often, but it does eventually producing attached error loop.
To summarize :
- occurs from Linux 5.16 to current 6.0.9 (Linux 5.14 does not trigger the error)
- occurs with hwdec=VAAPI, software decoding does not trigger.
From : https://gitlab.freedesktop.org/drm/intel/-/issues/7627#note_1692848
Fix pending for future kernels: https://cgit.freedesktop.org/drm-tip/commit/?id=801fa7a81f6d drm/i915: improve the catch-all evict to handle lock contention
https://github.com/torvalds/linux/commit/3f882f2
Fixed in 6.2-rc3, 6.1.4 and 6.0.18.
Allegedly fixed upstream.