Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend/x11/backend.c:478] X11 does not support shared pixmaps #2171

Closed
Marietto2008 opened this issue Mar 2, 2024 · 38 comments
Closed

[backend/x11/backend.c:478] X11 does not support shared pixmaps #2171

Marietto2008 opened this issue Mar 2, 2024 · 38 comments
Labels

Comments

@Marietto2008
Copy link

Marietto2008 commented Mar 2, 2024

Hello.

I'm trying to configure Wayland and Wayfire on FreeBSD 14.0. You can find the whole configuration here :

https://pastebin.ubuntu.com/p/VtH2YZcfn6/

Expected behavior
That is starts !

Screenshots or stacktrace

This is what happens when I run the wayfire script :

nano wayfire-start :

#!/bin/sh
exec dbus-launch --exit-with-session wayfire

=

[src/main.cpp:334] Starting wayfire version v0.8.0
[backend/x11/backend.c:395] Creating X11 backend
[backend/x11/backend.c:478] X11 does not support shared pixmaps
[backend/x11/backend.c:607] Failed to query DRI3 DRM FD
[src/main.cpp:134] Fatal error: Segmentation fault
#1 0x363b40 <main+0x1580> at /usr/local/bin/wayfire
#2 0x82d7db53f <pthread_sigmask+0x53f> at /lib/libthr.so.3
#3 0x82d7daafb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
#4 0x820f1b2d3 <???> at ???
#5 0x82309b5d4 <wlr_backend_get_drm_fd+0x4> at /usr/local/wlroots016/lib/libwlroots.so.11
#6 0x362a3a <main+0x47a> at /usr/local/bin/wayfire
#7 0x82aeb7afa <__libc_start1+0x12a> at /lib/libc.so.7

**Wayfire version**

# pkg search wayfire

wayfire-0.8.0_3                           3D Wayland compositor
wayfire-plugins-extra-0.8.0_1  Additional plugins for Wayfire

Keep in consideration that I don't run the wayfire-start script on top of xorg. But WITHOUT launching it at all,even if I keep it installed on the system.

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

Hi, thanks for the detailed bug report. Unfortunately the error seems to come from wlroots (I suppose Wayfire could handle it and exit gracefully) but in any case there is nothing we can do on our side to actually fix it.

Are you trying to run Wayfire from within an existing X11 session? You ought to run Wayfire directly from a TTY, running from a x11 session is for testing purposes only.

I would also recommend installing wayfire-git (from source) and wlroots 0.17 if you can, because things may have already changed on the wlroots side, if this is a wlroots bug and not a misconfiguration on your side.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

Hello. Thanks for the fast reply.

I'm using wlroots-0.17.1 : is this still good ? Between the ports I also have some old versions,but I don't know if they will work as they are marked as deprecated :

wlroots015-0.15.1_2            Modular Wayland compositor library (deprecated 0.15.* series)
wlroots016-0.16.2              Modular Wayland compositor library (deprecated 0.16.* series)

I don't run the wayfire-start script on top of xorg. But WITHOUT launching it at all,even if I keep it installed on the system.

Installing wayfire-git (from source) on FreeBSD may be impossible without patching it,I suppose.

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

I'm using wlroots-0.17.1 : is this still good ?

You may have it installed, but you will need a newer Wayfire version (currently wayfire-git) for it. I'm looking at this line:

#5 0x82309b5d4 <wlr_backend_get_drm_fd+0x4> at /usr/local/wlroots016/lib/libwlroots.so.11

Which seems to indicate Wayfire is using the wlroots 0.16 (which is indeed the version supported by the last release).

If you have wlroots 0.17 it should be relatively easy to install Wayfire from source though - wlroots is the main dependency and because of it people usually have to compile manually also its dependencies like newer wayland-server, etc. but you should already have compatible versions installed since you have wlroots 0.17.

@Marietto2008
Copy link
Author

So,what ? everything seems to be fine. But I'm not able to run WayFire. So,what should I do ?

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

So,what ? everything seems to be fine. But I'm not able to run WayFire. So,what should I do ?

Install wayfire-git from source :) https://github.com/WayfireWM/wayfire?tab=readme-ov-file#installation

Before you do that, maybe you can try forcing wlroots to use the DRM backend as that's what you want if you run from a tty. WLR_BACKENDS=libinput,drm wayfire &> log.txt and see what comes up in the log.txt

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

# ./test.sh (launched without running Xorg)

WLR_BACKENDS=libinput,drm wayfire > log.txt

log.txt :

II 02-03-24 19:17:58.458 - [src/main.cpp:334] Starting wayfire version v0.8.0
II 02-03-24 19:17:58.533 - [backend/backend.c:298] Loading user-specified backends due to WLR_BACKENDS: libinput,drm
II 02-03-24 19:17:58.562 - [libseat] [libseat/libseat.c:77] Seat opened with backend 'seatd'
II 02-03-24 19:17:58.562 - [libseat] [libseat/backend/seatd.c:212] Enabling seat
II 02-03-24 19:17:58.562 - [backend/session/session.c:109] Successfully loaded libseat session
EE 02-03-24 19:17:58.572 - [backend/backend.c:217] Found 0 GPUs, cannot create backend
EE 02-03-24 19:17:58.572 - [backend/backend.c:311] failed to add backend 'drm'
EE 02-03-24 19:17:58.573 - [src/main.cpp:134] Fatal error: Segmentation fault
EE 02-03-24 19:17:58.735 - #1  0x363b40 <main+0x1580> at /usr/local/bin/wayfire
EE 02-03-24 19:17:58.735 - #2  0x82d01353f <pthread_sigmask+0x53f> at /lib/libthr.so.3
EE 02-03-24 19:17:58.735 - #3  0x82d012afb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
EE 02-03-24 19:17:58.735 - #4  0x821ebe2d3 <???> at ???
EE 02-03-24 19:17:58.735 - #5  0x822a615d4 <wlr_backend_get_drm_fd+0x4> at /usr/local/wlroots016/lib/libwlroots.so.11
EE 02-03-24 19:17:58.735 - #6  0x362a3a <main+0x47a> at /usr/local/bin/wayfire
EE 02-03-24 19:17:58.735 - #7  0x82bab7afa <__libc_start1+0x12a> at /lib/libc.so.7

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

maybe the nvidia driver is not good ?

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.14              Driver Version: 550.54.14      CUDA Version: N/A      |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1060 3GB    Off |   00000000:01:00.0  On |                  N/A |
| 57%   42C    P8              7W /  120W |     289MiB /   3072MiB |     10%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      4787      G   /usr/local/libexec/Xorg                       153MiB |
|    0   N/A  N/A     12029      G   xfwm4                                           2MiB |
|    0   N/A  N/A     19519      G   /usr/local/lib/firefox/firefox                130MiB |
+-----------------------------------------------------------------------------------------+

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

So, the error is indeed that wlroots cannot find a suitable GPU device. Check out the nvidia docs: https://download.nvidia.com/XFree86/Linux-x86_64/510.39.01/README/gbm.html

I personally have never tested Wayfire on Nvidia but I have heard of users who have managed to run it, so probably there is some way to configure your driver.

@Marietto2008
Copy link
Author

ok. this is what happens after the installation of wayfire 0.9 :

II 02-03-24 19:32:01.673 - [src/main.cpp:334] Starting wayfire version 0.9.0
II 02-03-24 19:32:01.673 - [backend/backend.c:310] Loading user-specified backends due to WLR_BACKENDS: libinput,drm
II 02-03-24 19:32:01.673 - [libseat] [libseat/libseat.c:77] Seat opened with backend 'seatd'
II 02-03-24 19:32:01.674 - [libseat] [libseat/backend/seatd.c:212] Enabling seat
II 02-03-24 19:32:01.674 - [backend/session/session.c:109] Successfully loaded libseat session
EE 02-03-24 19:32:01.676 - [backend/backend.c:210] Found 0 GPUs, cannot create backend
EE 02-03-24 19:32:01.676 - [backend/backend.c:322] failed to add backend 'drm'
EE 02-03-24 19:32:01.676 - [src/main.cpp:131] Fatal error: Segmentation fault
EE 02-03-24 19:32:01.690 - #1  0x77f2e8 <_ZL14signal_handleri+0x138> at /usr/local/bin/wayfire
EE 02-03-24 19:32:01.690 - #2  0x82f55f53f <pthread_sigmask+0x53f> at /lib/libthr.so.3
EE 02-03-24 19:32:01.690 - #3  0x82f55eafb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
EE 02-03-24 19:32:01.690 - #4  0x821b0b2d3 <_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl+0x821057cf3> at ???
EE 02-03-24 19:32:01.690 - #5  0x8242020d4 <wlr_backend_get_drm_fd+0x4> at /usr/local/lib/libwlroots.so.12
EE 02-03-24 19:32:01.690 - #6  0x77e2e2 <main+0x502> at /usr/local/bin/wayfire
EE 02-03-24 19:32:01.690 - #7  0x82d099afa <__libc_start1+0x12a> at /lib/libc.so.7

@Marietto2008
Copy link
Author

Can I upgrade wlroots to a new version ?

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

Can I upgrade wlroots to a new version ?

wlroots 0.17 is the newest release. Did you see my earlier comment? You may be missing some nvidia settings.

@soreau
Copy link
Member

soreau commented Mar 2, 2024

wlroots 0.17.x is the latest wayfire currently supports. Either way, the problem is with the graphics driver. As far as I understand, the GBM requirements are satisfied only with later proprietary driver versions and do not support some cards. Make sure to check the link @ammen99 posted. The other option is to use nouveau, which means removing the proprietary driver and just using mesa.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

The tutorial says to load these modules on /etc/rc.conf :

kld_list="nvidia-modeset nvidia-drm linux linux64 i915kms ext2fs"

and I did it. Infact all those modules are in memory :

# kldstat 

Id Refs Address                Size Name
 1  178 0xffffffff80200000  1d345b0 kernel
 2    1 0xffffffff81f35000     6c00 usbhid.ko
 3    6 0xffffffff81f3c000     77c0 hidbus.ko
 4    1 0xffffffff81f44000     89d8 wsp.ko
 5    1 0xffffffff81f4d000     5b30 sysctlinfo.ko
 6    1 0xffffffff81f53000     3988 nmdm.ko
 7    1 0xffffffff81f57000     9408 acpi_video.ko
 8    1 0xffffffff81f61000    1b450 snd_uaudio.ko
 9    1 0xffffffff81f7e000     7718 cryptodev.ko
10    1 0xffffffff81f86000   5d5958 zfs.ko
11    1 0xffffffff8255c000    27540 fusefs.ko
12    1 0xffffffff82584000     36c8 coretemp.ko
13    1 0xffffffff82588000     9278 nullfs.ko
14    1 0xffffffff82592000     ead0 if_bridge.ko
15    2 0xffffffff825a1000     8990 bridgestp.ko
16    1 0xffffffff825aa000   37c540 vmm.ko
17    1 0xffffffff82927000     3380 sysctlbyname_improved.ko
18    1 0xffffffff8292b000     af50 cuse.ko
19    1 0xffffffff82936000    1c3a8 geom_eli.ko
20    1 0xffffffff83510000     73c0 linprocfs.ko
**21    6 0xffffffff83518000     be70 linux_common.ko**
22    1 0xffffffff83524000     440c linsysfs.ko
23    1 0xffffffff83529000     3558 fdescfs.ko
**24    2 0xffffffff8352d000   125678 nvidia-modeset.ko**
**25    2 0xffffffff83800000  3118000 nvidia.ko**
**26    2 0xffffffff83653000    31a10 linux.ko**
**27    1 0xffffffff83685000    108f0 nvidia-drm.ko**
**28    3 0xffffffff83696000    7c050 drm.ko**
29    1 0xffffffff83713000     22b8 iic.ko
30    3 0xffffffff83716000     3080 linuxkpi_hdmi.ko
31    4 0xffffffff8371a000     6350 dmabuf.ko
32    3 0xffffffff83721000     3378 lindebugfs.ko
**33    1 0xffffffff83725000    2dc30 linux64.ko**
**34    1 0xffffffff86918000   1b3920 i915kms.ko**
35    1 0xffffffff83753000     b360 ttm.ko
**36    1 0xffffffff8375f000    1aeb0 ext2fs.ko**
37    1 0xffffffff8377a000     3390 acpi_wmi.ko
38    1 0xffffffff8377e000     3250 ichsmb.ko
39    1 0xffffffff83782000     2178 smbus.ko
40    1 0xffffffff83785000     2110 pchtherm.ko
41    1 0xffffffff83788000     3360 uhid.ko
42    1 0xffffffff8378c000     4364 ums.ko
43    1 0xffffffff83791000     3360 wmt.ko
44    1 0xffffffff83795000     21e8 hms.ko
45    3 0xffffffff83798000     30a8 hidmap.ko
46    1 0xffffffff8379c000     21e8 hcons.ko
47    1 0xffffffff8379f000     21e8 hsctrl.ko
48    1 0xffffffff837a2000     2278 pty.ko
49    1 0xffffffff837a5000     b090 tmpfs.ko
50    1 0xffffffff837b1000     2a68 mac_ntpd.ko

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

I have no idea which tutorial you are following. Do you have a link? Also loading the modules might not be enough, see the docs I attached.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

This tutorial :

https://www.youtube.com/watch?v=5vHdJ5-drMs

anyway he followed the FreeBSD handbook to create that video. He did a good work. Maybe some crucial info is missing directly from the FreeBSD handbook ?

Infact it works for him,but not for me.

@ammen99
Copy link
Member

ammen99 commented Mar 2, 2024

I don't know what the difference is, but reading the official docs says you need to set a certain parameter to the kernel module. https://download.nvidia.com/XFree86/Linux-x86_64/550.54.14/README/kms.html

modprobe -r nvidia_drm ; modprobe nvidia_drm modeset=1

@soreau
Copy link
Member

soreau commented Mar 2, 2024

Or maybe missing the nvidia gbm module?

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 2, 2024

Thanks to @ammen99 I found the error. You told me how to configure the nvidia driver as if I was using Linux,but I'm using FreeBSD. BTW I have translated your suggestion to adapt it for FreeBSD and I've understood where it was the error.

When I have installed the driver nvidia-drm-515-kmod-550.54.14,the script said :

Modesetting must be enabled to use nvidia-drm.ko for graphics. 
This can be done by setting the modeset sysctl, the equivalent of the modeset kernel parameter on Linux.

So I have added this parameter to sysctl.conf :

hw.nvidiadrm.modeset=1

unfortunately my system does not accept it as is because it says that this is a tunable setting,so it should be put on /boot/loader.conf. I did it and it almost worked :

[src/main.cpp:334] Starting wayfire version 0.9.0
[backend/backend.c:310] Loading user-specified backends due to WLR_BACKENDS: libinput,drm
[libseat] [libseat/libseat.c:77] Seat opened with backend 'seatd'
[libseat] [libseat/backend/seatd.c:212] Enabling seat
[backend/session/session.c:109] Successfully loaded libseat session
[backend/backend.c:213] Found 1 GPUs
[backend/drm/backend.c:202] Initializing DRM backend for /dev/dri/card0 (nvidia-drm)
[backend/drm/drm.c:255] Found 4 DRM CRTCs
[backend/drm/drm.c:213] Found 12 DRM planes
[render/egl.c:206] Supported EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base GL_EXT_device_enumeration EGL_EXT_device_query 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_MESA_platform_surfaceless EGL_EXT_explicit_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm EGL_EXT_platform_xcb
[render/egl.c:355] Using EGL 1.5
[render/egl.c:356] Supported EGL display 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_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_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_EXT_present_opaque EGL_WL_bind_wayland_display EGL_WL_wayland_eglstream
[render/egl.c:358] Supported EGL device extensions: EGL_NV_device_cuda EGL_EXT_device_drm EGL_EXT_device_drm_render_node EGL_EXT_device_query_name EGL_EXT_device_persistent_id
[render/egl.c:360] EGL vendor: NVIDIA
[render/egl.c:362] EGL driver name: nvidia
[render/gles2/renderer.c:842] Creating GLES2 renderer
[render/gles2/renderer.c:843] Using OpenGL ES 3.2 NVIDIA 550.54.14
[render/gles2/renderer.c:844] GL vendor: NVIDIA Corporation
[render/gles2/renderer.c:845] GL renderer: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
[render/gles2/renderer.c:846] Supported GLES2 extensions: GL_EXT_base_instance GL_EXT_blend_func_extended L_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_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_NV_timeline_semaphore GL_KHR_shader_subgroup GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_sliced_3d GL_KHR_texture_compression_astc_hdr 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_timer_query GL_NV_viewport_

EE 02-03-24 20:36:03.226 - [src/main.cpp:59] Unable to drop root (we shouldn't be able to restore it after setuid), refusing to start

Almost because I still need to fix the last error...maybe it is caused by another error that I see on the dmesg :

set class 'me' resource limit memorylocked: Operation not permitted

This is where the error originates :

# nano /home/marietto/.login_conf

    me:\
    :charset=UTF-8:\
    :lang=it_IT.UTF-8:\
    :setenv=LC_COLLATE=C:\
    :memorylocked=unlimited: 

(I'm using the zsh shell). Just a little bit of help and I will be able to make it.

@soreau
Copy link
Member

soreau commented Mar 3, 2024

Have you tried running wayfire as user? It would need patching to run as root.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 3, 2024

I'm close to run Wayland + wayfire successfully,but not yet. This is what happens when I run the wayfire-start script :

#!/bin/sh
exec dbus-launch --exit-with-session wayfire

as user : https://pastebin.ubuntu.com/p/hDCPHjWSj2/

any idea about how to fix it ? thanks.

@ammen99
Copy link
Member

ammen99 commented Mar 3, 2024

You probably need to give your user permissions to write in the directory where the socket files are created, because it says:

[wayland] unable to open lockfile /var/run/user/1001/wayland-1.lock check permissions

@ammen99
Copy link
Member

ammen99 commented Mar 3, 2024

Also, does your user have ID 1001 or 1000? The id program should be able to tell you this. If it is 1000 as I expect, it means you have set some environment variable incorrectly (most probably XDG_RUNTIME_DIR, it should be something like /run/user/<your user id>

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 3, 2024

I think this is the portion of the tutorial involved in the error :

# nano /home/marietto/.zshenv

# Path
typeset -U PATH path
path=("$HOME/bin" "/usr/local/bin" "$path[@]")
export PATH

# xdg directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_RUNTIME_DIR="/var/run/user/`id -u`"

as user this is what reports the id command (when I run xfce and xorg) :

# id
uid=1001(marietto) gid=1001(marietto) groups=1001(marietto),0(wheel),44(video)

# id -u
1001

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 3, 2024

I suspect that there isn't a permission problem,but something else. When I log out from xfce4 and from xorg,this is what I see (as user) :

# cd /var/run/user
# ls
0

I don't see 1001. Is that normal ? I'm using zsh.

echo $SHELL
/usr/local/bin/zsh

@ammen99
Copy link
Member

ammen99 commented Mar 3, 2024

Have you tried manually creating the directory?

Note that on my Linux Distro (Fedora) the directory is created automatically and I suppose the same is true for many other distributions. Unfortunately, I cannot help much with *BSD but you should be able to find some documentation of what system component(s) are responsible for creating this directory.

@jbeich
Copy link
Contributor

jbeich commented Mar 3, 2024

  • XFCE4 on FreeBSD may use ConsoleKit2 which always tracks sessions thus removes XDG_RUNTIME_DIR on logout
  • Wayfire can use ConsoleKit2 as well e.g., env LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire
  • As described in freebsd/freebsd-ports@2d487a43aa14 when using ConsoleKit2 there's no need to manually create XDG_RUNTIME_DIR

@Marietto2008
Copy link
Author

Thanks. Wayland / Wayfire has been finally able to start. BUT it didn't work as expected. Please check the screenshots attached below.

5
6
7

@ammen99
Copy link
Member

ammen99 commented Mar 4, 2024

@Marietto2008 those images make it really hard to read what is going on, and maybe some messages are missing (happens a lot on ttys). You can redirect the output to a file, for example: wayfire &> log.txt - this way we can see whether there are or aren't relevant error messages.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 4, 2024

@ammen99
Copy link
Member

ammen99 commented Mar 5, 2024

Do the consolekit messages (dbus stuff) come out when starting Wayfire, or only when you stop it?

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 5, 2024

I've removed wayfire 0.9 and reinstalled wayfire 0.8 and the conflict with the plugin libfollow-focus is gone. I've also changed the values connected to my monitor from DP-3 to HDMI-A-1 ,as follows :

# nano /usr/home/marietto/.config/mpv/mpv.conf

# mpv.conf

# list profiles with: mpv --profile=help

# load hwdec profile automatically
profile=hwdec

# hardware acceleration profile
[hwdec]
profile-desc="hardware acceleration, no cache, yt-dlp 1080 or less"
vo=gpu
hwdec=vaapi

# hide: GNOME's wayland compositor lacks support for the idle inhibit protocol.
#msg-level=ffmpeg=fatal,vo/gpu/wayland=no
msg-level=ffmpeg=fatal

# cache no for internet streams
cache=no

# yt-dlp best format 1080 or less
ytdl-format="bestvideo[height<=?1080]+bestaudio/best"

# show milliseconds in the on screen display
osd-fractions

# audio device
audio-device=oss//dev/dsp1

# youtube subs - J to switch to subs
sub-auto=fuzzy
ytdl-raw-options=sub-lang="en",write-sub=,write-auto-sub=
sub-font='NotoColorEmoji'

# screenshot timecode
screenshot-template="%F-[%P]v%#01n"


# cache profile: mpv --profile=cache
[cache]
profile-desc="hardware acceleration, cache, yt-dlp 1080 or less"
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=auto


# youtube conditional auto profile match any youtube url
[youtube]
profile-desc="youtube hardware acceleration, cache"
profile-cond=path:find('youtu%.?be') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=HDMI-A-1


# invidious conditional auto profile match any youtube url
[invidious]
profile-desc="invidious hardware acceleration, cache"
profile-cond=path:find('http://127.0.0.1:3000') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=HDMI-A-1


# archive.org conditional auto profile match any archive.org url
[archive]
profile-desc="archive hardware acceleration, cache"
profile-cond=path:find('archive.org') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=auto
# fullscreen 2nd display
fs
fs-screen-name=HDMI-A-1


# bbc iplayer conditional auto profile match any bbc iplayer url
[iplayer]
profile-desc="iplayer hardware acceleration, cache"
profile-cond=path:find('bbc.co.uk/iplayer') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=HDMI-A-1


# bbc iplayer conditional auto profile match any bbc iplayer url
[bbc]
profile-desc="bbc hardware acceleration, cache"
profile-cond=path:find('bbc:pips:service') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=HDMI-A-1


I've also changed DP-3 with HDMI-A-1 in the config file below :

Code:

# nano /usr/home/marietto/.config/wlr-which-key/config.yaml

# Theming
font: Fira Code 18
background: "#282828d0"
color: "#fbf1c7"
border: "#005577"
separator: " ➜ "
border_width: 2
corner_r: 10
padding: 15 # Defaults to corner_r

# Anchor and margin
anchor: center # One of center, left, right, top, bottom, bottom-left, top-left, etc.
# Only relevant when anchor is not center
margin_right: 0
margin_bottom: 0
margin_left: 0
margin_top: 0

menu:
  "w":
    desc: general
    submenu:
      "m": { desc: mpv, cmd: ts mpv "$(wl-paste)" 1>/dev/null }
      "p": { desc: pinch, cmd: pinch -i "$(wl-paste)" }
      "y": { desc: yt-dlp, cmd: ts yt-dlp "$(wl-paste)" -o "$HOME/downloads/%(title)s.%(ext)s" }
  "s":
    desc: screenshot
    submenu:
      "l": { desc: laptop, cmd: grim -o HDMI-A-1 }
      "m": { desc: monitor, cmd: grim -o HDMI-A-1 }
      "b": { desc: both, cmd: grim }
  "e":
    desc: emacs
    submenu:
      "m": { desc: mpv, cmd: emacsclient -cF "((visibility . nil))" -e "(mpv-play-clipboard)" }
  "o":
    desc: obs
    submenu:
      "h": { desc: laptop, cmd: obs-cmd scene switch laptop }
      "j": { desc: monitor, cmd: obs-cmd scene switch monitor }
      "k": { desc: both, cmd: obs-cmd scene switch both }
      "l": { desc: ffmpeg, cmd: obs-cmd scene switch ffmpeg }
      "r": { desc: record, cmd: obs-cmd recording toggle }

I've used HDMI-A-1 because the log says that my screen is connected to the port HDMI-A-1. This is also what I did :

# git clone https://github.com/WayfireWM/wf-shell && cd wf-shell
# meson build --prefix=/usr/local --buildtype=release
# ninja -C build && sudo ninja -C build install
# mv /usr/home/marietto/Scaricati/wf-shell/wf-shell.ini /usr/home/marietto/Scaricati/wf-shell/wf-shell_.ini
# cp /usr/home/marietto/Scaricati/wf-shell/wf-shell.ini.example /usr/home/marietto/Scaricati/wf-shell/wf-shell.ini

wf-shell appeared,but my mouse does not work,I can't use wcm to configure the panel if the mouse does not move ; internet connection also does not work. This is the log file :

https://pastebin.ubuntu.com/p/tyyrcHHBYR/

@ammen99
Copy link
Member

ammen99 commented Mar 5, 2024

@Marietto2008 for the mouse issue, are you sure that the mouse does not work at all? Maybe it is simply invisible: https://github.com/WayfireWM/wayfire/wiki/FAQ#2-the-mouse-cursor-is-invisible

For the internet connection, you need to have NetworkManager, that's currently the only supported backend by wf-panel.

I suppose that the issue that you had with the git build is that you had configured the wrong output. Anyway, if you decide you to go back to the -git build, you may also need to compile wayfire-plugins-extra-git where some of the plugins are located (like follow-focus).

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 5, 2024

Bingo. My mouse works now. This is the start script which works good :

#!/usr/local/bin/zsh
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire

the last problems : the keyboard mapping is the english one,but I would like the italian. And the wf-shell is on top of the screen,I would like to have it at the bottom.

@ammen99
Copy link
Member

ammen99 commented Mar 5, 2024

And the wf-shell is on top of the screen,I would like to have it at the bottom.

Take a look at wf-shell's config file :) By default, ~/.config/wf-shell.ini. It has the option you need.

the last problem : the keyboard mapping is the english one,but I would like the italian.

For input to the applications, you can set the xkb_* options, take a look at https://github.com/WayfireWM/wayfire/wiki/Tutorial#setting-your-keyboard-layout

For the compositor shortcuts (things like alt-tab, KEY_E to toggle expo, etc) they are defined according to the hardware keyboard layout (which usually is english, QWERTY) - but you can rebind them in the config file.

@Marietto2008
Copy link
Author

Im trying to configure wayfire using the wayfire config manager,but I see that the changes I made don-t stick. Do you know why ?

@ammen99
Copy link
Member

ammen99 commented Mar 5, 2024

Im trying to configure wayfire using the wayfire config manager,but I see that the changes I made don-t stick. Do you know why ?

Which changes? Output layout changes are done with an external tool and they won't survive a compositor restart. The rest should actually be written to the config file .. You can try and manually inspect the config file(s) to see what is being written to them.

@Marietto2008
Copy link
Author

Marietto2008 commented Mar 5, 2024

Im trying to change the keyboard layout from us to it. Ive changed a lot of parameters,but the keyboard mapping is still configured as us. Can you tell me what-s the exact parameters to change please ? thanks.

This is what I did :

nano /home/marietto/.config/wayfire.ini

[input]
xkb_layout = it
xkb_variant = dvorak,bepo

nope,this does not work. The keyboard mapping is still configured as us.

@ammen99
Copy link
Member

ammen99 commented Mar 5, 2024

Closing as the remaining issue is tracked in #2178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants