Bug 106257

Summary: Weston finds old Mesa
Product: Wayland Reporter: Dilian <dpa-bugs>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Dilian 2018-04-26 15:40:27 UTC
with weston 4.0.0/wayland-protocols 1.13.0/wayland 1.15.0 running weston prints the text below.

I have now Mesa 17.3, but in the past I have compiled Mesa 17.2, probably with different options.

Where does these lines come from:
[17:31:19.779] EGL version: 1.4 (DRI2)
[17:31:19.779] GL version: OpenGL ES 3.1 Mesa 17.2.8

I mean how can I use instead DRI3 and Mesa 17.3?

Date: 2018-04-26 CEST
[17:31:19.757] weston 4.0.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=4.0.0
               Build: unknown (not built from git or tarball)
[17:31:19.757] Command line: weston
[17:31:19.757] OS: Linux, 4.15.15, #1 SMP Fri Apr 6 21:58:46 CEST 2018, x86_64
[17:31:19.757] Using config file '/home/d/.config/weston.ini'
[17:31:19.757] Output repaint window is 7 ms maximum.
[17:31:19.758] Loading module '/usr/local/lib/libweston-4/drm-backend.so'
[17:31:19.760] initializing drm backend
[17:31:19.763] logind: session control granted
[17:31:19.765] using /dev/dri/card0
[17:31:19.765] DRM: supports universal planes
[17:31:19.765] DRM: supports atomic modesetting
[17:31:19.765] Loading module '/usr/local/lib/libweston-4/gl-renderer.so'
[17:31:19.778] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
               EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11
               EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
[17:31:19.778] warning: neither EGL_EXT_swap_buffers_with_damage or EGL_KHR_swap_buffers_with_damage is supported. Performance could be affected.
[17:31:19.778] EGL_KHR_surfaceless_context available
[17:31:19.779] EGL version: 1.4 (DRI2)
[17:31:19.779] EGL vendor: Mesa Project
[17:31:19.779] EGL client APIs: OpenGL OpenGL_ES 
[17:31:19.779] EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
               EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import
               EGL_EXT_image_dma_buf_import_modifiers 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_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_KHR_wait_sync
               EGL_MESA_configless_context EGL_MESA_drm_image
               EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display
[17:31:19.779] GL version: OpenGL ES 3.1 Mesa 17.2.8
[17:31:19.779] GLSL version: OpenGL ES GLSL ES 3.10
[17:31:19.779] GL vendor: Intel Open Source Technology Center
[17:31:19.779] GL renderer: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
[17:31:19.779] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_compression_dxt1 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_texture_sRGB_decode
               GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               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_OES_viewport_array
               GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 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_EXT_draw_buffers GL_EXT_map_buffer_range
               GL_KHR_debug GL_KHR_robustness GL_OES_depth_texture_cube_map
               GL_OES_surfaceless_context GL_EXT_color_buffer_float
               GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix
               GL_EXT_tessellation_point_size GL_EXT_tessellation_shader
               GL_INTEL_performance_query
               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_polygon_offset_clamp
               GL_EXT_primitive_bounding_box GL_EXT_shader_io_blocks
               GL_EXT_texture_border_clamp GL_EXT_texture_buffer
               GL_EXT_texture_cube_map_array GL_KHR_blend_equation_advanced
               GL_KHR_context_flush_control
               GL_KHR_robust_buffer_access_behavior GL_NV_image_formats
               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_EXT_blend_func_extended GL_EXT_buffer_storage
               GL_EXT_geometry_point_size GL_EXT_geometry_shader
               GL_EXT_shader_samples_identical GL_KHR_no_error
               GL_OES_geometry_point_size GL_OES_geometry_shader
               GL_OES_shader_image_atomic GL_EXT_clip_cull_distance
               GL_MESA_shader_integer_functions
[17:31:19.779] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[17:31:19.784] event2  - [17:31:19.784] Power Button: [17:31:19.784] is tagged by udev as: Keyboard
[17:31:19.784] event2  - [17:31:19.784] Power Button: [17:31:19.784] device is a keyboard
[17:31:19.786] event3  - [17:31:19.786] Video Bus: [17:31:19.786] is tagged by udev as: Keyboard
[17:31:19.786] event3  - [17:31:19.786] Video Bus: [17:31:19.786] device is a keyboard
[17:31:19.788] event0  - [17:31:19.788] Lid Switch: [17:31:19.788] is tagged by udev as: Switch
[17:31:19.788] event0  - [17:31:19.788] Lid Switch: [17:31:19.788] device is a switch device
[17:31:19.789] event1  - [17:31:19.789] Power Button: [17:31:19.789] is tagged by udev as: Keyboard
[17:31:19.789] event1  - [17:31:19.789] Power Button: [17:31:19.789] device is a keyboard
[17:31:19.791] event8  - [17:31:19.791] HDA Intel HDMI HDMI/DP,pcm=3: [17:31:19.791] is tagged by udev as: Switch
[17:31:19.793] event9  - [17:31:19.793] HDA Intel HDMI HDMI/DP,pcm=7: [17:31:19.793] is tagged by udev as: Switch
[17:31:19.794] event10 - [17:31:19.794] HDA Intel HDMI HDMI/DP,pcm=8: [17:31:19.794] is tagged by udev as: Switch
[17:31:19.796] event11 - [17:31:19.796] HDA Intel HDMI HDMI/DP,pcm=9: [17:31:19.796] is tagged by udev as: Switch
[17:31:19.798] event12 - [17:31:19.798] HDA Intel HDMI HDMI/DP,pcm=10: [17:31:19.798] is tagged by udev as: Switch
[17:31:19.799] event6  - [17:31:19.799] HDA Intel PCH Mic: [17:31:19.799] is tagged by udev as: Switch
[17:31:19.801] event7  - [17:31:19.801] HDA Intel PCH Headphone: [17:31:19.801] is tagged by udev as: Switch
[17:31:19.803] event4  - [17:31:19.803] AT Translated Set 2 keyboard: [17:31:19.803] is tagged by udev as: Keyboard
[17:31:19.803] event4  - [17:31:19.803] AT Translated Set 2 keyboard: [17:31:19.803] device is a keyboard
[17:31:19.805] event13 - [17:31:19.805] SynPS/2 Synaptics TouchPad: [17:31:19.805] is tagged by udev as: Touchpad
[17:31:19.805] event13 - [17:31:19.805] SynPS/2 Synaptics TouchPad: [17:31:19.805] device is a touchpad
[17:31:19.807] event5  - [17:31:19.807] HP Wireless hotkeys: [17:31:19.807] is tagged by udev as: Keyboard
[17:31:19.807] event5  - [17:31:19.807] HP Wireless hotkeys: [17:31:19.807] device is a keyboard
[17:31:19.816] DRM: expected property DPMS to not be an enum, but it is; ignoring
[17:31:19.816] EDID data 'BOE', '', ''
[17:31:19.934] Registered plugin API 'weston_drm_output_api_v1' of size 24
[17:31:19.934] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 1 - 1
[17:31:19.935] Failed to initialize backlight
[17:31:19.935] Output eDP-1, (connector 59, crtc 37)
               mode 1920x1080@60.0, preferred, current
               mode 1920x1080@39.3
[17:31:19.935] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[17:31:19.935] Loading module '/usr/local/lib/weston/desktop-shell.so'
[17:31:19.935] launching '/usr/local/libexec/weston-keyboard'
[17:31:19.936] Loading module '/usr/local/lib/weston/systemd-notify.so'
[17:31:19.936] Old Xwayland module loading detected: Please use --xwayland command line option or set xwayland=true in the [core] section in weston.ini
[17:31:19.936] Loading module '/usr/local/lib/libweston-4/xwayland.so'
[17:31:19.940] Registered plugin API 'weston_xwayland_v1' of size 32
[17:31:19.940] Registered plugin API 'weston_xwayland_surface_v1' of size 16
[17:31:19.940] xserver listening on display :0
[17:31:19.940] launching '/usr/local/libexec/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
[17:31:19.955] DRM: expected property DPMS to not be an enum, but it is; ignoring
[17:31:19.955] DRM: expected property DPMS to not be an enum, but it is; ignoring
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
[17:31:21.391] panel surface gone
[17:31:21.392] background surface gone
[17:31:21.392] event2  - [17:31:21.392] Power Button: [17:31:21.392] device removed
[17:31:21.393] event3  - [17:31:21.393] Video Bus: [17:31:21.393] device removed
[17:31:21.393] event0  - [17:31:21.393] Lid Switch: [17:31:21.393] device removed
[17:31:21.393] event1  - [17:31:21.393] Power Button: [17:31:21.393] device removed
[17:31:21.393] event8  - [17:31:21.393] HDA Intel HDMI HDMI/DP,pcm=3: [17:31:21.393] device removed
[17:31:21.393] event9  - [17:31:21.393] HDA Intel HDMI HDMI/DP,pcm=7: [17:31:21.393] device removed
[17:31:21.393] event10 - [17:31:21.393] HDA Intel HDMI HDMI/DP,pcm=8: [17:31:21.393] device removed
[17:31:21.394] event11 - [17:31:21.394] HDA Intel HDMI HDMI/DP,pcm=9: [17:31:21.394] device removed
[17:31:21.394] event12 - [17:31:21.394] HDA Intel HDMI HDMI/DP,pcm=10: [17:31:21.394] device removed
[17:31:21.394] event6  - [17:31:21.394] HDA Intel PCH Mic: [17:31:21.394] device removed
[17:31:21.394] event7  - [17:31:21.394] HDA Intel PCH Headphone: [17:31:21.394] device removed
[17:31:21.394] event4  - [17:31:21.394] AT Translated Set 2 keyboard: [17:31:21.394] device removed
[17:31:21.394] event13 - [17:31:21.394] SynPS/2 Synaptics TouchPad: [17:31:21.394] device removed
[17:31:21.394] event5  - [17:31:21.394] HP Wireless hotkeys: [17:31:21.394] device removed
Comment 1 Pekka Paalanen 2018-04-27 07:42:16 UTC
Weston does not have any special way of loading Mesa at runtime. It loads what your systems happens to be configured to load. So it's an issue in your system, maybe you have the old Mesa still in /usr/local and your system (distributions usually do) is configured to prefer /usr/local over /usr, so you will get the old Mesa not just for Weston but for everything. (This is why you should not install anything to /usr/local, but always use a custom prefix.)

The DRI2 note in the strings is irrelevant, there is no such thing that would print "DRI3" in the EGL version string. The DRI2 here is a Mesa "EGL driver" name. There are also X11 protocols DRI2 and DRI3, which are not Mesa "EGL drivers", but are both supported under the same Mesa DRI2 "EGL driver". Yes, the terminology is very confusing.
Comment 2 Dilian 2018-04-28 17:18:08 UTC
When buildind recently Mesa I haven't passed i965 along --with-dri-drivers=i916 and /usr/local/lib/dri/i965_dri.so was outdated.


https://wayland.freedesktop.org/mesa-configure.html suggests for ./configure to emit:

   EGL:             yes
   EGL platforms:   wayland x11 drm
   EGL drivers:     builtin:egl_glx builtin:egl_dri2

In my case it prints:
    EGL:             yes
    EGL drivers:     builtin:egl_dri2 builtin:egl_dri3
    GBM:             yes
    EGL/Vulkan/VL platforms:   drm wayland x11 surfaceless

Do I underand correctly, that Mesa offers EGL_DRI2 and EGL_DRI3 drivers, and Weston cannot utilize the EGL_DRI3 driver?

Is the order behing "EGL platforms" significant?
Comment 3 Pekka Paalanen 2018-04-30 08:10:17 UTC
I grepped through all of Mesa and there is no string "DRI3" that would ever get printed that I can see, which is why I say you would never see "DRI3" in the EGL version string. All I can find is "DRI2". This is from current Mesa master branch.

The strings builtin:egl_dri3 etc. you see in ./configure output are simply made up based on which files are included in the configured build. They are still both under the "DRI2" EGL version string.

DRI3 is an X11 protocol extension and nothing else. There is no DRI3 for Wayland or GBM or anything else than X11, the other platforms already do similar things naturally.

If you actually have a tangible problem, please file a new bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.