Аппаратное ускорение декодирования видео не работает в Kodi на Raspberry Pi 4 после обновления до Debian 12 (Bookworm)

Аппаратное декодирование видео отлично работало на Debian Bullseye с Kodi 19.1. Теперь, когда я обновил его до Debian Bookworm (Kodi 20.1), он больше не работает, и декодирование видео возвращается к программному декодированию.

Никакого сочетанияKODI_GL_INTERFACE=GLXили=EGLсработало (см. https://kodi.wiki/index.php?title=Supported_hardware&oldid=244188#Linux).

В системе установлено ядро ​​6.1.45-v8+ (aarch64).

Я дважды проверил,/boot/config.txtсодержит

      dtoverlay=vc4-kms-v3d-pi4
gpu_mem=256

у меня тоже естьfirmware-linux-freeиfirmware-linux-nonfreeустановлен.

Соответствующие модули также кажутся на месте:

      $ lsmod |grep vc4
vc4                   335872  12
drm_display_helper     16384  1 vc4
cec                    53248  2 vc4
drm_dma_helper         20480  1 vc4
drm_kms_helper        204800  4 drm_dma_helper,vc4
snd_soc_core          274432  2 vc4,snd_soc_hdmi_codec
drm                   577536  13 gpu_sched,drm_kms_helper,drm_dma_helper,v3d,vc4,drm_shmem_helper,drm_display_helper
$ lsmod |grep v3d
v3d                    90112  3
gpu_sched              49152  1 v3d
drm_shmem_helper       24576  1 v3d
drm                   577536  13 gpu_sched,drm_kms_helper,drm_dma_helper,v3d,vc4,drm_shmem_helper,drm_display_helper

Затем я попытался диагностировать графическую систему с помощью

      $ vainfo
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/aarch64-linux-gnu/dri/vc4_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
$ vdpauinfo
display: :0   screen: 0
Failed to open VDPAU backend libvdpau_vc4.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

Так что, похоже, эти два драйвера отсутствуют. (И, возможно, Коди мог бы работать с любым из них с соответствующим значениемKODI_GL_INTERFACE.)

Однако я нигде не смог найти эти файлы (нет пакетов с vc4_drv_video, нет пакетов с libvdpau_vc4).


Затем я попытался скомпилировать библиотеку Mesa. Я читал, что проприетарные видеокодеки больше не имеют аппаратного ускорения по умолчанию на графических процессорах AMD, начиная с Fedora 37, и подтвердил это, заглянув вmeson_options.txt:

      option(
  'video-codecs',
  type : 'array',
  value : [],
  choices: [
    'vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc'
  ],
  description : 'List of patent encumbered codecs to build support for. ' +
                'Distros might want to consult their legal department before ' +
                'enabling these. This is used for all video APIs (vaapi, ' +
                'vdpau, vulkan). Non-patent encumbered codecs will be ' +
                'enabled by default.'
)

Поэтому я явно включил их в конфигурации:

      $ meson configure builddir/ '-Dc_args=-pipe -march=native -O2' \
  '-Dcpp_args=-std=c++17 -pipe -march=native -O2' -Dshared-glapi=enabled \
  -Dmicrosoft-clc=disabled -Dvalgrind=enabled \
  -Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec \
  -Dglx=auto -Dgallium-vdpau=enabled
...
mesa 23.1.5

  Directories
    prefix              : /usr/local
    libdir              : lib/aarch64-linux-gnu
    includedir          : include

  Common C and C++ arguments
    c_cpp_args          :

  OpenGL
    OpenGL              : YES
    ES1                 : YES
    ES2                 : YES
    Shared glapi        : YES

  DRI
    Platform            : drm
    Driver dir          : /usr/local/lib/aarch64-linux-gnu/dri

  GLX
    Enabled             : YES
    Provider            : dri

  EGL
    Enabled             : YES
    Drivers             : builtin:egl_dri2 builtin:egl_dri3
    Platforms           : x11 wayland surfaceless drm xcb

  GBM
    Enabled             : YES
    Backends path       : /usr/local/lib/aarch64-linux-gnu/gbm

  Vulkan
    Drivers             : swrast
    Platforms           : x11 wayland surfaceless drm xcb
    ICD dir             : share/vulkan/icd.d
    Video codecs        : h264dec h264enc h265dec h265enc vc1dec
    Ray tracing         : NO

  LLVM
    Enabled             : YES
    Version             : 15.0.6

  Gallium
    Enabled             : YES
    Drivers             : v3d vc4 freedreno etnaviv nouveau svga tegra virgl lima panfrost swrast
    Platforms           : x11 wayland surfaceless drm xcb
    Frontends           : mesa xa vdpau va
    Off-screen rendering: NO
    HUD lm-sensors      : YES

  Perfetto
    Enabled             : NO

  User defined options
    c_args              : -pipe -march=native -O2
    cpp_args            : -std=c++17 -pipe -march=native -O2
    gallium-vdpau       : enabled
    glx                 : auto
    microsoft-clc       : disabled
    shared-glapi        : enabled
    valgrind            : enabled
    video-codecs        : h264dec,h264enc,h265dec,h265enc,vc1dec

К сожалению, ни то, ни другое не помогло.


Отрывок из~/.kodi/temp/kodi.log:

      2023-08-16 13:45:31.631 T:21178    info <general>: VDPAU::CreateContext - creating decoder context
2023-08-16 13:45:31.633 T:21178    info <general>: vdp_device = 0xb5844270 vdp_st = 0x000001
2023-08-16 13:45:31.633 T:21178   error <general>: (VDPAU) unable to init VDPAU - vdp_st = 0x1.  Falling back.
2023-08-16 13:45:31.633 T:21178    info <general>: CRenderSystemGL::InitRenderSystem - Version: 2.1 Mesa 22.3.6, Major: 2, Minor: 1
2023-08-16 13:45:31.634 T:21178    info <general>: GL_VENDOR = Broadcom
2023-08-16 13:45:31.634 T:21178    info <general>: GL_RENDERER = V3D 4.2
2023-08-16 13:45:31.634 T:21178    info <general>: GL_VERSION = 2.1 Mesa 22.3.6
2023-08-16 13:45:31.634 T:21178    info <general>: GL_SHADING_LANGUAGE_VERSION = 1.20
2023-08-16 13:45:31.634 T:21178    info <general>: GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_subtexture
GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_fog_distance GL_NV_half_float GL_APPLE_packed_pixels GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_AMD_performance_monitor GL_EXT_texture_buffer_object GL_AMD_texture_texture4 GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_buffer_object GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex
GL_ARB_sampler_objects GL_ARB_shader_texture_lod GL_ARB_texture_gather GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_NV_copy_image GL_ARB_draw_indirect GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_transform_feedback2 GL_EXT_direct_state_access GL_AMD_multi_draw_indirect GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_base_instance GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_shader_atomic_counters GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_AMD_shader_trinary_minmax GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_clear_buffer_object GL_ARB_copy_image GL_ARB_explicit_uniform_location GL_ARB_framebuffer_no_attachments GL_ARB_invalidate_subdata GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_shader_storage_buffer_object GL_ARB_stencil_texturing GL_ARB_texture_buffer_range GL_ARB_texture_query_levels GL_ARB_texture_storage_multisample GL_ARB_texture_view GL_ARB_vertex_attrib_binding GL_KHR_debug GL_KHR_texture_compression_astc_ldr
GL_ARB_buffer_storage GL_ARB_internalformat_query2 GL_ARB_multi_bind GL_ARB_shading_language_include GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_stencil8 GL_EXT_debug_label GL_EXT_shader_integer_mix GL_ARB_get_texture_sub_image GL_EXT_polygon_offset_clamp GL_KHR_context_flush_control GL_ARB_parallel_shader_compile GL_ARB_shader_atomic_counter_ops GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_MESA_shader_integer_functions GL_ARB_polygon_offset_clamp GL_ARB_texture_filter_anisotropic GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_EGL_sync GL_NV_ES1_1_compatibility
2023-08-16 13:45:31.663 T:21178   error <general>: CYUVShaderGLSL::CYUVShaderGLSL - failed to open file gl_shader_frag_texture_lim.glsl
2023-08-16 13:45:31.663 T:21178    info <general>: GL: No pixel shader, fixed pipeline in use
2023-08-16 13:45:31.672 T:21178   error <general>: CYUVShaderGLSL::CYUVShaderGLSL - failed to open file gl_shader_frag_texture_lim.glsl
2023-08-16 13:45:31.672 T:21178    info <general>: GL: No pixel shader, fixed pipeline in use
2023-08-16 13:45:31.676 T:21178    info <general>: GL: Maximum texture width: 4096
2023-08-16 13:45:31.857 T:21178    info <general>: GL: Enabling VSYNC

0 ответов

Другие вопросы по тегам