Date: Tue, 28 Apr 2020 22:24:41 +0000 From: Grzegorz Junka <list1@gjunka.com> To: Jan Beich <jbeich@FreeBSD.org> Cc: freebsd-x11@freebsd.org Subject: Re: Wayland on FreeBSD Message-ID: <0ec67eef-ac5d-2ec9-e1be-35304bb49af9@gjunka.com> In-Reply-To: <y2qg-z956-wny@FreeBSD.org> References: <CAFYkXjmfyLZAi1HZe-RE3wLxa6GRNP6GkmtZG-4T2puRDOz0JA@mail.gmail.com> <9a914a03-d431-7d99-abb8-6f949e562f14@gjunka.com> <y2qg-z956-wny@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Many thanks for help and the pointers. On 28/04/2020 01:33, Jan Beich wrote: > >> setenv LIBGL_DRI3_ENABLE 1 > Obsolete since ports r528071. > >> setenv DISPLAY :0 >> setenv WAYLAND_DISPLAY wayland-0 > Don't set these manually. Wayland compositor creates X11/Wayland sockets > for client applications to talk to. If hardcoded then applications may > launch on unintended server e.g., on Xorg instead of Sway. Removed all three. >> % glxgears >> 14696 frames in 5.0 seconds = 2939.040 FPS >> 14919 frames in 5.0 seconds = 2983.659 FPS >> 15013 frames in 5.0 seconds = 3002.452 FPS > Uncapped FPS is probably due to software renderer. > Does "glxinfo | fgrep -A11 Extended" show llvmpipe? > > Can you check sway log why Xwayland failed to use device-specific > OpenGL driver? Make sure "sway -d" confirms Sway itself doesn't > fall back to llvmpipe. After the above env variables have been removed glxgears no longer starts: % glxgears Error: couldn't open display (null) Same with kwrite % kwrite qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: bsdfb, minimal, offscreen, vnc, xcb. Abort (core dumped) Same with xclock % xclock Error: Can't open display: For the same reason couldn't check glxinfo: % glxinfo Error: unable to open display Firefox also still dumps core, I will try with tmpfs next. > >> I am able to start sway, which in turn seems to be starting >> Xwayland. But I don't seem to be able to open any graphical >> applications? > GUI toolkits (due to bugs) default to X11 except Gtk3 and winit. > Try starting gtk3-demo explicitly with GDK_BACKEND=wayland and > GDK_BACKEND=x11 to rule out Xwayland as the primary cause. > >> The mouse seems to be working fine in Sway, I don't know about the keyboard. > Check key presses via wev, wshowkeys or gtk3-demo. If you don't have a > working terminal emulator due to Xwayland issues try alacritty. However, good news is that gtk3-domo opens fine, and even keyboard works. sway -d prints the following: 2020-04-28 22:05:19 - [sway/main.c:152] FreeBSD venus.yoonka.com 13.0-CURRENT FreeBSD 13.0-CURRENT #13 r359440:359446M: Mon Mar 30 20:21:55 CEST 2020 hans_other@hps2020.home.selasky.org:/usr/obj/usr/img/freebsd.svn/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 2020-04-28 22:05:19 - [sway/main.c:140] LD_LIBRARY_PATH=(null) 2020-04-28 22:05:19 - [sway/main.c:140] LD_PRELOAD=(null) 2020-04-28 22:05:19 - [sway/main.c:140] PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/g/bin 2020-04-28 22:05:19 - [sway/main.c:140] SWAYSOCK=(null) 2020-04-28 22:05:19 - [sway/server.c:40] Preparing Wayland server initialization 2020-04-28 22:05:19 - [backend/session/consolekit2.c:734] Failed to get session path: GDBus.Error:org.freedesktop.ConsoleKit.Manager.Error.General: Unable to lookup session information for process '2266' 2020-04-28 22:05:19 - [backend/session/direct-freebsd.c:207] Using tty /dev/ttyv8 2020-04-28 22:05:19 - [backend/session/direct-freebsd.c:296] Successfully loaded direct session 2020-04-28 22:05:19 - [backend/backend.c:157] Found 1 GPUs 2020-04-28 22:05:19 - [backend/drm/backend.c:159] Initializing DRM backend for /dev/dri/card0 (amdgpu) 2020-04-28 22:05:19 - [backend/drm/drm.c:70] Using atomic DRM interface 2020-04-28 22:05:19 - [backend/drm/drm.c:255] Found 6 DRM CRTCs 2020-04-28 22:05:19 - [backend/drm/drm.c:176] Found 12 DRM planes 2020-04-28 22:05:20 - [render/egl.c:246] Using EGL 1.5 2020-04-28 22:05:20 - [render/egl.c:247] Supported EGL extensions: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import 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 2020-04-28 22:05:20 - [render/egl.c:248] EGL vendor: Mesa Project 2020-04-28 22:05:20 - [render/egl.c:127] Supported dmabuf buffer formats: AR24 XR24 2020-04-28 22:05:20 - [render/gles2/renderer.c:561] Using OpenGL ES 3.2 Mesa 18.3.2 2020-04-28 22:05:20 - [render/gles2/renderer.c:562] GL vendor: X.Org 2020-04-28 22:05:20 - [render/gles2/renderer.c:563] GL renderer: Radeon RX Vega (VEGA10, DRM 3.27.0, 13.0-CURRENT, LLVM 8.0.1) 2020-04-28 22:05:20 - [render/gles2/renderer.c:564] Supported GLES2 extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_occlusion_query_boolean 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_AMD_performance_monitor 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_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat 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_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_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_EXT_texture_norm16 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_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_window_rectangles GL_MESA_shader_integer_functions GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_semaphore GL_EXT_semaphore_fd GL_AMD_framebuffer_multisample_advanced 2020-04-28 22:05:20 - [GLES2] LLVM diagnostic (remark): <unknown>:0:0: 13 instructions in function 2020-04-28 22:05:20 - [GLES2] Shader Stats: SGPRS: 16 VGPRS: 24 Code Size: 68 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 2020-04-28 22:05:20 - [GLES2] LLVM diagnostic (remark): <unknown>:0:0: 35 instructions in function 2020-04-28 22:05:20 - [GLES2] Shader Stats: SGPRS: 24 VGPRS: 8 Code Size: 212 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 2020-04-28 22:05:20 - [GLES2] LLVM diagnostic (remark): <unknown>:0:0: 40 instructions in function 2020-04-28 22:05:20 - [GLES2] Shader Stats: SGPRS: 24 VGPRS: 12 Code Size: 244 LDS: 0 Scratch: 0 Max Waves: 10 Spilled SGPRs: 0 Spilled VGPRs: 0 PrivMem VGPRs: 0 >> Firefox briefly opens a window stating that there was a problem then >> dumps core. > Likely posix_fallocate issue. I can't reproduce that's why it takes eons > to fix. > >> Kwrite displays this then nothing happens: >> >> % kwrite >> sonnet.core: No language dictionaries for the language: "C" >> sonnet.core: No language dictionaries for the language: "C" >> sonnet.core: No language dictionaries for the language: "C" >> sonnet.core: No language dictionaries for the language: "C" > Looks unrelated. To set locale define LANG in environ(7). > >> qt.qpa.xcb: QXcbConnection: XCB error: 11 (BadAlloc), sequence: 476, >> resource id: 908, major code: 53 (CreatePixmap), minor code: 0 > Probably related to software rendering in Xwayland or broken X11 socket.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0ec67eef-ac5d-2ec9-e1be-35304bb49af9>