https://bugs.kde.org/show_bug.cgi?id=385775
Bug ID: 385775 Summary: KDE Plasma on Wayland unable to start with Intel GMA 3100 Product: plasmashell Version: 5.11.0 Platform: Archlinux Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: generic-wayland Assignee: plasma-b...@kde.org Reporter: uflei...@users.sourceforge.net Target Milestone: 1.0 Overview: When I try to start a Plasma Wayland session from SDDM, it stops with the following dialog: Plasma is unable to start as it could not correctly use OpenGL 2. Please check that your graphics drivers are set up correctly. Steps to Reproduce: In SDDM, select "Plasma (Wayland)", then log in. Actual Results: An error dialog is displayed as described above. The user interface does not react to input, but it is possible to switch to another console using Ctrl-Alt-Fn. Expected Results: Starting of Plasma Desktop with Wayland. Build Date & Platform: Hardware: HP Compaq DC7800 with Intel GMA 3100 graphics (Mesa DRI Intel(R) Q35, OpenGL 2.1, DRI driver: i915) Software: Arch Linux with latest updates as of 2017-10-15. $ pacman -Q plasma-wayland-session qt5-base wayland xorg-server xf86-video-intel linux-lts plasma-wayland-session 5.11.0-2 qt5-base 5.9.2-1 wayland 1.14.0-1 xorg-server 1.19.5-1 xf86-video-intel 1:2.99.917+794+ga384b462-1 linux-lts 4.9.56-1 Additional Information: Plasma Wayland used to work when Arch Linux was at Qt 5.7. I tried to find the source of the problem. The error dialog is opened by /usr/bin/plasmashell, after creating instances of QQuickWindow subclasses (DesktopView, PanelView) in plasma-workspace/shell/shellcorona.cpp, sceneGraphError() is signalled, which will then lead to this dialog. So the problem must be QtQuick on Wayland. Running kwin_wayland seems to work ~~~ export $(dbus-launch) export QT_QPA_PLATFORM=wayland export XKB_DEFAULT_LAYOUT=ch export XKB_DEFAULT_VARIANT=de_sundeadkeys export XKB_DEFAULT_MODEL=pc105 export GDK_BACKEND=wayland kwin_wayland --xwayland --exit-with-session=konsole ~~~ Starting weston seems to work too, so I started Weston and tried to start QtQuick apps from the Weston shell, for instance the Qt Quick Controls 2 gallery example: ~~~ QT_QPA_PLATFORM=wayland-egl EGL_LOG_LEVEL=debug ~/src/quickcontrols2/gallery/gallery Using Wayland-EGL libEGL debug: Native platform type: x11 (build-time configuration) libEGL debug: added egl_dri2 to module array libEGL debug: the best driver is DRI2 (test only) libEGL debug: pci id for fd 6: 8086:29b2, driver i915 libEGL debug: DRI2: dlopen(/usr/lib/xorg/modules/dri/i915_dri.so) libEGL debug: found extension `DRI_Core' libEGL info: found extension DRI_Core version 1 libEGL debug: found extension `DRI_IMAGE_DRIVER' libEGL debug: found extension `DRI_DRI2' libEGL info: found extension DRI_DRI2 version 4 libEGL debug: found extension `DRI_DriverVtable' libEGL debug: found extension `DRI_ConfigOptions' libEGL debug: found extension `DRI_TexBuffer' libEGL info: found extension DRI_TexBuffer version 3 libEGL debug: found extension `DRI2_Fence' libEGL debug: found extension `DRI2_Flush' libEGL info: found extension DRI2_Flush version 3 libEGL debug: found extension `DRI_IMAGE' libEGL info: found extension DRI_IMAGE version 7 libEGL debug: found extension `DRI_RENDERER_QUERY' libEGL debug: found extension `DRI_CONFIG_QUERY' libEGL debug: found extension `DRI_NoError' libEGL debug: found extension `DRI_TexBuffer' libEGL debug: found extension `DRI2_Fence' libEGL info: found extension DRI2_Fence version 1 libEGL debug: found extension `DRI2_Flush' libEGL debug: found extension `DRI_IMAGE' libEGL debug: found extension `DRI_RENDERER_QUERY' libEGL info: found extension DRI_RENDERER_QUERY version 1 libEGL debug: found extension `DRI_CONFIG_QUERY' libEGL info: found extension DRI_CONFIG_QUERY version 1 libEGL debug: found extension `DRI_NoError' libEGL info: found extension DRI_NoError version 1 libEGL debug: did not find optional extension DRI_Robustness version 1 libEGL debug: did not find optional extension DRI2_Interop version 1 libEGL debug: the best driver is DRI2 libpng warning: iCCP: known incorrect sRGB profile Using the 'xdg-shell-v6' shell integration libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in dri2_create_context libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in dri2_create_context QWaylandGLContext: failed to create EGLContext, error=3009 libEGL debug: EGL user error 0x3006 (EGL_BAD_CONTEXT) in eglDestroyContext Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile)) ~~~ The error occurs in QSGThreadedRenderLoop::handleExposure() (hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp) the two eglCreateContext() calls fail with EGL_BAD_MATCH: ~~~ m_context = eglCreateContext(m_eglDisplay, m_config, m_shareEGLContext, eglContextAttrs.constData()); if (m_context == EGL_NO_CONTEXT) { m_context = eglCreateContext(m_eglDisplay, m_config, EGL_NO_CONTEXT, eglContextAttrs.constData()); m_shareEGLContext = EGL_NO_CONTEXT; } EGLint error = eglGetError(); if (error != EGL_SUCCESS) { qWarning("QWaylandGLContext: failed to create EGLContext, error=%x", error); return; } ~~~ I do not know enough about OpenGL and EGL to proceed here. The arguments are m_shareEGLContext=0 and eglContextAttrs = { [0] = 12440, [1] = 2, [2] = 12539, [3] = 0, [4] = 12541, [5] = 2, [6] = 12344 }. What I noticed are different outputs of glxinfo -B; eglinfo; es2_info in X11 and Wayland, see appendix below. Wayland seems to use software rendering (llvmpipe). I finally tried the QtQuick apps using software rendering. QT_QPA_PLATFORM=wayland-egl QMLSCENE_DEVICE=softwarecontext ~/src/quickcontrols2/gallery/gallery This looks as if it was running, but it is not fully functional, for example clicking the buttons does not do anything. On X11, it works. QT_QPA_PLATFORM=wayland-egl LIBGL_ALWAYS_SOFTWARE=1 ~/src/quickcontrols2/gallery/gallery This works. So I finally managed to run a Plasma Wayland session using the following configuration: /etc/xdg/plasma-workspace/env/plasma-wayland-env.sh ~~~ if test "$XDG_SESSION_TYPE" = "wayland"; then export LIBGL_ALWAYS_SOFTWARE=1 export XKB_DEFAULT_LAYOUT=ch export XKB_DEFAULT_VARIANT=de_sundeadkeys export XKB_DEFAULT_MODEL=pc105 export GDK_BACKEND=wayland fi ~~~ But I think that this is not how it's meant to be, so I am reporting it anyway. Is there a way to make it work without hacks? ~~~ Appendix: Output of "glxinfo -B; eglinfo; es2_info" on X11 and Wayland. X11: ~~~ name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel Open Source Technology Center (0x8086) Device: Mesa DRI Intel(R) Q35 (0x29b2) Version: 17.2.2 Accelerated: yes Video memory: 384MB Unified memory: yes Preferred profile: compat (0x2) Max core profile version: 0.0 Max compat profile version: 1.4 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 2.0 OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Q35 OpenGL version string: 2.1 Mesa 17.2.2 OpenGL shading language version string: 1.20 OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.2.2 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16 EGL API version: 1.4 EGL vendor string: Mesa Project EGL version string: 1.4 (DRI2) EGL client APIs: OpenGL OpenGL_ES EGL extensions string: EGL_CHROMIUM_sync_control 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_NOK_swap_region EGL_NOK_texture_from_pixmap EGL_NV_post_sub_buffer EGL_WL_bind_wayland_display EGL client extensions string: 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 Configurations: bf lv colorbuffer dp st ms vis cav bi renderable supported id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces --------------------------------------------------------------------- 0x01 32 0 8 8 8 8 0 0 0 0 0x20TC a y y y win,pb,pix 0x02 32 0 8 8 8 8 24 8 0 0 0x20TC a y y y win,pb,pix 0x03 24 0 8 8 8 0 0 0 0 0 0x20TC y y y y win,pb,pix 0x04 24 0 8 8 8 0 24 8 0 0 0x20TC y y y y win,pb,pix 0x05 32 0 8 8 8 8 0 0 0 0 0x21DC a y y y win,pb,pix 0x06 32 0 8 8 8 8 24 8 0 0 0x21DC a y y y win,pb,pix 0x07 24 0 8 8 8 0 0 0 0 0 0x21DC y y y y win,pb,pix 0x08 24 0 8 8 8 0 24 8 0 0 0x21DC y y y y win,pb,pix EGL_VERSION: 1.4 (DRI2) EGL_VENDOR: Mesa Project EGL_EXTENSIONS: EGL_CHROMIUM_sync_control, 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_NOK_swap_region, EGL_NOK_texture_from_pixmap, EGL_NV_post_sub_buffer, EGL_WL_bind_wayland_display EGL_CLIENT_APIS: OpenGL OpenGL_ES GL_VERSION: OpenGL ES 2.0 Mesa 17.2.2 GL_RENDERER: Mesa DRI Intel(R) Q35 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_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_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_sync, GL_OES_vertex_array_object, GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 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_OES_surfaceless_context, GL_EXT_separate_shader_objects, 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 ~~~ Wayland: ~~~ name of display: :1 display: :1 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: VMware, Inc. (0xffffffff) Device: llvmpipe (LLVM 5.0, 128 bits) (0xffffffff) Version: 17.2.2 Accelerated: no Video memory: 4884MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 3.3 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.0 OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 5.0, 128 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.2.2 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 3.0 Mesa 17.2.2 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.2 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 EGL API version: 1.4 EGL vendor string: Mesa Project EGL version string: 1.4 (DRI2) EGL client APIs: OpenGL OpenGL_ES EGL extensions string: 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_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_MESA_configless_context EGL client extensions string: 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 Configurations: bf lv colorbuffer dp st ms vis cav bi renderable supported id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces --------------------------------------------------------------------- 0x01 32 0 8 8 8 8 0 0 0 0 0x24TC a y y y win,pb,pix 0x02 32 0 8 8 8 8 16 0 0 0 0x24TC a y y y win,pb,pix 0x03 32 0 8 8 8 8 24 0 0 0 0x24TC a y y y win,pb,pix 0x04 32 0 8 8 8 8 24 8 0 0 0x24TC a y y y win,pb,pix 0x05 32 0 8 8 8 8 32 0 0 0 0x24TC a y y y win,pb,pix 0x06 24 0 8 8 8 0 0 0 0 0 0x24TC y y y y win,pb,pix 0x07 24 0 8 8 8 0 16 0 0 0 0x24TC y y y y win,pb,pix 0x08 24 0 8 8 8 0 24 0 0 0 0x24TC y y y y win,pb,pix 0x09 24 0 8 8 8 0 24 8 0 0 0x24TC y y y y win,pb,pix 0x0a 24 0 8 8 8 0 32 0 0 0 0x24TC y y y y win,pb,pix 0x0b 32 0 8 8 8 8 0 0 0 0 0x25DC a y y y win,pb,pix 0x0c 32 0 8 8 8 8 16 0 0 0 0x25DC a y y y win,pb,pix 0x0d 32 0 8 8 8 8 24 0 0 0 0x25DC a y y y win,pb,pix 0x0e 32 0 8 8 8 8 24 8 0 0 0x25DC a y y y win,pb,pix 0x0f 32 0 8 8 8 8 32 0 0 0 0x25DC a y y y win,pb,pix 0x10 24 0 8 8 8 0 0 0 0 0 0x25DC y y y y win,pb,pix 0x11 24 0 8 8 8 0 16 0 0 0 0x25DC y y y y win,pb,pix 0x12 24 0 8 8 8 0 24 0 0 0 0x25DC y y y y win,pb,pix 0x13 24 0 8 8 8 0 24 8 0 0 0x25DC y y y y win,pb,pix 0x14 24 0 8 8 8 0 32 0 0 0 0x25DC y y y y win,pb,pix EGL_VERSION: 1.4 (DRI2) EGL_VENDOR: Mesa Project EGL_EXTENSIONS: 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_no_config_context, EGL_KHR_reusable_sync, EGL_KHR_surfaceless_context, EGL_KHR_wait_sync, EGL_MESA_configless_context EGL_CLIENT_APIS: OpenGL OpenGL_ES GL_VERSION: OpenGL ES 3.0 Mesa 17.2.2 GL_RENDERER: llvmpipe (LLVM 5.0, 128 bits) GL_EXTENSIONS: GL_EXT_blend_minmax, GL_EXT_multi_draw_arrays, 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_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 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_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_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_polygon_offset_clamp, GL_EXT_texture_border_clamp, GL_KHR_context_flush_control, GL_OES_copy_image, GL_OES_draw_buffers_indexed, GL_OES_draw_elements_base_vertex, GL_OES_texture_border_clamp, GL_OES_texture_stencil8, GL_EXT_blend_func_extended, GL_KHR_no_error, GL_EXT_clip_cull_distance, GL_MESA_shader_integer_functions ~~~ -- You are receiving this mail because: You are watching all bug changes.