0

I am trying to run chromium as weston-client using ArchArm on a RPI 3+ b, but I am unable to make it use GL.

Setup:

  1. Basic »AArch64« installation as described here
  2. Package Installation:
    • wayland
    • weston
    • xorg-server-xwayland
    • chromium
  3. Tweaking the /boot/config.txt to:

.

#was already in
enable_uart=1

#those lines are those I have added
dtoverlay=vc4-kms-v3d
avoid_warnings=2
hdmi_drive=2

When launching:

weston --log=weston.log --no-config --xwayland --use-pixman

followed by opening a terminal on the desktop and running chromium there, te browser starts, but performance is very poor, since it does not use the GL hardware acceleration.

Running

weston --log=weston.log --no-config --xwayland

Starts a Desktop as well, but trying to chromium then, results in a frozen Desktop and only ctrl+alt+backspace can end that.

I guess that there is something wrong in the overall vc4/GL setup, but I would like to know how to find the error

lsmod

Module                  Size  Used by
rc_cec                 16384  0
btsdio                 20480  0
vc4                   192512  4
brcmfmac              303104  0
cec                    65536  1 vc4
brcmutil               16384  1 brcmfmac
rc_core                57344  3 rc_cec,cec
drm_kms_helper        200704  3 vc4
hci_uart              131072  0
drm                   503808  3 drm_kms_helper,vc4
joydev                 28672  0
btqca                  20480  1 hci_uart
cfg80211              729088  1 brcmfmac
btbcm                  16384  1 hci_uart
microchip              16384  1
btintel                32768  1 hci_uart
drm_panel_orientation_quirks    16384  1 drm
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
bluetooth             593920  6 btqca,btsdio,btintel,hci_uart,btbcm
sysimgblt              16384  1 drm_kms_helper
lan78xx                61440  0
fb_sys_fops            16384  1 drm_kms_helper
ecdh_generic           24576  1 bluetooth
raspberrypi_hwmon      16384  0
rfkill                 32768  3 bluetooth,cfg80211
i2c_bcm2835            20480  0
pwm_bcm2835            16384  0
bcm2835_thermal        16384  0
bcm2835_wdt            16384  0
hid_multitouch         28672  0

.

ls -la /dev/dri/

total 0
drwxr-xr-x   3 root root        100 Dec 20 01:38 .
drwxr-xr-x  18 root root       3200 Jan  2 12:38 ..
drwxr-xr-x   2 root root         80 Dec 20 01:38 by-path
crw-rw----+  1 root video  226,   0 Jan  2 12:38 card0
crw-rw-rw-   1 root render 226, 128 Dec 20 01:38 renderD128

.

#log without --use-pixman
cat weston.log

Date: 2019-01-02 UTC
[13:00:58.164] weston 5.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: unknown (not built from git or tarball)
[13:00:58.165] Command line: weston --log=weston.log --xwayland --no-config
[13:00:58.165] OS: Linux, 4.20.0-2-ARCH, #1 SMP Fri Dec 28 19:33:32 MST 2018, aarch64
[13:00:58.165] Starting with no config file.
[13:00:58.165] Output repaint window is 7 ms maximum.
[13:00:58.165] Loading module '/usr/lib/libweston-5/drm-backend.so'
[13:00:58.178] initializing drm backend
[13:00:58.190] logind: session control granted
[13:00:58.203] using /dev/dri/card0
[13:00:58.204] DRM: supports universal planes
[13:00:58.204] DRM: supports atomic modesetting
[13:00:58.204] DRM: supports picture aspect ratio
[13:00:58.207] Loading module '/usr/lib/libweston-5/gl-renderer.so'
[13:00:58.551] EGL client extensions: EGL_EXT_device_base
               EGL_EXT_device_enumeration EGL_EXT_device_query
               EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
               EGL_EXT_client_extensions EGL_KHR_debug
               EGL_EXT_platform_wayland EGL_EXT_platform_x11
               EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
[13:00:58.555] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected.
[13:00:58.555] EGL_KHR_surfaceless_context available
[13:00:58.569] EGL version: 1.4
[13:00:58.569] EGL vendor: Mesa Project
[13:00:58.569] EGL client APIs: OpenGL OpenGL_ES
[13:00:58.569] EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
               EGL_EXT_image_dma_buf_import
               EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2
               EGL_KHR_config_attribs 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 EGL_KHR_image_base EGL_KHR_image_pixmap
               EGL_KHR_no_config_context 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_image_dma_buf_export
               EGL_WL_bind_wayland_display
[13:00:58.569] GL version: OpenGL ES 2.0 Mesa 18.3.1
[13:00:58.569] GLSL version: OpenGL ES GLSL ES 1.0.16
[13:00:58.569] GL vendor: Broadcom
[13:00:58.569] GL renderer: VC4 V3D 2.1
[13:00:58.570] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_occlusion_query_boolean 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_stencil8
               GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float
               GL_OES_EGL_image GL_OES_depth_texture
               GL_AMD_performance_monitor GL_OES_packed_depth_stencil
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_EXT_frag_depth GL_NV_fbo_color_attachments
               GL_OES_EGL_image_external GL_OES_EGL_sync
               GL_OES_vertex_array_object 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_EXT_draw_buffers
               GL_EXT_map_buffer_range GL_KHR_debug
               GL_KHR_texture_compression_astc_ldr
               GL_OES_required_internalformat GL_OES_surfaceless_context
               GL_EXT_separate_shader_objects
               GL_EXT_compressed_ETC1_RGB8_sub_texture
               GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp
               GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex
               GL_OES_texture_border_clamp GL_KHR_no_error
               GL_KHR_texture_compression_astc_sliced_3d
               GL_MESA_tile_raster_order
[13:00:58.570] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[13:00:58.603] event3  - vc4: is tagged by udev as: Keyboard Mouse
[13:00:58.604] event3  - vc4: device is a pointer
[13:00:58.604] event3  - vc4: device is a keyboard
[13:00:58.619] event1  - CHICONY HP Basic USB Keyboard: is tagged by udev as: Keyboard
[13:00:58.619] event1  - CHICONY HP Basic USB Keyboard: device is a keyboard
[13:00:58.697] event2  - HP HP: is tagged by udev as: Mouse
[13:00:58.697] event2  - HP HP: device is a pointer
[13:00:58.776] event0  - eGalax Inc. eGalaxTouch EXC3188-0085-04.00.00: is tagged by udev as: Touchscreen
[13:00:58.776] event0  - eGalax Inc. eGalaxTouch EXC3188-0085-04.00.00: device is a touch device
[13:00:58.818] Touchscreen - eGalax Inc. eGalaxTouch EXC3188-0085-04.00.00 - /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/    0003:0EEF:C000.0001/input/input3/event0    
[13:00:58.818] input device event0 has     no enabled output associated (none named), skipping calibration for now.    
[13:00:58.844] DRM: head 'HDMI-A-1' fou    nd, connector 29 is connected, EDID make 'CND', model 'HDMI', serial '000000000000'    
[13:00:58.844] DRM: head 'Composite-1'     found, connector 44 is disconnected.    
[13:00:58.845] Registered plugin API 'w    eston_drm_output_api_v1' of size 24    
[13:00:58.845] Chosen EGL config detail    s:    
               RGBA bits: 8 8 8 0    
               swap interval rang    e: 1 - 1    
[13:00:58.847] No backlight contr    ol for output 'HDMI-A-1'    
[13:00:58.847] Output HDMI-A-1 (c    rtc 95) video modes:    
               [email protected], pr    eferred, current, 14    8.5 MHz    
               [email protected] 16:    9, 148.5 MHz    
               [email protected] 16:    9, 148.4 MHz    
               [email protected], 13    8.5 MHz    
               [email protected], 74    .2 MHz    
               [email protected] 16:    9, 74.    2 MHz    
               [email protected] 16:    9, 74.    2 MHz    
               [email protected] 16:    9, 148    .5 MH    z    
               [email protected] 16:    9, 74.    2 MHz    
               [email protected], 11    9.0 MH    z    
               [email protected], 10    8.0 MH    z    
               [email protected], 88.    8 MHz    
               [email protected], 108    .0 MH    z    
               [email protected], 85.    5 MHz    
               [email protected], 71.    0 MHz    
               [email protected], 74.    2 MHz    
               [email protected] 16:9    , 74.    2 MHz    
               [email protected] 16:9    , 74.    2 MHz    
               [email protected], 65.    0 MHz    
               [email protected] 16:9    , 54.    1 MHz    
               [email protected] 16:9    , 54.    0 MHz    
               [email protected], 40.0     MHz    
               [email protected], 36.0     MHz    
               [email protected] 4:3,     27.0     MHz    
               [email protected] 4:3,     27.0     MHz    
               [email protected] 16:9,     27.    0 MH    z    
               [email protected], 27.0     MHz    
               [email protected] 16:9,     27.    0 MHz    
               [email protected] 4:3,     27.0     MHz    
               [email protected] 4:3,     25.2     MHz    
               [email protected], 25.2     MHz    
               [email protected] 4:3,     25.2     MHz    
               [email protected], 28.3     MHz    
[13:00:58.848] associating input     devi    ce event3 with output HDMI-A-1 (none by udev)    
[13:00:58.848] associating input     devi    ce event1 with output HDMI-A-1 (none by udev)    
[13:00:58.848] associating input     devi    ce event2 with output HDMI-A-1 (none by udev)    
[13:00:58.848] associating input     devi    ce event0 with output HDMI-A-1 (none by udev)    
[13:00:58.849] Output 'HDMI-A-1'     enab    led with head(s) HDMI-A-1    
[13:00:58.849] Compositor capabil    itie    s:    
               arbitrary surface     rota    ti    on: yes    
               screen capture use    s y-    fl    ip: yes    
               presentation clock    : CL    OC    K_MONOT    ONIC, id 1    
               presentation clock     res    ol    ution:     0.000000001 s    
[13:00:58.850] Loading module '/u    sr/l    ib    /weston    /desktop-shel    l.so'    
[13:00:58.852] launching '/usr/li    b/we    st    on/west    on-keyboard'    
[13:00:58.856] Loading module '/u    sr/l    ib    /libwes    ton-5/xwayla    nd.so'    
[13:00:58.900] Registered plugin     API     'w    eston_x    wayland_v1'     of size 32    
[13:00:58.900] Registered plugin     API     'w    eston_x    wayland_surf    ace_v1' of     size 16    
[13:00:58.901] xserver listening     on d    is    play :0    
[13:00:58.901] launching '/usr/li    b/we    st    on/west    on-desktop-shell'    
[13:01:10.221] Spawned Xwayland s    erve    r,     pid 10    24    
[13:01:11.447] xfixes version: 5.    0    
[13:01:11.512] created wm, root 9    2    4    
[13:01:16.993] xserver exited, co    d    e 134    
[13:02:26.297] output for input d    e    vice     event3 removed    
[13:02:26.298] output for input d    e    vice     event1 removed    
[13:02:26.298] output for input d    e    vice     event2 removed    
[13:02:26.298] output for input d    e    vice     event0 removed    
[13:02:26.315] event3  - vc4: dev    i    ce re    moved    
[13:02:26.315] event1  - CHICONY     H    P Bas    ic US    B Keyboard: device removed    
[13:02:26.316] event2  - HP HP: d    e    vice     remov    ed    
[13:02:26.317] event0  - eGalax I    n    c. eG    alaxT    ou    ch EXC3188-0085-04.00.00: device removed

Running glxinfo | grep render within a weston session yields:

direct rendering: Yes
  GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
  GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: VC4 V3D 2.1
  GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,

But the OpenGL renderer string should be »Gallium 0.4 on VC4« if I am not mistaken?

3
  • No, that renderer string is correct. If things are slow, I would recommend getting out your whole-system profiler (sysprof) and seeing what's going on. A bit of info is at: github.com/anholt/mesa/wiki/VC4-Performance-Debugging but at a guess, your wayland clients are using shm buffers instead of dmabufs -- a common failure mode of wayland implementations. Commented Jan 8, 2019 at 20:10
  • Thanks a lot for that hint, I am gonna check that out. If you follow this thread raspberrypi.org/forums/viewtopic.php?t=230427 you can see that I could make it work by downgrading mesa on a arch arm7h install. But is it possible to set this up on Aarch64, as well, or are the failures based on the programs used, so not fixable right now?
    – philipp
    Commented Jan 9, 2019 at 7:35
  • There should be no different between aarch64 and armhf as far as the driver is concerned. Commented Jan 9, 2019 at 22:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.