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

make sure to install xdg-desktop-portal-wlr

it used with the file picker in things like Firefox
when you need to select a file with Firefox to upload to a web site

Code:
sudo pkg install xdg-desktop-portal-wlr
 
you can use grim and slurp with wlr-which-key

Code:
~/.config/wlr-which-key/config.yaml

change eDP-1 and DP-3 to the name of your displays

Code:
# 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:
  "s":
    desc: screenshot
    submenu:
      "l": { desc: laptop, cmd: grim -o eDP-1 }
      "m": { desc: monitor, cmd: grim -o DP-3 }
      "b": { desc: both, cmd: grim }
      "s": { desc: slurp, cmd: -g "$(slurp)" }

you also want to install kanshi to configure your monitors

Code:
sudo pkg install kanshi
 
So those of you with wayland working on Nvidia, are you using an iGPU that has an unused Nvidia card? My systems have a single Nvidia GPU, no APU or iGPU available, and none of them work following the handbook with Wayland. Perhaps there are some steps that need to be updated for Nvidia in the handbook? I have tried some of the suggestions here but none of them have resulted in Wayland working on Nvidia.

EDIT: I should also note that following the handbook results in Wayland working with my Intel/AMD APU/Radeon systems. The only systems that fail work work have a dedicated Nvidia GPU.
 
So those of you with wayland working on Nvidia, are you using an iGPU that has an unused Nvidia card? My systems have a single Nvidia GPU, no APU or iGPU available, and none of them work following the handbook with Wayland. Perhaps there are some steps that need to be updated for Nvidia in the handbook? I have tried some of the suggestions here but none of them have resulted in Wayland working on Nvidia.

EDIT: I should also note that following the handbook results in Wayland working with my Intel/AMD APU/Radeon systems. The only systems that fail work work have a dedicated Nvidia GPU.
Wayland on a single Nvidia card (no iGPU) works perfect for me.
 
So those of you with wayland working on Nvidia, are you using an iGPU that has an unused Nvidia card? My systems have a single Nvidia GPU, no APU or iGPU available, and none of them work following the handbook with Wayland. Perhaps there are some steps that need to be updated for Nvidia in the handbook? I have tried some of the suggestions here but none of them have resulted in Wayland working on Nvidia.

EDIT: I should also note that following the handbook results in Wayland working with my Intel/AMD APU/Radeon systems. The only systems that fail work work have a dedicated Nvidia GPU.

You have touched the heart of the matter. I have two FreeBSD 14 installations. I state that my PC has 3 gpus.

1) Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]
2) Nvidia GTX 1060
3) Nvidia RTX 2080ti

On the first FreeBSD 14 system I've chosen as the main GPU the Geforce GTX 1060 and the RTX 2080 ti is reserved for the Linux virtual machines where I make the passthru ; the Intel gpu is not even shown on the system. With this setup,Wayland / Wayfire works. On the secondary installation I have chosen the Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] as main GPU ; the GTX 1060 is secondary and the RTX 2080 it is reserved for the bhyve / Linux vms. Even here it works.

Now,probably I have configured wayland / wayfire in a different way on the secondary FreeBSD 14 installation,because although at the beginning I used the same GPU setup of the system 1 (main GPU Geforce GTX 1060 ; RTX 2080 ti reserved for Linux and Intel gpu not shown by the system),at some point it stopped working. I don't know what I have changed. The fact is that I got this error message :

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

and I had to change GPU setup. I had to chosen the Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] as main GPU ; the GTX 1060 as secondary and the RTX 2080 reserved for Linux. I'm really interested to understand what's the parameters which forced me to change the layout of the GPUs. I will ask this on the wayland forum. Based on the error :

Code:
#5  0x821c361d4 <wlr_backend_get_drm_fd+0x4> at /opt/wayfire/lib//libwlroots.so.12

it seems that it could be "wlroots". Maybe using a new version of wlroots as I did,something is changed and it started to refuse to work on the gpu setup that I've used on the system 1. Point is that for me is more comfortable to keep the nvidia gpu 1060 as primary and the rtx 2080 ti reserved and I don't need the intel integrated gpu.
 
what you could do to test if its the new version of wlroots that causing the issue
is to comment out the section of your wayfire startup that uses wlroots installed in /opt

and make sure you have the freebsd package for wlroots installed
then the script should use the wlroots freebsd package instead of the version in /opt

i would also try setting one of the nvidia gpus as the main gpu instead of intel

that way you can narrow down where the issue is
 
So those of you with wayland working on Nvidia, are you using an iGPU that has an unused Nvidia card?
I physically have iGPU in CoffeeLake CPU and nvidia Quadro P1000 dGPU.
The iGPU is disabled on UEFI firmware configuration and does not appear on dmesg, so using only dGPU.
Wayfire looks mostly working for a user whose primary group is operator and member of wheel, video and some others that any of software installed requires. See what happenes in my former posts.
Doesn't work for long-standing user whose primary group is wheel. But this would be re-considered by trying newly created user. If it fails, belonging primarily to wheel is the problem, if it goes OK, something in long-standing user is causing Wayfire failing to start with "Unable to drop root" issue.
 
This is the reply of the developer :

This points to wlroots here. You can see the DRM_CAP_PRIME value with a tool such as drm_info and compare with the value of DRM_PRIME_CAP_IMPORT. Basically, if DRM_CAP_PRIME is an even number, there is no support for DRM_PRIME_CAP_IMPORT, so the error is thrown.

According to the DRM_PRIME_CAP_IMPORT documentation:

"Starting from kernel version 6.6, this bit is always set in DRM_CAP_PRIME."
So I would guess your kernel is not up to date or the bits haven't been ported to your OS kernel yet.

So,now I've installed the tool called "drm_info" and I'm going to run it on both the two installations of FreeBSD 14 that I have,to see the differences,with the goal to understand what changes from one to another. He says that the kernel is not up to date. But this could be valid for Linux,but here we are using FreeBSD. And I'm using the same FreeBSD version and kernel for both the installations. So the reason must be different : my guess is that I've installed a version of wlroots that's too new and maybe not compatible with some component of FreeBSD.
 
apart from hikari all the wlroots compositors are build for linux

thats why we have freebsd packages and ports
because the software has to be ported to work on freebsd

have you also installed nvidia-drm-515-kmod

Code:
sudo pkg install nvidia-drm-515-kmod

and added it to your kld list in /etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm"
 
apart from hikari all the wlroots compositors are build for linux

thats why we have freebsd packages and ports
because the software has to be ported to work on freebsd

have you also installed nvidia-drm-515-kmod

Code:
sudo pkg install nvidia-drm-515-kmod

and added it to your kld list in /etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm"

In both the installations I've installed the nvidia-drm-515-kmod-550.54.14 package.
 
I find also interesting to see what happens if I remove these lines from the startup script,since I have two wayland / wayfire installations on the system. The first one is on /usr/local and the secondary on /opt/wayfire :

Code:
#export LD_LIBRARY_PATH=/opt/wayfire/lib/$libdir
#export PATH=/opt/wayfire/bin:$PATH
#export PKG_CONFIG_PATH=/opt/wayfire/share/pkgconfig:/opt/wayfire/libdata/pkgconfig
 
I've tried all the suggestions. I have verify wayland/wayfire is not working with the GTX 1070 for certain. I've not tried these suggestions on any other Nvidia card.
 
I solved the mistery. On the system where the error is "PRIME import not supported" I have installed the nvidia drivers from packages ; in this scenario I'm forced to keep the Intel GPU as primary if I want to run Wayland / Wayfire. On the system where I have installed the nvidia drivers from ports wayland / wayfire work also if I choose to have the GPU nvidia 1060 as primary. So,don't install the nvidia drivers from packages. (in both the systems I have installed the nvidia drivers vers. 550). I'm pretty sure of this,because both systems have the nvidia-drm.ko file of different size. So,choosing to install the nvidia drivers (or only the nvidia-drm-kmod file ?) from packages or from ports make the difference. Honestly I don't remember if when I have installed the nvidia-drivers from ports I have chosen or not to enable the PRIME option (if it is there).

At this point maybe a full detailed tutorial is appreciated by someone ?
 
Back
Top