[GH-ISSUE #14] DMABuf negotiation fails on Intel B580 #7

Closed
opened 2026-10-15 12:47:21 +00:00 by bsakaguchi · 7 comments
Owner

Originally created by @anonymix007 on GitHub (Jul 24, 2025).
Original GitHub issue: https://github.com/games-on-whales/gst-wayland-display/issues/14

$ GST_PLUGIN_PATH=./target/release/ GST_DEBUG=3 GST_GL_PLATFORM=egl gst-launch-1.0 waylanddisplaysrc ! "video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1" ! vapostproc ! vah264enc ! vah264dec ! glimagesink
2025-07-24T09:24:10.305133Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: []
2025-07-24T09:24:10.305165Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: []
2025-07-24T09:24:10.305190Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: []
2025-07-24T09:24:10.305212Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: []
2025-07-24T09:24:10.305253Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: []
Setting pipeline to PAUSED ...
2025-07-24T09:24:10.357309Z  INFO smithay::backend::egl::display: Successfully selected EGL platform: PLATFORM_DEVICE_EXT
2025-07-24T09:24:10.360695Z  INFO smithay::backend::egl::display: EGL Initialized
2025-07-24T09:24:10.360701Z  INFO smithay::backend::egl::display: EGL Version: (1, 5)
2025-07-24T09:24:10.360712Z  INFO smithay::backend::egl::display: Supported EGL display extensions: ["EGL_ANDROID_blob_cache", "EGL_ANDROID_native_fence_sync", "EGL_EXT_config_select_group", "EGL_EXT_create_context_robustness", "EGL_EXT_image_dma_buf_import", "EGL_EXT_image_dma_buf_import_modifiers", "EGL_EXT_query_reset_notification_strategy", "EGL_EXT_surface_compression", "EGL_IMG_context_priority", "EGL_KHR_cl_event2", "EGL_KHR_config_attribs", "EGL_KHR_context_flush_control", "EGL_KHR_create_context", "EGL_KHR_create_context_no_error", "EGL_KHR_fence_sync", "EGL_KHR_get_all_proc_addresses", "EGL_KHR_gl_colorspace", "EGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_cubemap_image", "EGL_KHR_image_base", "EGL_KHR_no_config_context", "EGL_KHR_partial_update", "EGL_KHR_reusable_sync", "EGL_KHR_surfaceless_context", "EGL_EXT_pixel_format_float", "EGL_KHR_wait_sync", "EGL_MESA_configless_context", "EGL_MESA_drm_image", "EGL_MESA_gl_interop", "EGL_MESA_image_dma_buf_export", "EGL_MESA_query_driver", "EGL_MESA_x11_native_visual_id", "EGL_WL_bind_wayland_display", ""]
2025-07-24T09:24:10.363331Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}: smithay::backend::egl::context: EGL context created priority=Some(Medium)
2025-07-24T09:24:10.363993Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: Initializing OpenGL ES Renderer
2025-07-24T09:24:10.363997Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Version: "OpenGL ES 3.2 Mesa 25.2.0-devel (git-fe3c1298dd)"
2025-07-24T09:24:10.364001Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Vendor: "Intel"
2025-07-24T09:24:10.364004Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Renderer: "Mesa Intel(R) Arc(tm) B580 Graphics (BMG G21)"
2025-07-24T09:24:10.364007Z  INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: Supported GL Extensions: ["GL_EXT_blend_minmax", "GL_EXT_multi_draw_arrays", "GL_EXT_texture_filter_anisotropic", "GL_EXT_texture_compression_s3tc", "GL_EXT_texture_compression_dxt1", "GL_EXT_texture_compression_rgtc", "GL_EXT_texture_format_BGRA8888", "GL_OES_compressed_ETC1_RGB8_texture", "GL_OES_depth24", "GL_OES_element_index_uint", "GL_OES_fbo_render_mipmap", "GL_OES_mapbuffer", "GL_OES_rgb8_rgba8", "GL_OES_standard_derivatives", "GL_OES_stencil8", "GL_OES_texture_3D", "GL_OES_texture_float", "GL_OES_texture_float_linear", "GL_OES_texture_half_float", "GL_OES_texture_half_float_linear", "GL_OES_texture_npot", "GL_OES_vertex_half_float", "GL_EXT_draw_instanced", "GL_EXT_texture_sRGB_decode", "GL_OES_EGL_image", "GL_OES_depth_texture", "GL_AMD_performance_monitor", "GL_OES_packed_depth_stencil", "GL_EXT_texture_type_2_10_10_10_REV", "GL_NV_conditional_render", "GL_OES_get_program_binary", "GL_APPLE_texture_max_level", "GL_EXT_discard_framebuffer", "GL_EXT_read_format_bgra", "GL_EXT_texture_storage", "GL_NV_pack_subimage", "GL_NV_texture_barrier", "GL_EXT_frag_depth", "GL_NV_fbo_color_attachments", "GL_OES_EGL_image_external", "GL_OES_EGL_sync", "GL_OES_vertex_array_object", "GL_OES_viewport_array", "GL_ANGLE_pack_reverse_row_order", "GL_ANGLE_texture_compression_dxt3", "GL_ANGLE_texture_compression_dxt5", "GL_EXT_occlusion_query_boolean", "GL_EXT_robustness", "GL_EXT_texture_rg", "GL_EXT_unpack_subimage", "GL_NV_draw_buffers", "GL_NV_read_buffer", "GL_NV_read_depth", "GL_NV_read_depth_stencil", "GL_NV_read_stencil", "GL_APPLE_sync", "GL_EXT_draw_buffers", "GL_EXT_instanced_arrays", "GL_EXT_map_buffer_range", "GL_EXT_shadow_samplers", "GL_KHR_debug", "GL_KHR_robustness", "GL_KHR_texture_compression_astc_ldr", "GL_NV_generate_mipmap_sRGB", "GL_NV_pixel_buffer_object", "GL_OES_depth_texture_cube_map", "GL_OES_required_internalformat", "GL_OES_surfaceless_context", "GL_EXT_color_buffer_float", "GL_EXT_debug_label", "GL_EXT_sRGB_write_control", "GL_EXT_separate_shader_objects", "GL_EXT_shader_group_vote", "GL_EXT_shader_implicit_conversions", "GL_EXT_shader_integer_mix", "GL_EXT_tessellation_point_size", "GL_EXT_tessellation_shader", "GL_INTEL_conservative_rasterization", "GL_INTEL_performance_query", "GL_ANDROID_extension_pack_es31a", "GL_EXT_base_instance", "GL_EXT_compressed_ETC1_RGB8_sub_texture", "GL_EXT_copy_image", "GL_EXT_draw_buffers_indexed", "GL_EXT_draw_elements_base_vertex", "GL_EXT_gpu_shader5", "GL_EXT_multi_draw_indirect", "GL_EXT_polygon_offset_clamp", "GL_EXT_primitive_bounding_box", "GL_EXT_render_snorm", "GL_EXT_shader_io_blocks", "GL_EXT_texture_border_clamp", "GL_EXT_texture_buffer", "GL_EXT_texture_cube_map_array", "GL_EXT_texture_norm16", "GL_EXT_texture_view", "GL_KHR_blend_equation_advanced", "GL_KHR_context_flush_control", "GL_KHR_robust_buffer_access_behavior", "GL_NV_image_formats", "GL_NV_shader_noperspective_interpolation", "GL_OES_copy_image", "GL_OES_draw_buffers_indexed", "GL_OES_draw_elements_base_vertex", "GL_OES_gpu_shader5", "GL_OES_primitive_bounding_box", "GL_OES_sample_shading", "GL_OES_sample_variables", "GL_OES_shader_io_blocks", "GL_OES_shader_multisample_interpolation", "GL_OES_tessellation_point_size", "GL_OES_tessellation_shader", "GL_OES_texture_border_clamp", "GL_OES_texture_buffer", "GL_OES_texture_cube_map_array", "GL_OES_texture_stencil8", "GL_OES_texture_storage_multisample_2d_array", "GL_OES_texture_view", "GL_EXT_blend_func_extended", "GL_EXT_buffer_storage", "GL_EXT_float_blend", "GL_EXT_geometry_point_size", "GL_EXT_geometry_shader", "GL_EXT_shader_samples_identical", "GL_EXT_texture_sRGB_R8", "GL_KHR_no_error", "GL_KHR_texture_compression_astc_sliced_3d", "GL_NV_fragment_shader_interlock", "GL_OES_EGL_image_external_essl3", "GL_OES_geometry_point_size", "GL_OES_geometry_shader", "GL_OES_shader_image_atomic", "GL_EXT_clear_texture", "GL_EXT_clip_cull_distance", "GL_EXT_conservative_depth", "GL_EXT_disjoint_timer_query", "GL_EXT_texture_compression_s3tc_srgb", "GL_MESA_shader_integer_functions", "GL_EXT_clip_control", "GL_EXT_color_buffer_half_float", "GL_EXT_memory_object", "GL_EXT_memory_object_fd", "GL_EXT_semaphore", "GL_EXT_semaphore_fd", "GL_EXT_texture_compression_bptc", "GL_EXT_texture_mirror_clamp_to_edge", "GL_KHR_parallel_shader_compile", "GL_NV_alpha_to_coverage_dither_control", "GL_EXT_EGL_image_storage", "GL_EXT_shader_framebuffer_fetch_non_coherent", "GL_EXT_texture_shadow_lod", "GL_INTEL_blackhole_render", "GL_MESA_framebuffer_flip_y", "GL_NV_compute_shader_derivatives", "GL_EXT_demote_to_helper_invocation", "GL_EXT_depth_clamp", "GL_EXT_texture_query_lod", "GL_MESA_sampler_objects", "GL_EXT_EGL_image_storage_compression", "GL_EXT_texture_storage_compression", "GL_MESA_bgra", "GL_MESA_texture_const_bandwidth", ""]
2025-07-24T09:24:10.373825Z  INFO smithay::backend::libinput: Initializing a libinput backend
2025-07-24T09:24:10.373843Z  INFO input_seat{name="seat-0"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Initializing a xkbcommon handler with keymap query
2025-07-24T09:24:10.375196Z  INFO input_seat{name="seat-0"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Loaded Keymap name="English (US)"
2025-07-24T09:24:10.375498Z  INFO smithay::wayland::socket: Created new socket name=Some("wayland-1")
2025-07-24T09:24:10.375503Z  INFO waylanddisplaycore::comp: Listening on wayland socket. socket_name="wayland-1"
Pipeline is live and does not need PREROLL ...
0:00:00.314438090 149438 0x7effc0000b70 FIXME                default gstutils.c:4169:gst_element_decorate_stream_id_internal:<waylanddisplaysrc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'vah264dec0': gst.va.display.handle=context, gst-display=(GstObject)"\(GstVaDisplayDrm\)\ vadisplaydrm3", description=(string)"Intel\(R\)\ Gen\ Graphics", path=(string)/dev/dri/renderD128;
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
2025-07-24T09:24:10.378168Z  INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: ["AB4H", "AB4H:0x0100000000000001", "AB4H:0x0100000000000002", "AB4H:0x0100000000000011", "XB4H", "XB4H:0x0100000000000001", "XB4H:0x0100000000000002", "XB4H:0x0100000000000011", "AR30", "AR30:0x0100000000000001", "AR30:0x0100000000000002", "AR30:0x0100000000000011", "XR30", "XR30:0x0100000000000001", "XR30:0x0100000000000002", "XR30:0x0100000000000011", "AB30", "AB30:0x0100000000000001", "AB30:0x0100000000000002", "AB30:0x0100000000000011", "AR24", "AR24:0x0100000000000001", "AR24:0x0100000000000002", "AR24:0x0100000000000011", "AB24", "AB24:0x0100000000000001", "AB24:0x0100000000000002", "AB24:0x0100000000000011", "XR24", "XR24:0x0100000000000001", "XR24:0x0100000000000002", "XR24:0x0100000000000011", "XB24", "XB24:0x0100000000000001", "XB24:0x0100000000000002", "XB24:0x0100000000000011", "AR15", "AR15:0x0100000000000001", "AR15:0x0100000000000002", "AR15:0x0100000000000011", "RG16", "RG16:0x0100000000000001", "RG16:0x0100000000000002", "RG16:0x0100000000000011", "R8  ", "R8  :0x0100000000000001", "R8  :0x0100000000000002", "R8  :0x0100000000000011", "R16 ", "R16 :0x0100000000000001", "R16 :0x0100000000000002", "R16 :0x0100000000000011", "GR88", "GR88:0x0100000000000001", "GR88:0x0100000000000002", "GR88:0x0100000000000011", "GR32", "GR32:0x0100000000000001", "GR32:0x0100000000000002", "GR32:0x0100000000000011"]
0:00:00.317742539 149438 0x7effc0000b70 ERROR               GST_RUST base_src.rs:452:gstreamer_base::subclass::base_src::BaseSrcImplExt::parent_negotiate::{{closure}}:<waylanddisplaysrc0> Parent function `negotiate` failed
0:00:00.317753239 149438 0x7effc0000b70 WARN                 basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: Internal data stream error.
0:00:00.317756816 149438 0x7effc0000b70 WARN                 basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstWaylandDisplaySrc:waylanddisplaysrc0: Internal data stream error.
Additional debug info:
../gstreamer/subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3187): gst_base_src_loop (): /GstPipeline:pipeline0/GstWaylandDisplaySrc:waylanddisplaysrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.003195643
Setting pipeline to NULL ...
Freeing pipeline ...
$ gst-inspect-1.0 vapostproc
Factory Details:
  Rank                     none (0)
  Long-name                VA-API Video Postprocessor in Intel(R) Gen Graphics
  Klass                    Effect/Converter/Filter/Colorspace/Scaler/Video/Hardware
  Description              VA-API based video postprocessor
  Author                   Víctor Jáquez <vjaquez@igalia.com>
  Documentation            https://gstreamer.freedesktop.org/documentation/va/vapostproc.html

Plugin Details:
  Name                     va
  Description              VA-API codecs plugin
  Filename                 /usr/lib/gstreamer-1.0/libgstva.so
  Version                  1.26.4
  License                  LGPL
  Source module            gst-plugins-bad
  Documentation            https://gstreamer.freedesktop.org/documentation/va/
  Source release date      2025-07-16
  Binary package           Arch Linux GStreamer 1.26.4-1
  Origin URL               https://www.archlinux.org/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----GstVaBaseTransform
                               +----GstVaPostProc

Implemented Interfaces:
  GstColorBalance

Element Flags:

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VAMemory)
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: { (string)NV12, (string)I420, (string)YV12, (string)YUY2, (string)Y42B, (string)RGBA, (string)BGRA, (string)RGBP, (string)RGBx, (string)P010_10LE, (string)RGB, (string)BGR10A2_LE, (string)VUYA, (string)Y210, (string)Y410 }
      video/x-raw(memory:DMABuf)
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: DMA_DRM
             drm-format: { (string)NV12:0x0100000000000009, (string)YU12, (string)YV12, (string)YUYV:0x0100000000000009, (string)YU16:0x0100000000000009, (string)AB24:0x0100000000000009, (string)AR24:0x0100000000000009, (string)XB24:0x0100000000000009, (string)P010:0x0100000000000009, (string)AR30:0x0100000000000009, (string)AYUV:0x0100000000000009, (string)Y210:0x0100000000000009, (string)Y410:0x0100000000000009 }
      video/x-raw
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: { (string)GRAY8, (string)P010_10LE, (string)Y210, (string)Y410, (string)I420, (string)BGR10A2_LE, (string)NV21, (string)P012_LE, (string)Y212_LE, (string)Y412_LE, (string)NV12, (string)YV12, (string)YUY2, (string)RGB16, (string)RGBA, (string)BGRA, (string)Y42B, (string)Y444, (string)RGBP, (string)VUYA, (string)RGBx, (string)BGRx, (string)UYVY }
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VAMemory)
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: { (string)NV12, (string)I420, (string)YV12, (string)YUY2, (string)Y42B, (string)RGBA, (string)BGRA, (string)RGBP, (string)RGBx, (string)P010_10LE, (string)RGB, (string)BGR10A2_LE, (string)VUYA, (string)Y210, (string)Y410 }
      video/x-raw(memory:DMABuf)
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: DMA_DRM
             drm-format: { (string)NV12:0x0100000000000009, (string)YU12, (string)YV12, (string)YUYV:0x0100000000000009, (string)YU16:0x0100000000000009, (string)AB24:0x0100000000000009, (string)AR24:0x0100000000000009, (string)XB24:0x0100000000000009, (string)P010:0x0100000000000009, (string)AR30:0x0100000000000009, (string)AYUV:0x0100000000000009, (string)Y210:0x0100000000000009, (string)Y410:0x0100000000000009 }
      video/x-raw
                  width: [ 16, 16384 ]
                 height: [ 16, 16384 ]
                 format: { (string)GRAY8, (string)P010_10LE, (string)Y210, (string)Y410, (string)I420, (string)BGR10A2_LE, (string)NV21, (string)P012_LE, (string)Y212_LE, (string)Y412_LE, (string)NV12, (string)YV12, (string)YUY2, (string)RGB16, (string)RGBA, (string)BGRA, (string)Y42B, (string)Y444, (string)RGBP, (string)VUYA, (string)RGBx, (string)BGRx, (string)UYVY }
Originally created by @anonymix007 on GitHub (Jul 24, 2025). Original GitHub issue: https://github.com/games-on-whales/gst-wayland-display/issues/14 ``` $ GST_PLUGIN_PATH=./target/release/ GST_DEBUG=3 GST_GL_PLATFORM=egl gst-launch-1.0 waylanddisplaysrc ! "video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1" ! vapostproc ! vah264enc ! vah264dec ! glimagesink 2025-07-24T09:24:10.305133Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: [] 2025-07-24T09:24:10.305165Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: [] 2025-07-24T09:24:10.305190Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: [] 2025-07-24T09:24:10.305212Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: [] 2025-07-24T09:24:10.305253Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: [] Setting pipeline to PAUSED ... 2025-07-24T09:24:10.357309Z INFO smithay::backend::egl::display: Successfully selected EGL platform: PLATFORM_DEVICE_EXT 2025-07-24T09:24:10.360695Z INFO smithay::backend::egl::display: EGL Initialized 2025-07-24T09:24:10.360701Z INFO smithay::backend::egl::display: EGL Version: (1, 5) 2025-07-24T09:24:10.360712Z INFO smithay::backend::egl::display: Supported EGL display extensions: ["EGL_ANDROID_blob_cache", "EGL_ANDROID_native_fence_sync", "EGL_EXT_config_select_group", "EGL_EXT_create_context_robustness", "EGL_EXT_image_dma_buf_import", "EGL_EXT_image_dma_buf_import_modifiers", "EGL_EXT_query_reset_notification_strategy", "EGL_EXT_surface_compression", "EGL_IMG_context_priority", "EGL_KHR_cl_event2", "EGL_KHR_config_attribs", "EGL_KHR_context_flush_control", "EGL_KHR_create_context", "EGL_KHR_create_context_no_error", "EGL_KHR_fence_sync", "EGL_KHR_get_all_proc_addresses", "EGL_KHR_gl_colorspace", "EGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_cubemap_image", "EGL_KHR_image_base", "EGL_KHR_no_config_context", "EGL_KHR_partial_update", "EGL_KHR_reusable_sync", "EGL_KHR_surfaceless_context", "EGL_EXT_pixel_format_float", "EGL_KHR_wait_sync", "EGL_MESA_configless_context", "EGL_MESA_drm_image", "EGL_MESA_gl_interop", "EGL_MESA_image_dma_buf_export", "EGL_MESA_query_driver", "EGL_MESA_x11_native_visual_id", "EGL_WL_bind_wayland_display", ""] 2025-07-24T09:24:10.363331Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}: smithay::backend::egl::context: EGL context created priority=Some(Medium) 2025-07-24T09:24:10.363993Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: Initializing OpenGL ES Renderer 2025-07-24T09:24:10.363997Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Version: "OpenGL ES 3.2 Mesa 25.2.0-devel (git-fe3c1298dd)" 2025-07-24T09:24:10.364001Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Vendor: "Intel" 2025-07-24T09:24:10.364004Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: GL Renderer: "Mesa Intel(R) Arc(tm) B580 Graphics (BMG G21)" 2025-07-24T09:24:10.364007Z INFO egl{native="/dev/dri/renderD128" platform="PLATFORM_DEVICE_EXT" version=(1, 5)}:egl_context{ptr=139637373011712}:renderer_gles2: smithay::backend::renderer::gles: Supported GL Extensions: ["GL_EXT_blend_minmax", "GL_EXT_multi_draw_arrays", "GL_EXT_texture_filter_anisotropic", "GL_EXT_texture_compression_s3tc", "GL_EXT_texture_compression_dxt1", "GL_EXT_texture_compression_rgtc", "GL_EXT_texture_format_BGRA8888", "GL_OES_compressed_ETC1_RGB8_texture", "GL_OES_depth24", "GL_OES_element_index_uint", "GL_OES_fbo_render_mipmap", "GL_OES_mapbuffer", "GL_OES_rgb8_rgba8", "GL_OES_standard_derivatives", "GL_OES_stencil8", "GL_OES_texture_3D", "GL_OES_texture_float", "GL_OES_texture_float_linear", "GL_OES_texture_half_float", "GL_OES_texture_half_float_linear", "GL_OES_texture_npot", "GL_OES_vertex_half_float", "GL_EXT_draw_instanced", "GL_EXT_texture_sRGB_decode", "GL_OES_EGL_image", "GL_OES_depth_texture", "GL_AMD_performance_monitor", "GL_OES_packed_depth_stencil", "GL_EXT_texture_type_2_10_10_10_REV", "GL_NV_conditional_render", "GL_OES_get_program_binary", "GL_APPLE_texture_max_level", "GL_EXT_discard_framebuffer", "GL_EXT_read_format_bgra", "GL_EXT_texture_storage", "GL_NV_pack_subimage", "GL_NV_texture_barrier", "GL_EXT_frag_depth", "GL_NV_fbo_color_attachments", "GL_OES_EGL_image_external", "GL_OES_EGL_sync", "GL_OES_vertex_array_object", "GL_OES_viewport_array", "GL_ANGLE_pack_reverse_row_order", "GL_ANGLE_texture_compression_dxt3", "GL_ANGLE_texture_compression_dxt5", "GL_EXT_occlusion_query_boolean", "GL_EXT_robustness", "GL_EXT_texture_rg", "GL_EXT_unpack_subimage", "GL_NV_draw_buffers", "GL_NV_read_buffer", "GL_NV_read_depth", "GL_NV_read_depth_stencil", "GL_NV_read_stencil", "GL_APPLE_sync", "GL_EXT_draw_buffers", "GL_EXT_instanced_arrays", "GL_EXT_map_buffer_range", "GL_EXT_shadow_samplers", "GL_KHR_debug", "GL_KHR_robustness", "GL_KHR_texture_compression_astc_ldr", "GL_NV_generate_mipmap_sRGB", "GL_NV_pixel_buffer_object", "GL_OES_depth_texture_cube_map", "GL_OES_required_internalformat", "GL_OES_surfaceless_context", "GL_EXT_color_buffer_float", "GL_EXT_debug_label", "GL_EXT_sRGB_write_control", "GL_EXT_separate_shader_objects", "GL_EXT_shader_group_vote", "GL_EXT_shader_implicit_conversions", "GL_EXT_shader_integer_mix", "GL_EXT_tessellation_point_size", "GL_EXT_tessellation_shader", "GL_INTEL_conservative_rasterization", "GL_INTEL_performance_query", "GL_ANDROID_extension_pack_es31a", "GL_EXT_base_instance", "GL_EXT_compressed_ETC1_RGB8_sub_texture", "GL_EXT_copy_image", "GL_EXT_draw_buffers_indexed", "GL_EXT_draw_elements_base_vertex", "GL_EXT_gpu_shader5", "GL_EXT_multi_draw_indirect", "GL_EXT_polygon_offset_clamp", "GL_EXT_primitive_bounding_box", "GL_EXT_render_snorm", "GL_EXT_shader_io_blocks", "GL_EXT_texture_border_clamp", "GL_EXT_texture_buffer", "GL_EXT_texture_cube_map_array", "GL_EXT_texture_norm16", "GL_EXT_texture_view", "GL_KHR_blend_equation_advanced", "GL_KHR_context_flush_control", "GL_KHR_robust_buffer_access_behavior", "GL_NV_image_formats", "GL_NV_shader_noperspective_interpolation", "GL_OES_copy_image", "GL_OES_draw_buffers_indexed", "GL_OES_draw_elements_base_vertex", "GL_OES_gpu_shader5", "GL_OES_primitive_bounding_box", "GL_OES_sample_shading", "GL_OES_sample_variables", "GL_OES_shader_io_blocks", "GL_OES_shader_multisample_interpolation", "GL_OES_tessellation_point_size", "GL_OES_tessellation_shader", "GL_OES_texture_border_clamp", "GL_OES_texture_buffer", "GL_OES_texture_cube_map_array", "GL_OES_texture_stencil8", "GL_OES_texture_storage_multisample_2d_array", "GL_OES_texture_view", "GL_EXT_blend_func_extended", "GL_EXT_buffer_storage", "GL_EXT_float_blend", "GL_EXT_geometry_point_size", "GL_EXT_geometry_shader", "GL_EXT_shader_samples_identical", "GL_EXT_texture_sRGB_R8", "GL_KHR_no_error", "GL_KHR_texture_compression_astc_sliced_3d", "GL_NV_fragment_shader_interlock", "GL_OES_EGL_image_external_essl3", "GL_OES_geometry_point_size", "GL_OES_geometry_shader", "GL_OES_shader_image_atomic", "GL_EXT_clear_texture", "GL_EXT_clip_cull_distance", "GL_EXT_conservative_depth", "GL_EXT_disjoint_timer_query", "GL_EXT_texture_compression_s3tc_srgb", "GL_MESA_shader_integer_functions", "GL_EXT_clip_control", "GL_EXT_color_buffer_half_float", "GL_EXT_memory_object", "GL_EXT_memory_object_fd", "GL_EXT_semaphore", "GL_EXT_semaphore_fd", "GL_EXT_texture_compression_bptc", "GL_EXT_texture_mirror_clamp_to_edge", "GL_KHR_parallel_shader_compile", "GL_NV_alpha_to_coverage_dither_control", "GL_EXT_EGL_image_storage", "GL_EXT_shader_framebuffer_fetch_non_coherent", "GL_EXT_texture_shadow_lod", "GL_INTEL_blackhole_render", "GL_MESA_framebuffer_flip_y", "GL_NV_compute_shader_derivatives", "GL_EXT_demote_to_helper_invocation", "GL_EXT_depth_clamp", "GL_EXT_texture_query_lod", "GL_MESA_sampler_objects", "GL_EXT_EGL_image_storage_compression", "GL_EXT_texture_storage_compression", "GL_MESA_bgra", "GL_MESA_texture_const_bandwidth", ""] 2025-07-24T09:24:10.373825Z INFO smithay::backend::libinput: Initializing a libinput backend 2025-07-24T09:24:10.373843Z INFO input_seat{name="seat-0"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Initializing a xkbcommon handler with keymap query 2025-07-24T09:24:10.375196Z INFO input_seat{name="seat-0"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Loaded Keymap name="English (US)" 2025-07-24T09:24:10.375498Z INFO smithay::wayland::socket: Created new socket name=Some("wayland-1") 2025-07-24T09:24:10.375503Z INFO waylanddisplaycore::comp: Listening on wayland socket. socket_name="wayland-1" Pipeline is live and does not need PREROLL ... 0:00:00.314438090 149438 0x7effc0000b70 FIXME default gstutils.c:4169:gst_element_decorate_stream_id_internal:<waylanddisplaysrc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0"; Got context from element 'vah264dec0': gst.va.display.handle=context, gst-display=(GstObject)"\(GstVaDisplayDrm\)\ vadisplaydrm3", description=(string)"Intel\(R\)\ Gen\ Graphics", path=(string)/dev/dri/renderD128; Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock 2025-07-24T09:24:10.378168Z INFO gstwaylanddisplaysrc::waylandsrc::imp: Supported DMA formats: ["AB4H", "AB4H:0x0100000000000001", "AB4H:0x0100000000000002", "AB4H:0x0100000000000011", "XB4H", "XB4H:0x0100000000000001", "XB4H:0x0100000000000002", "XB4H:0x0100000000000011", "AR30", "AR30:0x0100000000000001", "AR30:0x0100000000000002", "AR30:0x0100000000000011", "XR30", "XR30:0x0100000000000001", "XR30:0x0100000000000002", "XR30:0x0100000000000011", "AB30", "AB30:0x0100000000000001", "AB30:0x0100000000000002", "AB30:0x0100000000000011", "AR24", "AR24:0x0100000000000001", "AR24:0x0100000000000002", "AR24:0x0100000000000011", "AB24", "AB24:0x0100000000000001", "AB24:0x0100000000000002", "AB24:0x0100000000000011", "XR24", "XR24:0x0100000000000001", "XR24:0x0100000000000002", "XR24:0x0100000000000011", "XB24", "XB24:0x0100000000000001", "XB24:0x0100000000000002", "XB24:0x0100000000000011", "AR15", "AR15:0x0100000000000001", "AR15:0x0100000000000002", "AR15:0x0100000000000011", "RG16", "RG16:0x0100000000000001", "RG16:0x0100000000000002", "RG16:0x0100000000000011", "R8 ", "R8 :0x0100000000000001", "R8 :0x0100000000000002", "R8 :0x0100000000000011", "R16 ", "R16 :0x0100000000000001", "R16 :0x0100000000000002", "R16 :0x0100000000000011", "GR88", "GR88:0x0100000000000001", "GR88:0x0100000000000002", "GR88:0x0100000000000011", "GR32", "GR32:0x0100000000000001", "GR32:0x0100000000000002", "GR32:0x0100000000000011"] 0:00:00.317742539 149438 0x7effc0000b70 ERROR GST_RUST base_src.rs:452:gstreamer_base::subclass::base_src::BaseSrcImplExt::parent_negotiate::{{closure}}:<waylanddisplaysrc0> Parent function `negotiate` failed 0:00:00.317753239 149438 0x7effc0000b70 WARN basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: Internal data stream error. 0:00:00.317756816 149438 0x7effc0000b70 WARN basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: streaming stopped, reason not-negotiated (-4) ERROR: from element /GstPipeline:pipeline0/GstWaylandDisplaySrc:waylanddisplaysrc0: Internal data stream error. Additional debug info: ../gstreamer/subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3187): gst_base_src_loop (): /GstPipeline:pipeline0/GstWaylandDisplaySrc:waylanddisplaysrc0: streaming stopped, reason not-negotiated (-4) Execution ended after 0:00:00.003195643 Setting pipeline to NULL ... Freeing pipeline ... ``` ``` $ gst-inspect-1.0 vapostproc Factory Details: Rank none (0) Long-name VA-API Video Postprocessor in Intel(R) Gen Graphics Klass Effect/Converter/Filter/Colorspace/Scaler/Video/Hardware Description VA-API based video postprocessor Author Víctor Jáquez <vjaquez@igalia.com> Documentation https://gstreamer.freedesktop.org/documentation/va/vapostproc.html Plugin Details: Name va Description VA-API codecs plugin Filename /usr/lib/gstreamer-1.0/libgstva.so Version 1.26.4 License LGPL Source module gst-plugins-bad Documentation https://gstreamer.freedesktop.org/documentation/va/ Source release date 2025-07-16 Binary package Arch Linux GStreamer 1.26.4-1 Origin URL https://www.archlinux.org/ GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseTransform +----GstVaBaseTransform +----GstVaPostProc Implemented Interfaces: GstColorBalance Element Flags: Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/x-raw(memory:VAMemory) width: [ 16, 16384 ] height: [ 16, 16384 ] format: { (string)NV12, (string)I420, (string)YV12, (string)YUY2, (string)Y42B, (string)RGBA, (string)BGRA, (string)RGBP, (string)RGBx, (string)P010_10LE, (string)RGB, (string)BGR10A2_LE, (string)VUYA, (string)Y210, (string)Y410 } video/x-raw(memory:DMABuf) width: [ 16, 16384 ] height: [ 16, 16384 ] format: DMA_DRM drm-format: { (string)NV12:0x0100000000000009, (string)YU12, (string)YV12, (string)YUYV:0x0100000000000009, (string)YU16:0x0100000000000009, (string)AB24:0x0100000000000009, (string)AR24:0x0100000000000009, (string)XB24:0x0100000000000009, (string)P010:0x0100000000000009, (string)AR30:0x0100000000000009, (string)AYUV:0x0100000000000009, (string)Y210:0x0100000000000009, (string)Y410:0x0100000000000009 } video/x-raw width: [ 16, 16384 ] height: [ 16, 16384 ] format: { (string)GRAY8, (string)P010_10LE, (string)Y210, (string)Y410, (string)I420, (string)BGR10A2_LE, (string)NV21, (string)P012_LE, (string)Y212_LE, (string)Y412_LE, (string)NV12, (string)YV12, (string)YUY2, (string)RGB16, (string)RGBA, (string)BGRA, (string)Y42B, (string)Y444, (string)RGBP, (string)VUYA, (string)RGBx, (string)BGRx, (string)UYVY } SRC template: 'src' Availability: Always Capabilities: video/x-raw(memory:VAMemory) width: [ 16, 16384 ] height: [ 16, 16384 ] format: { (string)NV12, (string)I420, (string)YV12, (string)YUY2, (string)Y42B, (string)RGBA, (string)BGRA, (string)RGBP, (string)RGBx, (string)P010_10LE, (string)RGB, (string)BGR10A2_LE, (string)VUYA, (string)Y210, (string)Y410 } video/x-raw(memory:DMABuf) width: [ 16, 16384 ] height: [ 16, 16384 ] format: DMA_DRM drm-format: { (string)NV12:0x0100000000000009, (string)YU12, (string)YV12, (string)YUYV:0x0100000000000009, (string)YU16:0x0100000000000009, (string)AB24:0x0100000000000009, (string)AR24:0x0100000000000009, (string)XB24:0x0100000000000009, (string)P010:0x0100000000000009, (string)AR30:0x0100000000000009, (string)AYUV:0x0100000000000009, (string)Y210:0x0100000000000009, (string)Y410:0x0100000000000009 } video/x-raw width: [ 16, 16384 ] height: [ 16, 16384 ] format: { (string)GRAY8, (string)P010_10LE, (string)Y210, (string)Y410, (string)I420, (string)BGR10A2_LE, (string)NV21, (string)P012_LE, (string)Y212_LE, (string)Y412_LE, (string)NV12, (string)YV12, (string)YUY2, (string)RGB16, (string)RGBA, (string)BGRA, (string)Y42B, (string)Y444, (string)RGBP, (string)VUYA, (string)RGBx, (string)BGRx, (string)UYVY } ```
Author
Owner

@DatCaptainHorse commented on GitHub (Jul 24, 2025):

Known issue with xe drivers (I have A770 where both i915 and xe driver can be used), I'll try to look into things again after update PR is done, maybe it will help solving this issue.

Edit: Seems you're also in the know :)

<!-- gh-comment-id:3113193814 --> @DatCaptainHorse commented on GitHub (Jul 24, 2025): Known issue with `xe` drivers (I have A770 where both i915 and xe driver can be used), I'll try to look into things again after update PR is done, maybe it will help solving this issue. Edit: [Seems you're also in the know](https://github.com/intel/media-driver/issues/1944) :)
Author
Owner

@anonymix007 commented on GitHub (Jul 29, 2025):

I got it to somewhat succeed by removing DrmModifier::Unrecognized(0x0100000000000009) hack in drm_to_gst_format.
At least I see an extra cursor (not just the system one) on the glimagesink window until it disappears a few seconds later.

$ GST_DEBUG=3 GST_GL_PLATFORM=egl GST_PLUGIN_PATH=./target/debug gst-launch-1.0 waylanddisplaysrc ! 'video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1' ! vapostproc ! vah264enc ! vah264dec ! glimagesink
Image

Are you sure that hack is neccesary? As per gst-inspect-1.0 vapostproc output (see above), this modifier is already supported with some formats.

There still seems to be something wrong though:

0:00:00.362971990 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)
0:00:00.363684123 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)
0:00:00.364345845 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator4> driver bug: fd size (8388608) is bigger than object descriptor size (8355840)
0:00:00.364924208 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator4> driver bug: fd size (8388608) is bigger than object descriptor size (8355840)
0:00:00.365925292 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)
0:00:00.366235533 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)
0:00:00.366542534 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)
0:00:00.372236838 32540 0x55b870aaa6b0 ERROR          glbasetexture gstglmemory.c:941:_gl_tex_copy: Cannot copy External OES textures
0:00:00.416941093 32540 0x7f4238000b70 WARN                vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880)

It seems that DMA bufs are allocated via libgbm. I think the only sane way forward is to actually use GstVaDmabufAllocator if downstream caps suggest that there are other VA elements in a pipeline and not bother with handling modifiers manually.

<!-- gh-comment-id:3130344798 --> @anonymix007 commented on GitHub (Jul 29, 2025): I got it to somewhat succeed by removing `DrmModifier::Unrecognized(0x0100000000000009)` hack in `drm_to_gst_format`. At least I see an extra cursor (not just the system one) on the glimagesink window until it disappears a few seconds later. ```console $ GST_DEBUG=3 GST_GL_PLATFORM=egl GST_PLUGIN_PATH=./target/debug gst-launch-1.0 waylanddisplaysrc ! 'video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1' ! vapostproc ! vah264enc ! vah264dec ! glimagesink ``` <img width="1919" height="1038" alt="Image" src="https://github.com/user-attachments/assets/7a779cf7-1595-485d-b995-deff08926d2b" /> Are you sure that hack is neccesary? As per `gst-inspect-1.0 vapostproc` output (see above), this modifier is already supported with some formats. There still seems to be something wrong though: ``` 0:00:00.362971990 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) 0:00:00.363684123 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) 0:00:00.364345845 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator4> driver bug: fd size (8388608) is bigger than object descriptor size (8355840) 0:00:00.364924208 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator4> driver bug: fd size (8388608) is bigger than object descriptor size (8355840) 0:00:00.365925292 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) 0:00:00.366235533 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) 0:00:00.366542534 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) 0:00:00.372236838 32540 0x55b870aaa6b0 ERROR glbasetexture gstglmemory.c:941:_gl_tex_copy: Cannot copy External OES textures 0:00:00.416941093 32540 0x7f4238000b70 WARN vamemory gstvaallocator.c:721:gst_va_dmabuf_allocator_setup_buffer_full:<vadmabufallocator3> driver bug: fd size (3670016) is bigger than object descriptor size (3194880) ``` It seems that DMA bufs are allocated via libgbm. I think the only sane way forward is to actually use [GstVaDmabufAllocator](https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#GstVaDmabufAllocator) if downstream caps suggest that there are other VA elements in a pipeline and not bother with handling modifiers manually.
Author
Owner

@DatCaptainHorse commented on GitHub (Jul 29, 2025):

🤔 it's needed for DG2 + i915 atleast, without the workaround/hack this is what I get on A770:

0:00:00.088870343  8053 0x7fe998000b70 ERROR               GST_RUST base_src.rs:452:gstreamer_base::subclass::base_src::BaseSrcImplExt::parent_negotiate::{{closure}}:<waylanddisplaysrc0> Parent function `negotiate` failed
0:00:00.088882833  8053 0x7fe998000b70 WARN                 basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: Internal data stream error.
0:00:00.088887923  8053 0x7fe998000b70 WARN                 basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: streaming stopped, reason not-negotiated (-4)

I'll update this comment after trying with xe driver again, maybe stuff got better last time on that driver's side.

Update: No luck for me, same errors. Can you share your gst-inspect-1.0 vah264enc formats @anonymix007 ? - For me only "LP" (Low Power) encoders are available (i.e. vah264lpenc)

<!-- gh-comment-id:3130949610 --> @DatCaptainHorse commented on GitHub (Jul 29, 2025): 🤔 it's needed for DG2 + i915 atleast, without the workaround/hack this is what I get on A770: ``` 0:00:00.088870343 8053 0x7fe998000b70 ERROR GST_RUST base_src.rs:452:gstreamer_base::subclass::base_src::BaseSrcImplExt::parent_negotiate::{{closure}}:<waylanddisplaysrc0> Parent function `negotiate` failed 0:00:00.088882833 8053 0x7fe998000b70 WARN basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: Internal data stream error. 0:00:00.088887923 8053 0x7fe998000b70 WARN basesrc gstbasesrc.c:3187:gst_base_src_loop:<waylanddisplaysrc0> error: streaming stopped, reason not-negotiated (-4) ``` I'll update this comment after trying with `xe` driver again, maybe stuff got better last time on that driver's side. Update: No luck for me, same errors. Can you share your `gst-inspect-1.0 vah264enc` formats @anonymix007 ? - For me only "LP" (Low Power) encoders are available (i.e. `vah264lpenc`)
Author
Owner

@ABeltramo commented on GitHub (Jul 29, 2025):

At least I see an extra cursor (not just the system one) on the glimagesink window until it disappears a few seconds later.

That means everything is working.
For quickly testing via the CLI you can pass mouse="/dev/input/eventX" keyboard="/dev/input/eventY" (with the right devices from your host) to waylanddisplaysrc. And to display something, you can simply run WAYLAND_DISPLAY=wayland-1 firefox (the name of the Wayland socket is allocated automatically, check the logs).

It seems that DMA bufs are allocated via libgbm. I think the only sane way forward is to actually use GstVaDmabufAllocator if downstream caps suggest that there are other VA elements in a pipeline and not bother with handling modifiers manually.

We'll have to see if and how that works, ultimately the buffer must be turned into an EGLImage in order for Smithay to use it in the GLES renderer, this is what we end up calling. A buffer created from va can be imported via CreateImageKHR?

P.S. I'm planning on adding support for Vulkan buffers, given that Smithay should support it and the recent advances in Gstreamer I'd really like to explore that in the near future. It would be nice to finally have a cross-platform encoding pipeline without all these kinds of issues..

<!-- gh-comment-id:3130977209 --> @ABeltramo commented on GitHub (Jul 29, 2025): > At least I see an extra cursor (not just the system one) on the glimagesink window until it disappears a few seconds later. That means everything is working. For quickly testing via the CLI you can pass `mouse="/dev/input/eventX" keyboard="/dev/input/eventY"` (with the right devices from your host) to `waylanddisplaysrc`. And to display something, you can simply run `WAYLAND_DISPLAY=wayland-1 firefox` (the name of the Wayland socket is allocated automatically, check the logs). > It seems that DMA bufs are allocated via libgbm. I think the only sane way forward is to actually use [GstVaDmabufAllocator](https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#GstVaDmabufAllocator) if downstream caps suggest that there are other VA elements in a pipeline and not bother with handling modifiers manually. We'll have to see if and how that works, ultimately the buffer must be turned into an `EGLImage` in order for Smithay to use it in the `GLES` renderer, [this is what we end up calling](https://github.com/Smithay/smithay/blob/0d49747f72b281eb5ecf7e61e221d55dcb8732c7/src/backend/egl/display.rs#L725). A buffer created from `va` can be imported via `CreateImageKHR`? P.S. I'm planning on adding support for Vulkan buffers, given that Smithay [should support it](https://docs.rs/smithay/0.7.0/smithay/backend/vulkan/index.html) and the recent [advances in Gstreamer](https://gstreamer.freedesktop.org/documentation/vulkan/vulkanh264enc.html?gi-language=c#vulkanh264enc) I'd really like to explore that in the near future. It would be nice to finally have a cross-platform encoding pipeline without all these kinds of issues..
Author
Owner

@anonymix007 commented on GitHub (Jul 29, 2025):

@DatCaptainHorse:

$ GST_GL_PLATFORM=egl gst-inspect-1.0 vah264enc
Factory Details:
  Rank                     none (0)
  Long-name                VA-API H.264 Encoder in Intel(R) Gen Graphics
  Klass                    Codec/Encoder/Video/Hardware
  Description              VA-API based H.264 video encoder
  Author                   He Junyan <junyan.he@intel.com>
  Documentation            https://gstreamer.freedesktop.org/documentation/va/vah264enc.html

Plugin Details:
  Name                     va
  Description              VA-API codecs plugin
  Filename                 /usr/lib/gstreamer-1.0/libgstva.so
  Version                  1.27.1.1
  License                  LGPL
  Source module            gst-plugins-bad
  Documentation            https://gstreamer.freedesktop.org/documentation/va/
  Binary package           Arch Linux GStreamer 1.27.1.r81.g81bdef0150-1
  Origin URL               https://www.archlinux.org/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstVideoEncoder
                         +----GstVaBaseEnc
                               +----GstVaH264Enc

Implemented Interfaces:
  GstPreset

Element Flags:

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VAMemory)
                  width: [ 32, 4096 ] (GstIntRange)
                 height: [ 32, 4096 ] (GstIntRange)
                 format: NV12 (gchararray)
      video/x-raw(memory:DMABuf)
                  width: [ 32, 4096 ] (GstIntRange)
                 height: [ 32, 4096 ] (GstIntRange)
                 format: DMA_DRM (gchararray)
             drm-format: NV12:0x0100000000000009 (gchararray)
      video/x-raw
                  width: [ 32, 4096 ] (GstIntRange)
                 height: [ 32, 4096 ] (GstIntRange)
                 format: NV12 (gchararray)

Does it print something different for you? I guess it could be that vaCreateSurface uses a different modifier on DG2 by default (and this is how GStreamer "queries" the supported modifiers), but using VA allocator should be enough to make it happy.

A buffer created from va can be imported via CreateImageKHR?

It should be, this is a standard DMA buffer and these are not Nvidia GPUs after all.

And to display something, you can simply run WAYLAND_DISPLAY=wayland-1 firefox

This actually works, cool! BTW, have you considered handling navigation events in the element? This would make testing with gst-launch-1.0 easier.

Vulkan buffers

I think it's a bit early for Vulkan, but it would be really cool to get something not tied to a specific hw encoder API. But it'll be a long time until vulkan video encoding will reach feature parity with VA-API and NVENC. Currently vulkanh264enc doesn't seem to be enabled on B580.

<!-- gh-comment-id:3131559213 --> @anonymix007 commented on GitHub (Jul 29, 2025): @DatCaptainHorse: ``` $ GST_GL_PLATFORM=egl gst-inspect-1.0 vah264enc Factory Details: Rank none (0) Long-name VA-API H.264 Encoder in Intel(R) Gen Graphics Klass Codec/Encoder/Video/Hardware Description VA-API based H.264 video encoder Author He Junyan <junyan.he@intel.com> Documentation https://gstreamer.freedesktop.org/documentation/va/vah264enc.html Plugin Details: Name va Description VA-API codecs plugin Filename /usr/lib/gstreamer-1.0/libgstva.so Version 1.27.1.1 License LGPL Source module gst-plugins-bad Documentation https://gstreamer.freedesktop.org/documentation/va/ Binary package Arch Linux GStreamer 1.27.1.r81.g81bdef0150-1 Origin URL https://www.archlinux.org/ GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstVideoEncoder +----GstVaBaseEnc +----GstVaH264Enc Implemented Interfaces: GstPreset Element Flags: Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/x-raw(memory:VAMemory) width: [ 32, 4096 ] (GstIntRange) height: [ 32, 4096 ] (GstIntRange) format: NV12 (gchararray) video/x-raw(memory:DMABuf) width: [ 32, 4096 ] (GstIntRange) height: [ 32, 4096 ] (GstIntRange) format: DMA_DRM (gchararray) drm-format: NV12:0x0100000000000009 (gchararray) video/x-raw width: [ 32, 4096 ] (GstIntRange) height: [ 32, 4096 ] (GstIntRange) format: NV12 (gchararray) ``` Does it print something different for you? I guess it could be that vaCreateSurface uses a different modifier on DG2 by default (and this is how GStreamer "queries" the supported modifiers), but using VA allocator should be enough to make it happy. > A buffer created from va can be imported via CreateImageKHR? It should be, this is a standard DMA buffer and these are not Nvidia GPUs after all. > And to display something, you can simply run WAYLAND_DISPLAY=wayland-1 firefox This actually works, cool! BTW, have you considered handling navigation events in the element? This would make testing with `gst-launch-1.0` easier. > Vulkan buffers I think it's a bit early for Vulkan, but it would be really cool to get something not tied to a specific hw encoder API. But it'll be a long time until vulkan video encoding will reach feature parity with VA-API and NVENC. Currently `vulkanh264enc` doesn't seem to be enabled on B580.
Author
Owner

@DatCaptainHorse commented on GitHub (Jul 29, 2025):

@anonymix007 hm, I have same modifiers, so it's weird that for me it just errors out without the workaround.. DG2 bug maybe? 🤔

❯ GST_GL_PLATFORM=egl gst-inspect-1.0 vah264lpenc
Factory Details:
  Rank                     none (0)
  Long-name                VA-API H.264 Low Power Encoder in Intel(R) Gen Graphics
  Klass                    Codec/Encoder/Video/Hardware
  Description              VA-API based H.264 low power video encoder
  Author                   He Junyan <junyan.he@intel.com>
  Documentation            https://gstreamer.freedesktop.org/documentation/va/vah264lpenc.html

Plugin Details:
  Name                     va
  Description              VA-API codecs plugin
  Filename                 /usr/lib/gstreamer-1.0/libgstva.so
  Version                  1.26.4
  License                  LGPL
  Source module            gst-plugins-bad
  Documentation            https://gstreamer.freedesktop.org/documentation/va/
  Source release date      2025-07-16
  Binary package           Arch Linux GStreamer 1.26.4-1.1
  Origin URL               https://www.archlinux.org/

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstVideoEncoder
                         +----GstVaBaseEnc
                               +----GstVaH264LPEnc

Implemented Interfaces:
  GstPreset

Element Flags:

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw(memory:VAMemory)
                  width: [ 32, 4096 ]
                 height: [ 32, 4096 ]
                 format: NV12
      video/x-raw(memory:DMABuf)
                  width: [ 32, 4096 ]
                 height: [ 32, 4096 ]
                 format: DMA_DRM
             drm-format: NV12:0x0100000000000009
      video/x-raw
                  width: [ 32, 4096 ]
                 height: [ 32, 4096 ]
                 format: NV12

Also I can probably answer some of things:

BTW, have you considered handling navigation events in the element?

You mean these events? Or you need something more?

I think it's a bit early for Vulkan ..

ABeltramo has been thinking of supporting Vulkan buffers, not only for encoding necessarily, but so gst-wayland-display could output Vulkan buffers which could then be imported to CUDA to hopefully allow less overhead within the pipeline. Would require new custom element "cudavkupload" or so.

<!-- gh-comment-id:3132933693 --> @DatCaptainHorse commented on GitHub (Jul 29, 2025): @anonymix007 hm, I have same modifiers, so it's weird that for me it just errors out without the workaround.. DG2 bug maybe? 🤔 ``` ❯ GST_GL_PLATFORM=egl gst-inspect-1.0 vah264lpenc Factory Details: Rank none (0) Long-name VA-API H.264 Low Power Encoder in Intel(R) Gen Graphics Klass Codec/Encoder/Video/Hardware Description VA-API based H.264 low power video encoder Author He Junyan <junyan.he@intel.com> Documentation https://gstreamer.freedesktop.org/documentation/va/vah264lpenc.html Plugin Details: Name va Description VA-API codecs plugin Filename /usr/lib/gstreamer-1.0/libgstva.so Version 1.26.4 License LGPL Source module gst-plugins-bad Documentation https://gstreamer.freedesktop.org/documentation/va/ Source release date 2025-07-16 Binary package Arch Linux GStreamer 1.26.4-1.1 Origin URL https://www.archlinux.org/ GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstVideoEncoder +----GstVaBaseEnc +----GstVaH264LPEnc Implemented Interfaces: GstPreset Element Flags: Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/x-raw(memory:VAMemory) width: [ 32, 4096 ] height: [ 32, 4096 ] format: NV12 video/x-raw(memory:DMABuf) width: [ 32, 4096 ] height: [ 32, 4096 ] format: DMA_DRM drm-format: NV12:0x0100000000000009 video/x-raw width: [ 32, 4096 ] height: [ 32, 4096 ] format: NV12 ``` Also I can probably answer some of things: > BTW, have you considered handling navigation events in the element? [You mean these events?](https://github.com/games-on-whales/gst-wayland-display/blob/stable/gst-plugin-wayland-display/src/waylandsrc/imp.rs#L68) Or you need something more? > I think it's a bit early for Vulkan .. ABeltramo has been thinking of supporting Vulkan buffers, not only for encoding necessarily, but so `gst-wayland-display` could output Vulkan buffers which could then be imported to CUDA to hopefully allow less overhead within the pipeline. Would require new custom element "cudavkupload" or so.
Author
Owner

@ABeltramo commented on GitHub (Jul 29, 2025):

There are some specific Navigation events in Gstreamer that are used by some plugins (most famously webrtc I guess?) to propagate mouse/keyboard events. I believe GstNavigation is the main interface. I haven't really looked into it but yeah, it would be nice to add support for that, anyone up for a PR? 😉

I think it's a bit early for Vulkan, but it would be really cool to get something not tied to a specific hw encoder API.

I know, right?
Yeah, as @DatCaptainHorse said I'm dealing with a few issues when having multiple OpenGL plugins in different pipelines in Wolf, so I would like to get rid of the intermediate glupload step that is required and instead import a Vulkan buffer in CUDA which seems to be possible from the light testing that I've done using cudaImportExternalMemory. Plus, the ability to potentially have support for a fully cross-platform Vulkan pipeline makes it worth the effort IMHO.
Definitely early days, but that has been the case for every single part of this project, I wouldn't be here if I didn't like a good challenge.. 😅

<!-- gh-comment-id:3133029797 --> @ABeltramo commented on GitHub (Jul 29, 2025): There are some specific [Navigation events](https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/events.html?gi-language=c#navigation) in Gstreamer that are used by some plugins (most famously `webrtc` I guess?) to propagate mouse/keyboard events. I believe [GstNavigation](https://gstreamer.freedesktop.org/documentation/video/gstnavigation.html?gi-language=c) is the main interface. I haven't really looked into it but yeah, it would be nice to add support for that, anyone up for a PR? 😉 > I think it's a bit early for Vulkan, but it would be really cool to get something not tied to a specific hw encoder API. I know, right? Yeah, as @DatCaptainHorse said I'm dealing with a few issues when having multiple OpenGL plugins in different pipelines in Wolf, so I would like to get rid of the intermediate `glupload` step that is required and instead import a Vulkan buffer in CUDA which seems to be possible from the light testing that I've done using [cudaImportExternalMemory](https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__EXTRES__INTEROP.html#group__CUDART__EXTRES__INTEROP_1g0012448b208196bc60c2307eaeaa3ff7). Plus, the ability to potentially have support for a fully cross-platform Vulkan pipeline makes it worth the effort IMHO. Definitely early days, but that has been the case for every single part of this project, I wouldn't be here if I didn't like a good challenge.. 😅
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gst-wayland-display#7
No description provided.