Closed GavinDarkglider closed 2 years ago
Yes, Weston's DRM backend and EGL renderer does work out of the box with L4T for the Tegra platforms that we have set up in meta-tegra. Here's what libdrm looks like for us:
lrwxrwxrwx 1 root root 11 Feb 16 03:22 /usr/lib/libdrm.so -> libdrm.so.2
lrwxrwxrwx 1 root root 14 Mar 9 2018 /usr/lib/libdrm.so.2 -> libdrm_nvdc.so
-rwxr-xr-x 1 root root 83960 Mar 9 2018 /usr/lib/libdrm.so.2.4.0
What does this look like for you?
Yes, Weston's DRM backend and EGL renderer does work out of the box with L4T for the Tegra platforms that we have set up in meta-tegra. Here's what libdrm looks like for us:
lrwxrwxrwx 1 root root 11 Feb 16 03:22 /usr/lib/libdrm.so -> libdrm.so.2 lrwxrwxrwx 1 root root 14 Mar 9 2018 /usr/lib/libdrm.so.2 -> libdrm_nvdc.so -rwxr-xr-x 1 root root 83960 Mar 9 2018 /usr/lib/libdrm.so.2.4.0
What does this look like for you?
lrwxrwxrwx 1 root root 11 Apr 20 19:17 libdrm.so -> libdrm.so.2 lrwxrwxrwx 1 root root 35 Apr 20 19:42 libdrm.so.2 -> aarch64-linux-gnu/tegra/libdrm.so.2 -rwxr-xr-x 1 root root 134056 Apr 20 19:17 libdrm.so.2.4.0 lrwxrwxrwx 1 root root 19 Apr 20 19:17 libdrm_nouveau.so -> libdrm_nouveau.so.2 lrwxrwxrwx 1 root root 23 Apr 20 19:17 libdrm_nouveau.so.2 -> libdrm_nouveau.so.2.0.0 -rwxr-xr-x 1 root root 67968 Apr 20 19:17 libdrm_nouveau.so.2.0.0 lrwxrwxrwx 1 root root 11 Apr 20 19:42 libdrm_nvdc.so -> libdrm.so.2
Ignore the nouveau stuff, I had to set a mesa driver, to get lakka to build it, and was to lazy to write a workaround for that.
Bsp lib setup for that is handled here: https://github.com/GavinDarkglider/Lakka-LibreELEC/blob/lakka-le-master-wayland/projects/L4T/packages/tegra-bsp/package.mk#L362
Also, I need to add back the eglstream patches, and what not again, I removed them for testing, but it didnt work either way.
I guess I should also mention libDRM stuff works for vulkan, and X.....
The two eglstream patches for weston in meta-tegra master are needed for client support, but not for the backend -- you can start weston without them and get a desktop.
Your library setup looks equivalent, we've got libdrm_nvdc.so symlinked to the tegra/libdrm.so.2.
To be clear, are you building the system libdrm with -Wl,-Bsymbolic-functions
?
The two eglstream patches for weston in meta-tegra master are needed for client support, but not for the backend -- you can start weston without them and get a desktop.
Your library setup looks equivalent, we've got libdrm_nvdc.so symlinked to the tegra/libdrm.so.2.
To be clear, are you building the system libdrm with
-Wl,-Bsymbolic-functions
?
I wasnt, I missed that, and meson makes it a pain to do, since you cant just LDFLAGS=.... like the rest of the builders. lol. That is fixed now, and I have gotten a bit further, now it stops and hangs here: weston-log.txt Which from what I can tell from a log someone posted of it working, is right before the screen configuration should be detected and set.
I think I am going to see if swapping bsp versions makes a difference.
Yes, that's right. Here's what tegra looks like:
root@jetson-agx-xavier-devkit:~# weston --tty 1
Date: 2022-03-15 UTC
[16:01:35.251] weston 10.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 10.0.0
[16:01:35.251] Command line: weston --tty 1
[16:01:35.251] OS: Linux, 5.10.65-l4t-r34.1+g4fc0249f4dd4, #1 SMP PREEMPT Sat Apr 9 12:01:30 UTC 2022, aarch64
[16:01:35.251] Flight recorder: enabled
[16:01:35.251] Using config file '/etc/xdg/weston/weston.ini'
[16:01:35.253] Output repaint window is 7 ms maximum.
[16:01:35.253] Loading module '/usr/lib/libweston-10/drm-backend.so'
[16:01:35.262] initializing drm backend
[16:01:35.262] Trying logind launcher...
[16:01:35.263] logind: failed to get session seat
[16:01:35.263] logind: cannot setup systemd-logind helper error: (No data available), using legacy fallback
[16:01:35.263] Trying weston_launch launcher...
[16:01:35.263] could not get launcher fd from env
[16:01:35.263] Trying direct launcher...
[16:01:35.291] using /dev/dri/card0
[16:01:35.291] DRM: supports atomic modesetting
[16:01:35.291] DRM: supports GBM modifiers
[16:01:35.291] DRM: does not support picture aspect ratio
[16:01:35.291] Loading module '/usr/lib/libweston-10/gl-renderer.so'
[16:01:35.306] EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base
EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions
EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11
EGL_EXT_platform_device EGL_KHR_platform_gbm
EGL_MESA_platform_gbm EGL_KHR_platform_wayland
EGL_EXT_platform_wayland
[16:01:35.331] EGL version: 1.5
[16:01:35.331] EGL vendor: NVIDIA
[16:01:35.331] EGL client APIs: OpenGL_ES OpenGL
[16:01:35.331] EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
EGL_EXT_client_sync EGL_EXT_create_context_robustness
EGL_EXT_image_dma_buf_import
EGL_EXT_image_dma_buf_import_modifiers
EGL_MESA_image_dma_buf_export EGL_EXT_output_base
EGL_EXT_output_drm EGL_EXT_protected_content
EGL_EXT_stream_consumer_egloutput EGL_EXT_stream_acquire_mode
EGL_EXT_sync_reuse EGL_IMG_context_priority
EGL_KHR_config_attribs EGL_KHR_create_context_no_error
EGL_KHR_context_flush_control EGL_KHR_create_context
EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses
EGL_KHR_partial_update EGL_KHR_swap_buffers_with_damage
EGL_KHR_no_config_context 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 EGL_KHR_image_base EGL_KHR_reusable_sync
EGL_KHR_stream EGL_KHR_stream_attrib
EGL_KHR_stream_consumer_gltexture
EGL_KHR_stream_cross_process_fd EGL_KHR_stream_fifo
EGL_KHR_stream_producer_eglsurface EGL_KHR_surfaceless_context
EGL_KHR_wait_sync EGL_NV_context_priority_realtime
EGL_NV_cuda_event EGL_NV_nvrm_fence_sync
EGL_NV_quadruple_buffer EGL_NV_stream_consumer_eglimage
EGL_NV_stream_cross_display EGL_NV_stream_cross_object
EGL_NV_stream_cross_process EGL_NV_stream_cross_system
EGL_NV_stream_dma EGL_NV_stream_flush EGL_NV_stream_metadata
EGL_NV_stream_remote EGL_NV_stream_reset EGL_NV_stream_socket
EGL_NV_stream_socket_inet EGL_NV_stream_socket_unix
EGL_NV_stream_sync EGL_NV_stream_fifo_next
EGL_NV_stream_fifo_synchronous
EGL_NV_stream_consumer_gltexture_yuv EGL_NV_stream_attrib
EGL_NV_stream_origin EGL_NV_system_time
EGL_NV_output_drm_flip_event EGL_NV_triple_buffer
EGL_NV_robustness_video_memory_purge
EGL_WL_bind_wayland_display EGL_WL_wayland_eglstream
[16:01:35.334] EGL_KHR_surfaceless_context available
[16:01:35.555] GL version: OpenGL ES 3.2 NVIDIA 34.1.0
[16:01:35.555] GLSL version: OpenGL ES GLSL ES 3.20
[16:01:35.555] GL vendor: NVIDIA Corporation
[16:01:35.555] GL renderer: NVIDIA Tegra Xavier (nvgpu)/integrated
[16:01:35.555] GL extensions: GL_EXT_base_instance GL_EXT_blend_func_extended
GL_EXT_blend_minmax GL_EXT_buffer_storage GL_EXT_clear_texture
GL_EXT_clip_control GL_EXT_clip_cull_distance
GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float
GL_EXT_conservative_depth GL_EXT_copy_image GL_EXT_depth_clamp
GL_EXT_debug_label GL_EXT_discard_framebuffer
GL_EXT_disjoint_timer_query GL_EXT_draw_buffers_indexed
GL_EXT_draw_elements_base_vertex GL_EXT_EGL_image_array
GL_EXT_EGL_image_storage GL_EXT_EGL_image_external_wrap_modes
GL_EXT_float_blend GL_EXT_frag_depth GL_EXT_geometry_point_size
GL_EXT_geometry_shader GL_EXT_gpu_shader5
GL_EXT_map_buffer_range GL_EXT_multi_draw_indirect
GL_EXT_multisample_compatibility
GL_EXT_multisampled_render_to_texture
GL_EXT_multisampled_render_to_texture2
GL_EXT_multiview_texture_multisample
GL_EXT_multiview_timer_query GL_EXT_occlusion_query_boolean
GL_EXT_polygon_offset_clamp GL_EXT_post_depth_coverage
GL_EXT_primitive_bounding_box GL_EXT_protected_textures
GL_EXT_raster_multisample GL_EXT_render_snorm GL_EXT_robustness
GL_EXT_separate_shader_objects GL_EXT_shader_group_vote
GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix
GL_EXT_shader_io_blocks
GL_EXT_shader_non_constant_global_initializers
GL_EXT_shader_texture_lod GL_EXT_shadow_samplers
GL_EXT_sparse_texture GL_EXT_sparse_texture2 GL_EXT_sRGB
GL_EXT_sRGB_write_control GL_EXT_tessellation_point_size
GL_EXT_tessellation_shader GL_EXT_texture_border_clamp
GL_EXT_texture_buffer GL_EXT_texture_compression_bptc
GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc
GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map_array
GL_EXT_texture_filter_anisotropic GL_EXT_texture_filter_minmax
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_mirror_clamp_to_edge GL_EXT_texture_norm16
GL_EXT_texture_query_lod GL_EXT_texture_rg
GL_EXT_texture_shadow_lod GL_EXT_texture_sRGB_R8
GL_EXT_texture_sRGB_decode GL_EXT_texture_storage
GL_EXT_texture_view GL_EXT_draw_transform_feedback
GL_EXT_unpack_subimage GL_EXT_window_rectangles
GL_KHR_context_flush_control GL_KHR_debug GL_EXT_memory_object
GL_EXT_memory_object_fd GL_NV_memory_object_sparse
GL_KHR_parallel_shader_compile GL_KHR_no_error
GL_KHR_robust_buffer_access_behavior GL_KHR_robustness
GL_EXT_semaphore GL_EXT_semaphore_fd GL_KHR_shader_subgroup
GL_KHR_texture_compression_astc_ldr
GL_KHR_texture_compression_astc_sliced_3d GL_NV_bgr
GL_NV_bindless_texture GL_NV_blend_equation_advanced
GL_NV_blend_equation_advanced_coherent
GL_NVX_blend_equation_advanced_multi_draw_buffers
GL_NV_blend_minmax_factor GL_NV_clip_space_w_scaling
GL_NV_conditional_render GL_NV_conservative_raster
GL_NV_conservative_raster_pre_snap_triangles GL_NV_copy_buffer
GL_NV_copy_image GL_NV_draw_buffers GL_NV_draw_instanced
GL_NV_draw_texture GL_NV_draw_vulkan_image
GL_NV_EGL_stream_consumer_external
GL_NV_explicit_attrib_location GL_NV_fbo_color_attachments
GL_NV_fill_rectangle GL_NV_fragment_coverage_to_color
GL_NV_fragment_shader_interlock GL_NV_framebuffer_blit
GL_NV_framebuffer_mixed_samples GL_NV_framebuffer_multisample
GL_NV_generate_mipmap_sRGB GL_NV_geometry_shader_passthrough
GL_NV_instanced_arrays GL_NV_internalformat_sample_query
GL_NV_gpu_shader5 GL_NV_image_formats GL_NV_memory_attachment
GL_NV_occlusion_query_samples GL_NV_non_square_matrices
GL_NV_pack_subimage GL_NV_packed_float
GL_NV_packed_float_linear GL_NV_path_rendering
GL_NV_path_rendering_shared_edge GL_NV_pixel_buffer_object
GL_NV_polygon_mode GL_NV_read_buffer GL_NV_read_depth
GL_NV_read_depth_stencil GL_NV_read_stencil
GL_NV_sample_locations GL_NV_sample_mask_override_coverage
GL_NV_shader_atomic_fp16_vector
GL_NV_shader_noperspective_interpolation
GL_NV_shader_subgroup_partitioned GL_NV_shadow_samplers_array
GL_NV_shadow_samplers_cube GL_NV_sRGB_formats
GL_NV_stereo_view_rendering GL_NV_texture_array
GL_NV_texture_barrier GL_NV_texture_border_clamp
GL_NV_texture_compression_latc GL_NV_texture_compression_s3tc
GL_NV_texture_compression_s3tc_update
GL_NV_texture_dirty_tile_map GL_NV_timer_query
GL_NV_viewport_array GL_NV_viewport_array2
GL_NV_viewport_swizzle GL_KHR_blend_equation_advanced
GL_KHR_blend_equation_advanced_coherent
GL_OES_compressed_ETC1_RGB8_texture
GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_depth24
GL_OES_depth32 GL_OES_depth_texture
GL_OES_depth_texture_cube_map GL_OES_copy_image
GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex
GL_OES_texture_border_clamp GL_OES_tessellation_point_size
GL_OES_tessellation_shader GL_OES_texture_buffer
GL_OES_geometry_point_size GL_OES_geometry_shader
GL_OES_gpu_shader5 GL_OES_shader_io_blocks GL_OES_texture_view
GL_OES_primitive_bounding_box GL_OES_EGL_image
GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3
GL_OES_EGL_sync GL_OES_element_index_uint
GL_OES_fbo_render_mipmap GL_OES_get_program_binary
GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8
GL_EXT_read_format_bgra GL_OES_sample_shading
GL_OES_sample_variables GL_OES_shader_image_atomic
GL_OES_shader_multisample_interpolation
GL_OES_standard_derivatives GL_OES_surfaceless_context
GL_OES_texture_cube_map_array GL_OES_texture_npot
GL_OES_texture_float GL_OES_texture_float_linear
GL_OES_texture_half_float GL_OES_texture_half_float_linear
GL_OES_texture_stencil8
GL_OES_texture_storage_multisample_2d_array
GL_OES_vertex_array_object GL_OES_vertex_half_float
GL_OES_viewport_array GL_OVR_multiview GL_OVR_multiview2
GL_OVR_multiview_multisampled_render_to_texture
GL_ANDROID_extension_pack_es31a
[16:01:35.720] GL ES 3.2 - renderer features:
read-back format: BGRA
EGL Wayland extension: yes
[16:01:35.755] event8 - NVIDIA Jetson AGX Xavier HDA HDMI/DP,pcm=9: is tagged by udev as: Switch
[16:01:36.244] event8 - not using input device '/dev/input/event8'
[16:01:36.247] event5 - NVIDIA Jetson AGX Xavier HDA HDMI/DP,pcm=3: is tagged by udev as: Switch
[16:01:36.276] event5 - not using input device '/dev/input/event5'
[16:01:36.278] event6 - NVIDIA Jetson AGX Xavier HDA HDMI/DP,pcm=7: is tagged by udev as: Switch
[16:01:36.308] event6 - not using input device '/dev/input/event6'
[16:01:36.312] event7 - NVIDIA Jetson AGX Xavier HDA HDMI/DP,pcm=8: is tagged by udev as: Switch
[16:01:36.348] event7 - not using input device '/dev/input/event7'
[16:01:36.355] event0 - Logitech USB Receiver: is tagged by udev as: Keyboard
[16:01:36.356] event0 - Logitech USB Receiver: device is a keyboard
[16:01:36.362] event1 - Logitech USB Receiver Mouse: is tagged by udev as: Mouse
[16:01:36.363] event1 - Logitech USB Receiver Mouse: device is a pointer
[16:01:36.371] event2 - Logitech USB Receiver Consumer Control: is tagged by udev as: Keyboard
[16:01:36.372] event2 - Logitech USB Receiver Consumer Control: device is a keyboard
[16:01:36.378] event3 - Logitech USB Receiver System Control: is tagged by udev as: Keyboard
[16:01:36.378] event3 - Logitech USB Receiver System Control: device is a keyboard
[16:01:36.381] event4 - gpio-keys: is tagged by udev as: Keyboard
[16:01:36.382] event4 - gpio-keys: device is a keyboard
[16:01:36.404] libinput: configuring device "Logitech USB Receiver".
[16:01:36.404] libinput: configuring device "Logitech USB Receiver Mouse".
[16:01:36.404] libinput: configuring device "Logitech USB Receiver Consumer Control".
[16:01:36.404] libinput: configuring device "Logitech USB Receiver System Control".
[16:01:36.405] libinput: configuring device "gpio-keys".
[16:01:36.405] DRM: head 'HDMI-A-1' updated, connector 1000 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[16:01:36.405] DRM: head 'HDMI-A-1' found, connector 1000 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[16:01:36.405] DRM: head 'DP-1' updated, connector 1001 is disconnected.
[16:01:36.405] DRM: head 'DP-1' found, connector 1001 is disconnected.
[16:01:36.405] DRM: head 'DP-2' updated, connector 1002 is disconnected.
[16:01:36.405] DRM: head 'DP-2' found, connector 1002 is disconnected.
[16:01:36.405] Registered plugin API 'weston_drm_output_api_v1' of size 24
[16:01:36.406] Color manager: no-op
[16:01:36.406] Output 'HDMI-A-1' using color profile: built-in default sRGB SDR profile
[16:01:36.406] Chosen EGL config details: id: 20 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 0-0 type: win|pbf vis_id: XRGB8888 (0x343)
[16:01:36.406] Output HDMI-A-1 (crtc 1000) video modes:
3840x2160@60.0, preferred, current, 594.2 MHz
640x480@59.9, 25.2 MHz
3840x2160@60.0, 533.3 MHz
3840x2160@50.0, 594.2 MHz
3840x2160@30.0, 297.0 MHz
3840x2160@25.0, 297.0 MHz
3840x2160@24.0, 297.0 MHz
1920x1080@60.0, 148.5 MHz
1920x1080@50.0, 148.5 MHz
1920x1080@24.0, 74.2 MHz
1920x1080@25.0, 74.2 MHz
1920x1080@30.0, 74.2 MHz
1920x1080@59.9, 148.4 MHz
3840x2160@60.0, 594.2 MHz
[16:01:36.407] associating input device event0 with output HDMI-A-1 (none by udev)
[16:01:36.407] associating input device event1 with output HDMI-A-1 (none by udev)
[16:01:36.407] associating input device event2 with output HDMI-A-1 (none by udev)
[16:01:36.407] associating input device event3 with output HDMI-A-1 (none by udev)
[16:01:36.407] associating input device event4 with output HDMI-A-1 (none by udev)
[16:01:36.407] Output 'HDMI-A-1' enabled with head(s) HDMI-A-1
[16:01:36.407] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
cursor planes: yes
arbitrary resolutions: no
view mask clipping: yes
explicit sync: yes
color operations: yes
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[16:01:36.407] Loading module '/usr/lib/weston/desktop-shell.so'
[16:01:36.408] launching '/usr/libexec/weston-keyboard'
[16:01:36.410] Warning: support for deprecated wl_shell interface is enabled. Please migrate legacy clients to xdg-shell.
[16:01:36.411] launching '/usr/libexec/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
^C[16:03:19.651] caught signal 2
[16:03:19.678] output for input device event0 removed
[16:03:19.678] output for input device event1 removed
[16:03:19.678] output for input device event2 removed
[16:03:19.679] output for input device event3 removed
[16:03:19.679] output for input device event4 removed
[16:03:19.709] event0 - Logitech USB Receiver: device removed
[16:03:19.732] event1 - Logitech USB Receiver Mouse: device removed
[16:03:19.764] event2 - Logitech USB Receiver Consumer Control: device removed
[16:03:19.788] event3 - Logitech USB Receiver System Control: device removed
[16:03:19.812] event4 - gpio-keys: device removed
[108412.023630] tegradc 15200000.display: blank - powerdown
[108412.066415] extcon-disp-state external-connection:disp-state: cable 48 state 0
[108412.066422] Extcon AUX2(HDMI) disable
[108412.089492] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd
[108412.090375] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd
[108412.090441] tegradc 15200000.display: unblank
[108412.091692] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd
[108412.091876] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd
[108412.100700] tegradc 15200000.display: hdmi: tmds rate:594000K prod-setting:prod_c_hdmi_300m_600m
[108412.102575] tegradc 15200000.display: hdmi: get YCC quant from EDID.
[108412.106445] extcon-disp-state external-connection:disp-state: cable 48 state 1
[108412.106449] Extcon AUX2(HDMI) enable
[108412.119499] tegradc 15200000.display: sync windows ret = 247
Ok, so it turns out something in the build, probably glvnd itself doesnt like the 32.3.1 egl libs. lol. that is what caused the first freezing issue. lol. Also, picking through the kernel patches and what not for oe4t, do I need the KVM patches for this to work properly?
Also, picking through the kernel patches and what not for oe4t, do I need the KVM patches for this to work properly?
You shouldn't need those patches for this. They're only there to improve KVM virtualization support.
46 lowlevellock.c: No such file or directory.
#0 __lll_lock_wait (futex=futex@entry=0x7f83ebe340, private=0) at lowlevellock.c:46
#1 0x0000007f846aa868 in __GI___pthread_mutex_lock (mutex=0x7f83ebe340) at pthread_mutex_lock.c:78
#2 0x0000007f84942c60 in pthread_mutex_lock (mutex=<optimized out>) at forward.c:192
#3 0x0000007f83e95a58 in drmRandomCreate () from /usr/lib/libdrm.so.2
#4 0x0000007f8398ec7c in HashHash (key=key@entry=4000) at ../xf86drmHash.c:90
#5 0x0000007f8398ed1c in HashFind (table=0x44ac50, key=4000, h=h@entry=0x0) at ../xf86drmHash.c:142
#6 0x0000007f8398ee9c in drmHashLookup (t=<optimized out>, key=<optimized out>, value=0x7fcbdb69e8) at ../xf86drmHash.c:174
#7 0x0000007f83e94ad8 in drmHashLookup () from /usr/lib/libdrm.so.2
#8 0x0000007f80e6aef8 in ?? () from /usr/lib/libnvgbm.so
#9 0x0000007f80e6af28 in ?? () from /usr/lib/libnvgbm.so
#10 0x0000007f80e67f40 in ?? () from /usr/lib/libnvgbm.so
#11 0x0000007f80e68f48 in gbm_bo_create () from /usr/lib/libnvgbm.so
#12 0x0000007f80e80fdc in gbm_tudrm_bo_create (gbm=0x44bf20, width=256, height=256, format=875713089, usage=10, _modifiers=0x0, count=0) at ../tegra_udrm_gbm.c:278
#13 0x0000007f83e6e9fc in gbm_bo_create (gbm=<optimized out>, width=<optimized out>, height=<optimized out>, format=<optimized out>, flags=flags@entry=10)
at ../src/gbm/main/gbm.c:493
#14 0x0000007f83ed4fd8 in drm_output_init_cursor_egl (output=output@entry=0x5bb9d0, b=b@entry=0x4406c0) at ../libweston/backend-drm/drm-gbm.c:157
#15 0x0000007f83ed5164 in drm_output_init_egl (output=output@entry=0x5bb9d0, b=b@entry=0x4406c0) at ../libweston/backend-drm/drm-gbm.c:255
#16 0x0000007f83ecd60c in drm_output_enable (base=0x5bb9d0) at ../libweston/backend-drm/drm.c:1810
#17 0x0000007f848245d0 in weston_output_enable (output=output@entry=0x5bb9d0) at ../libweston/compositor.c:6780
#18 0x0000007f849d84f4 in drm_try_enable (output=output@entry=0x5bb9d0, undo=undo@entry=0x5961f8, failed=failed@entry=0x7fcbdb6c78) at ../compositor/main.c:2145
#19 0x0000007f849da510 in drm_try_attach_enable (output=0x5bb9d0, lo=lo@entry=0x5961c0) at ../compositor/main.c:2179
#20 0x0000007f849da6f4 in drm_process_layoutput (wet=wet@entry=0x7fcbdb7168, lo=lo@entry=0x5961c0) at ../compositor/main.c:2248
#21 0x0000007f849da7d4 in drm_process_layoutputs (wet=wet@entry=0x7fcbdb7168) at ../compositor/main.c:2267
#22 0x0000007f849da8c8 in drm_heads_changed (listener=<optimized out>, arg=0x424e40) at ../compositor/main.c:2329
#23 0x0000007f8481acb0 in wl_signal_emit (data=0x424e40, signal=0x425240)
at /home/gavin/lakka-le-master/Lakka-LibreELEC/build.Lakka-Switch.aarch64-LE-master-devel/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/wayland-server-core.h:481
#24 weston_compositor_call_heads_changed (data=data@entry=0x424e40) at ../libweston/compositor.c:5321
#25 0x0000007f84824840 in weston_compositor_flush_heads_changed (compositor=0x424e40) at ../libweston/compositor.c:6864
#26 0x0000007f849dba4c in wet_main (argc=<optimized out>, argv=0x7fcbdb73d8, test_data=test_data@entry=0x0) at ../compositor/main.c:3479
#27 0x00000000004006ec in main (argc=<optimized out>, argv=<optimized out>) at ../compositor/executable.c:33
A debugging session is active.
Backtrace of current issue, freezes at the point it should print available resolutions to log, but instead it waits on a locked thread. :( I have no idea what could be causing that issue. but it appears to be in the nvidia drm lib.
Looks like the same issue with symbol resolution that should have been solved with -Wl,-Bsymbolic-functions
, so I'm not sure why that's not working here.. My system libdrm doesn't try to call back into the tegra one, but hits its own copy of drmRandomCreate
:
Thread 1 "weston" hit Breakpoint 2, drmRandomCreate (seed=37) at ../libdrm-2.4.110/xf86drmRandom.c:87
87 ../libdrm-2.4.110/xf86drmRandom.c: No such file or directory.
(gdb) bt
#0 drmRandomCreate (seed=37) at ../libdrm-2.4.110/xf86drmRandom.c:87
#1 0x0000fffff6d5bbc4 in HashHash (key=4000) at ../libdrm-2.4.110/xf86drmHash.c:90
#2 HashFind (table=0xaaaaaaae5f30, key=4000, h=h@entry=0x0) at ../libdrm-2.4.110/xf86drmHash.c:142
#3 0x0000fffff6d5bd30 in drmHashLookup (t=<optimized out>, key=<optimized out>, value=0xffffffffee88)
at ../libdrm-2.4.110/xf86drmHash.c:174
#4 0x0000fffff74d9868 in drmHashLookup () from /usr/lib/libweston-10/../libdrm.so.2
#5 0x0000fffff326543c in ?? () from /usr/lib/libnvgbm.so
#6 0x0000fffff3265464 in ?? () from /usr/lib/libnvgbm.so
#7 0x0000fffff3262478 in ?? () from /usr/lib/libnvgbm.so
#8 0x0000fffff3263498 in gbm_bo_create () from /usr/lib/libnvgbm.so
#9 0x0000fffff3290ff8 in ?? () from /usr/lib/gbm/tegra-udrm_gbm.so
#10 0x0000fffff75253dc in ?? () from /usr/lib/libweston-10/drm-backend.so
#11 0x0000fffff751cc44 in ?? () from /usr/lib/libweston-10/drm-backend.so
#12 0x0000fffff7d9d84c in weston_output_enable () from /usr/lib/libweston-10.so.0
#13 0x0000fffff7f99c48 in ?? () from /usr/lib/weston/libexec_weston.so.0
#14 0x0000fffff7d95964 in ?? () from /usr/lib/libweston-10.so.0
#15 0x0000fffff7f9b8c8 in wet_main () from /usr/lib/weston/libexec_weston.so.0
#16 0x0000fffff7e0b230 in __libc_start_call_main (main=main@entry=0xaaaaaaaa0740, argc=argc@entry=3, argv=argv@entry=0xfffffffffbd8)
at ../sysdeps/nptl/libc_start_call_main.h:58
#17 0x0000fffff7e0b30c in __libc_start_main_impl (main=0xaaaaaaaa0740, argc=3, argv=0xfffffffffbd8, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:392
#18 0x0000aaaaaaaa07b0 in ?? ()
Hmm.... Maybe the way I am appending the flags just doesnt work..... though they do end up in the cross compile meson stuff, before it is configured, so..... Maybe I should just hack the meson build shit.....God, I hate meson build system, anything is better than meson for on the fly configuration stuff.
Ok, so it appears my ldflag changes werent being applies, hacked it into the meson.build file, and now it gets past that issue, and starts dumping repeatedly to the log, but it is progress, and I will take that. Probably need to bump bsp version, and it might work..... will rebuild and get back to you.
[00:34:54.427] failed to get drm_fb for bo
[00:34:54.428] failed to create kms fb: Operation not permitted
Ok, so it appears my ldflag changes werent being applies, hacked it into the meson.build file, and now it gets past that issue, and starts dumping repeatedly to the log, but it is progress, and I will take that. Probably need to bump bsp version, and it might work..... will rebuild and get back to you.
[00:34:54.427] failed to get drm_fb for bo [00:34:54.428] failed to create kms fb: Operation not permitted
Ok, So this doesnt seem to work on bsp's lower than 32.7.1.... then again I didnt try 32.6.x the above message was with 32.5
Thanks for the help.
So, I am trying to implement Wayland for L4T Lakka(Currently only supports Nintendo Switch), over X to fix an annoying frame pacing bug with rotation.
So, the question is, does the DRM weston renderer work? This is all I get when I try to launch weston.
I ported all of the patches, and edited/added nvidia libs, so I dont think that is the issue.
Was thinking that maybe my issue is related to this: https://github.com/kekiefer/meta-tegra/commit/21725f4b75da5760d6d5b3ff8ee978d2499441a6
Weston Log:
Weston strace output: message (2).txt
Generic GDB backtrace when stopped:
Current Wayland changes branch to Lakka tree: https://github.com/GavinDarkglider/Lakka-LibreELEC/tree/lakka-le-master-wayland
I dont have any actual L4T dev boards, so while the framework is there for that, in therory(BSP, and what not should work for all board types, kernel needs merging patches between release versions for non switch boards, and bootloader is non-existant). Maybe one day I will get some jetsons, and add support for them as well.