Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 5.18 + Intel 10th gen iGPU iHD GPU + Vulkan gives VK_ERROR_DEVICE_LOST #10425

Closed
gitpubber opened this issue Jul 17, 2022 · 10 comments
Closed
Labels
down-upstream features and bugs that need to be implemented and fixed upstream os:linux

Comments

@gitpubber
Copy link

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

@gitpubber
Copy link
Author

@gitpubber gitpubber changed the title Linux 5.18 + Intel i7 GPU iHD GPU + Vulkan gives VK_ERROR_DEVICE_LOST Linux 5.18 + Intel 10th gen iGPU iHD GPU + Vulkan gives VK_ERROR_DEVICE_LOST Jul 17, 2022
@QasimK
Copy link

QasimK commented Oct 9, 2022

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!

@Deathcow
Copy link

Deathcow commented Nov 15, 2022

Facing the same issues with gpu-api=vulkan, mpv 0.35 and sway on wayland.

@haasn
Copy link
Member

haasn commented Nov 15, 2022

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)

@Deathcow
Copy link

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)

@dmfr
Copy link

dmfr commented Nov 20, 2022

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)

@dmfr
Copy link

dmfr commented Nov 23, 2022

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.

mpv-gpudebug-VK_ERROR_DEVICE_LOST.txt

@dmfr
Copy link

dmfr commented Dec 20, 2022

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

@nyanmisaka
Copy link

torvalds/linux@3f882f2

Fixed in 6.2-rc3, 6.1.4 and 6.0.18.

@Dudemanguy Dudemanguy added the down-upstream features and bugs that need to be implemented and fixed upstream label May 1, 2023
@Dudemanguy
Copy link
Member

Allegedly fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
down-upstream features and bugs that need to be implemented and fixed upstream os:linux
Projects
None yet
Development

No branches or pull requests

7 participants