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

Need much more investigation, but currently Wayfire is running on newly created user, with primary group is operator and belongs to wheel, video, realtime and some more.
Unfortunately, I've not succeeded to use Japanese input method, and strange remnants are left on command line after closing Wayfire. And more, mouse cursor doesn't appear (actually working, as excessvely moving to top-left causes the menu button to react) unless mag plugin is in active.
Another thing to investigate is how it goes if I create another new account with primary group is wheel and belongs to other groups needed.
It would demonstrate whether primary GID=0(wheel) itself is the problem or not.
 
I've reinstalled wayland / wayfire 0.9 from git on my main system. I'm using the nvidia driver version 535.146.02 and it can be launched,so it is not needed to install the nvidia driver 550. Anyway,actually I'm trying to fix a new incisive bug :

Code:
[src/output/render-manager.cpp:343] output test failed !

when I press CTRL + F1 I see a lot of those messages ; all these messages make the system anymore responsive and an hard reset is required. They prevents some programs installed on the system to work properly. I don't know if this error is related to another error that I see and that I'm not able to fix :

Code:
set class "me" resource limit memorylocked : operation not permitted.

I see these errors even on the old system running with the nvidia driver 550,so they are not related with it. On the system where I have reinstalled wayfire I haven't added myself on the video group but wayfire starts anyway. Wayfire is running on my old user marietto,primary group is not operator and it does not belongs to wheel, video, realtime and I haven't modified /etc/devfs.rules as follows :

Code:
nano /etc/devfs.rules :
   
add path 'dri/*' mode 0666 group video
add path 'drm/*' mode 0666 group video

This message is also intriguing :

Code:
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  535.146.02  Sun Dec  3 13:40:40 UTC 2023
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
 
realtime is not needed for wayland
i use it with jack and obs studio

you want you user to be in the wheel and video groups

In addition, users of Wayland will need to be members of the video group.

Code:
pw groupmod video -m user
 
Did you understand that in the old system I did that but the errors that I'm talking about now are present even there ? Anyway,ok,I want to do it also on the new system.
 
memory unlocked

Code:
vi ~/.login_conf

~/.login_conf[

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

did you run cap_mkdb

Code:
cap_mkdb ~/.login_conf

also you dont need anything for video set in /etc/devfs.rules
 
I did what you have suggested on the old system,but it didn't fix the problems that I have explained. Anyway I will do it again on the system that I'm running now.
 
---> also you dont need anything for video set in /etc/devfs.rules

on the old system it was needed. I see a lot of contraddictory informations which belongs to the installation of Wayfire. Anyway very thanks for all the help that you give.
 
the things you need to set up are the XDG_RUNTIME_DIR
and adding yourself to the video group and then rebooting

then check the XDG_RUNTIME_DIR is set

Code:
echo "${XDG_RUNTIME_DIR}"

and that your are in the video group

Code:
groups

djwilcox wheel operator video

if you arent in the video group and dont have the xdg directory set up
then you wont be able to play videos with mpv with hardware acceleration
 
The wayfire developers told that I don't need to set up are the XDG_RUNTIME_DIR if I use LIBSEAT_BACKEND=consolekit2 because this new setting is able to copy the content of the dir "/var/run/user/1001" ; instead,this directory is not present when xfce4 or whatever other dm is not running ; if it is not there,the $XDG_RUNTIME_DIR variable wil be empty. I told this so many times. Infact I don't use your setting but I'm able to launch wayfire. But to try to add myself on the operator group is an interesting setting to try.
 
I think that we have troubles understanding each other. I want to reapeat the concept one more time. Wayfire does not work if xfce4 is running. But the content of the dir /var/run/user/1001 is present only when xfce4 is running. Wayfire works only when xfce4 is not running. But if it does not run,the dir /var/run/user/1001 is not there. If it is not there,we can't do :

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

This problem is fixed using LIBSEAT_BACKEND=consolekit2. This parameter avoid to copy the content of /var/run/user/1001 manually. Is what I'm trying to explain,clear for you ? I would like to have an answer to this question,because I see that you repeated several time the same things. We are going around in circles. What I say here is not my discovery, but it's the result of multiple discussions that I'm having with the developers. Should we trust them ?
 
Wayfire does not work if xfce4 is running

You wont be able to run xfce and wayfire at the same time

But the content of the dir /var/run/user/1001 is present only when xfce4 is running

thats why you have to create the directory first and then export it

What I say here is not my discovery, but it's the result of multiple discussions that I'm having with the developers. Should we trust them ?

I doubt they even use Freebsd
so i would rather trust the documentation written by the Freebsd team in the handbook
 
And another thing to mention.
While googling (sorry, not kept many of theie links), some states "users must be a member of group 'input'", but some do not.

The mentioned 'input' group seems to be specific for distros having systemd and I cannot find what the GID (numeric) of it.

Even on Linux world, something to make confusing another something occurs. So does for FreeBSD, surely. Possibly, for example, different GPU vendor could confuse something, or worse, different generations of GPUs by same vendor could confuse, too.

Of course, FreeBSD doesn't have group 'input', neither by default (in base) nor even in /usr/ports/GIDs.

This is one of the reason why I've asked whether or not it is the culprit to set the owner of /var/run/users/* as non-existent group in my old post.
 
thats why you have to create the directory first and then export it

I don't need to do this because the parameter suggested by the wayfire developers works,probably, at the same way. I want to remember that wayfire is able to start for me,with the parameters suggested. I also think that the new problem I have has a different origin.
 
I made some changes to the system,because I think that's the only chance I have to make everything work. I made these changes :


  1. I've installed the nvidia driver 550.54.14
  2. I've installed the wayland protocols 1.33 in /opt/wayfire
  3. I've upgraded again all the packages on FreeBSD,including some minor packages useful for sway

What happened ? this :

Code:
[src/main.cpp:334] Starting wayfire version 0.9.0
[libseat] [libseat/libseat.c:66] Seat opened with backend 'consolekit2'
[libseat] [libseat/backend/consolekit2.c:92] Ping failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=1001 pid=4931 comm="wayfire") interface="org.freedesktop.DBus.Peer" member="Ping" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=4895 comm="/usr/local/sbin/console-kit-daemon --no-daemon")
[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:60] PRIME import not supported
[backend/backend.c:221] Failed to create DRM backend
[backend/backend.c:232] Could not successfully create backend on any GPU
[backend/backend.c:376] Failed to open any DRM device
[src/main.cpp:131] Fatal error: Segmentation fault
#1  0x36b365 <_ZL14signal_handleri+0xb5> at /opt/wayfire/bin/wayfire
#2  0x83861753f <pthread_sigmask+0x53f> at /lib/libthr.so.3
#3  0x838616afb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
#4  0x8207ab2d3 <__gxx_personality_v0+0x8203788d3> at ???
#5  0x821c361d4 <wlr_backend_get_drm_fd+0x4> at /opt/wayfire/lib//libwlroots.so.12
#6  0x36a443 <main+0x423> at /opt/wayfire/bin/wayfire
#7  0x82be97afa <__libc_start1+0x12a> at /lib/libc.so.7

Do you know how to fix this new error ? I won't surrend. This error happens even if I try to run sway using the same startup script :


Code:
#!/usr/local/bin/zsh
export LD_LIBRARY_PATH=/opt/wayfire/lib/$libdir
export PATH=/opt/wayfire/bin:$PATH
# export XDG_RUNTIME_DIR="/var/run/user/`id -u`"
# env WLR_DRM_NO_MODIFIERS=1
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session sway

I suspect that I should enable,in some way,PRIME on rc.conf or loader.conf ? how ? Oh my god,I found this tutorial :


it does not seems to be so easy.
 
I'm not sure if it is outdated. …

Sorry! I just noticed, the [UPDATE], which (based on Wayback Machine captures) appeared some time between 2023-09-23 and 2024-02-27I'll ask when it was added "Christmas ish 2023" <https://discord.com/channels/727023752348434432/760416197803245591/1216412230468501605>.

… it does not seems to be so easy.

The current text of the two paragraphs below the [UPDATE] subheading:



The nvidia-drm-kmod port is now in the FreeBSD ports tree! Below covers how the autoconfiguration works, but these files are actually installed by the nvidia-drm-kmod port and others. In most cases things should "just work" with minimal manual configuration, if any.

Simply load the nvidia-drm.ko kernel module, delete your xorg.conf, and start your X server. The rest of this now serves as a guide to help you in any troubleshooting that is needed.



I guess, the simplifications were largely X-specific.
 
startup script issues

Code:
#!/usr/local/bin/zsh

you should be using sh for scripts really

Code:
#!/bin/sh

opt directory

Code:
export LD_LIBRARY_PATH=/opt/wayfire/lib/$libdir

the opt directory is part of the linux filesystem
and not the unix filesystem

$libdir isnt set in the script and wont do anything unless its exported in your shell config
system variables are uppercased such as HOME or DISPLAY

path

Code:
export PATH=/opt/wayfire/bin:$PATH

thats not how you set the path on zsh
and the path should be set in the zshenv file and not a script

env

Code:
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session sway

export is used to export variables and not env
 
dbus errors

org.freedesktop.DBus.Error.AccessDenied:

dbus needs to be enabled in your /etc/rc.conf

Code:
dbus_enable="YES"

you need to create the XDG_RUNTIME_DIR directory

Code:
sudo chmod 700 user/"$(id -u)"
sudo chown -R "${USER}":wheel /var/run/user/"$(id -u)"
sudo chmod 700 /var/run/user/"$(id -u)"

add yourself to the video group

Code:
pw groupmod video -m user
start wayfire with dbus

Code:
#!/bin/sh

# start wayfire with dbus
exec dbus-launch --exit-with-session wayfire

printenv should list dbus

Code:
printenv

Code:
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-a314vRjDMa,guid=8b866f7176f4f4871850655765edbc1f

if dbus isnt showing up
you can run dbus-uuidgen and redirect the output to /etc/machine-id

Code:
sudo dbus-uuidgen > /etc/machine-id
 
Back
Top