starting wayland (wayfire) fails using nvidia card [Found 0 GPUS]

I found 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 :

Code:
[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:

Maybe NapoleonWils0n can help.
 
I decided to install graphics/nvidia-drm-kmod (pulls in graphics/nvidia-drm-515-kmod and graphics/drm-515-kmod on stable/14) and started trying.
The problem happens on me, too.

Set hw.nvidiadrm.modeset=1 in /boot/loader.conf.

The order of loaded kernel module possibly related are as follows.
Note that below is while I'm trying to load i915kms module to determine if it helps for DRI3 problem (iGPU is disabled by BIOS, though) or not, without luck.

35 1 0xffffffff83f50000 1b4920 i915kms.ko
36 3 0xffffffff84105000 7c050 drm.ko
38 3 0xffffffff84185000 3080 linuxkpi_hdmi.ko
39 4 0xffffffff84189000 6350 dmabuf.ko
40 3 0xffffffff84190000 3378 lindebugfs.ko
41 1 0xffffffff84194000 b360 ttm.ko
42 1 0xffffffff841a0000 108f0 nvidia-drm.ko
43 2 0xffffffff84200000 3118000 nvidia.ko
44 2 0xffffffff841b1000 30a60 linux.ko
45 6 0xffffffff841e2000 c2a8 linux_common.ko
46 1 0xffffffff87318000 125678 nvidia-modeset.ko
47 1 0xffffffff841ef000 4388 acpi_video.ko
60 1 0xffffffff874f7000 2cdf8 linux64.ko

As if_iwlwifi.ko (not shown above) is loaded between acpi_video.ko and linux64.ko, linux64.ko could be auto-loaded by if_iwlwifi.ko if so, adding linux64.ko in kld_list could help.

By the way, I found hw.nvidiadrm.fbdev tunable, default and actual are 0.

% sysctl -d hw.nvidiadrm.fbdev
hw.nvidiadrm.fbdev: Enable atomic kernel modesetting (1 = enable, 0 = disable (default))

Is it needed to set this 1, too?

Edit: What doesn't work is x11-wm/wayfire, x11/mate is running fine as usual.
 
Since I'm getting this error :
Code:
[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

I have opened a bug ticket on the wayfire github. You can read what the developers are saying :


btw at the moment I don't understand how to fix the error.
I don't have github account and currently not having any plan to register there, so replying here. (Can read, but cannot reply.)

x11/nvidia-driver has gbm libraries since 525.89.02.
Not sure it's actually working or not, as me too failing to start x11-wm/wayland.
 
Setting hw.nvidiadrm.fbdev=1 in /boot/loader.conf in conjunction with hw.nvidiadrm.modeset=1 caused crash on boot. As the latter is required, the former alone is not tested.
Sorry, no log nor photo available.
 
This is my loader.conf :

Code:
vmm_load="YES"
nmdm_load="YES"
if_tap_load="YES"
if_bridge_load="YES"
bridgestp_load="YES"
fusefs_load="YES"
verbose_loading="YES"
pptdevs="2/0/0 2/0/1 2/0/2 2/0/3"
kern.geom.label.gptid.enable="0"
kern.racct.enable="1"
kern.vty=vt
autoboot_delay="5"
kern.cam.scsi_delay="10000"
aesni_load="YES"
geom_eli_load="YES"
security.bsd.allow_destructive_dtrace=0
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
nullfs_load="YES"
tmpfs_load="YES"
snd_hda_load="YES"
snd_uaudio_load="YES"
acpi_video_load="YES"
coretemp_load="YES"
wsp_load="YES"
aio_load="YES"
cuse_load="YES"
virtual_oss_enable="NO"
sysctlinfo_load="YES"
sysctlbyname_improved_load="YES"
usbhid_load="YES"
net.fibs=2
net.add_addr_allfibs=0
hw.nvidiadrm.modeset=1

I don't have any hw.nvidiadrm.fbdev=1 on the loader.conf ;

The kernel modules should be loaded in this order :

Code:
#kldstat                  

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

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

maybe it is because I tried to run the wayfire.sh script as root ? I'm not sure.
 
I Forgot to say that I've upgraded wayfire from 0.8.0 to 0.9.0,as suggested by the developers of wayfire. It could be relevant. So :

Code:
# git clone https://github.com/WayfireWM/wayfire.git
# cd wayfire
# meson build
# ninja -C build
# sudo ninja -C build install
 
Wayfire takes about 5 minutes to install if you follow the handbook


Code:
pw groupmod video -m user

Code:
# pkg install wayland seatd

Code:
export XDG_RUNTIME_DIR=/var/run/user/`id -u`

/etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm linux linux64 i915kms"
# wayland
seatd_enable="YES"
# dbus
dbus_enable="YES"

packages
Code:
# pkg install wayfire wf-shell alacritty swaylock-effects swayidle wlogout kanshi mako wlsunset

config
Code:
% mkdir ~/.config/wayfire
% cp /usr/local/share/examples/wayfire/wayfire.ini ~/.config/wayfire

start wayfire

Code:
exec dbus-launch --exit-with-session wayfire
 
Wayfire takes about 5 minutes to install if you follow the handbook


Code:
pw groupmod video -m user

Code:
# pkg install wayland seatd

Code:
export XDG_RUNTIME_DIR=/var/run/user/`id -u`

/etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm linux linux64 i915kms"
# wayland
seatd_enable="YES"
# dbus
dbus_enable="YES"

packages
Code:
# pkg install wayfire wf-shell alacritty swaylock-effects swayidle wlogout kanshi mako wlsunset

config
Code:
% mkdir ~/.config/wayfire
% cp /usr/local/share/examples/wayfire/wayfire.ini ~/.config/wayfire

start wayfire

Code:
exec dbus-launch --exit-with-session wayfire

Don't you realize that sometimes even following the handbook is not a warranty to be able to reach the goal ? Do you see how many users aren't able to run Wayland with a good compositor successfully ? Don't you think that all those users have read the handbook already,but for some reason,for some different problems,it does not work for them ? You make it too easy. You believe too much in the holy handbook. Take also in consideration that it is not always updated. To be able to achieve a goal is essential to read from more sources and to use the scientific method.
 
check you are in the video group

Code:
groups

djwilcox wheel operator video realtime

check the XDG_RUNTIME_DIR is set up

Code:
echo "$XDG_RUNTIME_DIR"

/var/run/user/1001

check seatd has started

Code:
sudo service seatd status

seatd is running as pid 77145.

/etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm linux linux64 i915kms"

i have only been back on Freebsd for 2 and half months after a 3 year absence

following the handbook it took me 5 minutes to install Wayfire on a Macbook air 2011
and after watching RoboNuggies video another 5 minutes to install Wayfire on a Dell Xps 15
 
following the handbook it took me 5 minutes to install Wayfire on a Macbook air 2011

you are talking about YOUR machine and your situation only. I would like to invite you to "see" all around you. You are not alone. There aren't stupid users all around you,I see experienced users who RTFM everyday who aren't able yet to make everything work as it should be. What are suggesting this to you ?
 
Regarding me,Im close to run Wayland + wayfire,but not yet. This is what happens when I run the wayfire-start script :

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

as user :

 
Regarding me,Im close to run Wayland + wayfire,but not yet. This is what happens when I run the wayfire-start script :

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

as user :

What filesystem are you using on /var/run ?
There is some locking issue on it according to your logs.
Maybe you have a permission issue on /var/run/user/1001 ?
 
Back
Top