Still can't get Wayland working with NVidia.

I had Wayland working with NVidia for while, then it stopped. I've pretty much followed the handbook.

Installed wayland and seatd. Then I installed labwc and dwl. They pulled in other things like wl-roots, I don't remember exactly.
pciconf -lv shows
GP108 [GeForce GT 1030]
XDG_RUNTIME_DIR is /run/user/$(id -u) set in my .bashrc.

I start the seatd service.

But when I try to start say dwl, I get the message
00:00:00.007 [ERROR] [backend/backend.c:210] Found 0 GPUs, cannot create backend 00:00:00.007 [ERROR] [backend/backend.c:376] Failed to open any DRM device couldn't create backend
I'm wondering if it's just my hardware, or if I'm missing something.

It's not too important to me, I much prefer X11, but I'd just like to be able to do it if I wanted.

EDIT: (forgot more NVidia information.

pkg info |grep -i nvidia gives me
nvidia-driver-550.54.14 nvidia-drm-515-kmod-550.54.14_1 nvidia-drm-kmod-550.54.14 nvidia-settings-535.146.02_1 nvidia-xconfig-525.116.04
and my /etc/rc.conf has
kld_list="nvidia-drm"
 
Hi Mate

Im running dwl on a Dell XPS 15 with an nvidia gpu

Freebsd 14.1 creates the XDG_RUNTIME_DIR and exports its location

So you dont need to export the XDG_RUNTIME_DIR in your shell config anymore
if your on Freebsd 14.1 comment out the XDG_RUNTIME_DIR in your ~/.bashrc

reboot and run

Code:
printenv

and you should see the xdg runtime dir is set

Code:
XDG_RUNTIME_DIR=/var/run/xdg/djwilcox

The location is /var/run/xdg/username
where username is your username

Code:
Yes Master ? sudo ls -l /var/run/xdg
Password:
total 17
drwx------  11 djwilcox djwilcox 17 10 Jul 23:04 djwilcox
[

This is my rc.conf

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

and i start dwl like

Code:
exec dbus-launch --exit-with-session dwl -s 'dwlb -font "monospace:size=16"'

the -s dwlb start the dwl bar

Code:
dwlb-s20240516                 Feature-complete bar for DWL

wayland packages

Code:
sudo pkg install wayland wayland-protocols seatd wlroots qt5ct qt5-wayland





 
My thanks to all who responded. NapoleonWils0n, unfortunately, it still didn't work though I tried with all your suggestions. But thanks for letting me know I don't have to set the XDG_RUNTIME_DIR variable. And yes it did show as you said it would , /var/run/xdg/<username>.
Alain De Vos, thanks for letting me know that it doesn't work for you either, it may be something with our hardware, though I haven't tried on Linux with NVidia.
As I said, it's more something I'd be interested
 
Having the XDG_RUNTIME_DIR automatically created and the location exported is really useful
a lot of people miss the step of setting it and exporting the location in their shell config

and then wonder why wayland isnt starting
 
i never noticed that pkg-message

i have nvidia-modeset in the rc.conf kld_list

maybe i should look at adding

Code:
hw.nvidiadrm.modeset=1

to

Code:
/boot/loader.conf

Code:
Yes Master ? sysctl hw.nvidiadrm
hw.nvidiadrm.fbdev: 0
hw.nvidiadrm.modeset: 0


cheers for pointing that out mate,
going to add to my loader.conf
 
I see that I never mentioned in this thread that I also tried adding the hw.nvidadrm.modeset=1 to /boot/loader.conf, but I did try that as well, probably in July when dandelion first mentioned it.
 
It seems to miss a pkg x11/linux-nvidia-libs:
Code:
~> pkg info|rg nvidia
linux-nvidia-libs-550.54.14    NVidia graphics libraries and programs (Linux version)
nvidia-driver-550.54.14        NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-drm-61-kmod-550.54.14_1 NVIDIA DRM Kernel Module
nvidia-drm-kmod-550.54.14      NVIDIA DRM Kernel Module
nvidia-settings-535.146.02_1   Display Control Panel for X NVidia driver
 
OP, what did you do between working and non-working states?
If you somehow updated kernel (regardless from src or via freebsd-update)?
If yes, did you rebuild all x11/nvidia-driver, graphics/nvidia-drm-515-kmod and graphics/drm515-kmod from ports?

Can you see the existnce of (at least) /dev/dri/card0?

If any kind of mis-matches exist (including with which src commit they were built), /dev/dri/ directory and its contents should not appear, thus not working.
 
T-Aoki, I did update packages. I don't really remember when this happened, I didn't post just after it happened, I posted probably a few weeks after it happened. I do have /dri/card0
I waited because a) it's not that important to me (so again, many thanks to all who have offered help for something that I'm not too worried about) and b) I figured that some update had broken it, so there would probably be an update to fix it, but after a couple of updates of various wayland related packages it still didn't work.

RhfUsQnPbC I just tried installing the linux-nvidia-libs but that didn't help. Thanks for the suggestion though.
 
If /dev/dri/card0 exists then may be it's not accessible by the current user: either not part of video group or lacking group read/write bits.
 
No, I'm definitely in the video group
Code:
ls -l /dev/dri/card0
lrwxr-xr-x  1 root wheel 8 Jul 27 11:22 /dev/dri/card0 -> ../drm/0

$ groups
scottro wheel video vboxusers
 
Code:
ls -l /dev/dri/card0
lrwxr-xr-x  1 root wheel 8 Jul 27 11:22 /dev/dri/card0 -> ../drm/0
But /dev/dri/card0 indeed doesn't have group write permissions. Furthermore, it is symlinked to /dev/drm/0, so it might be helpful to know the permissions there.
 
freebsd 14.1 p2 - wayland

my permissions

Code:
Yes Master ? ls -l /dev/dri/card0
lrwxr-xr-x  1 root wheel 8 29 Jul 17:13 /dev/dri/card0 -> ../drm/0

Code:
Yes Master ? ls -l /dev/drm/0
crw-rw----  1 root video 0xaa 29 Jul 17:13 /dev/drm/0
 
i did find this post on the forum

Thinks for you reply, I have solved this problem.

The reason is my intel integrated gpu has been disabled in bios. Opened it that all is ok.


dont know if that helps
 
I just tried to chown and while it gave me no error messages, it didn't change the ownership. It is still listed as
lrwxr-xr-x 1 root wheel 8 Jul 27 11:22 /dev/dri/card0 -> ../drm/0

I was able to chang permissions on /dev/drm/0
Code:
 ls -l /dev/drm/0
crwxrwxr-x  1 root video 0x66 Jul 27 11:22 /dev/drm/0

But still no luck with Wayland here. NapoleonWils0n that post doesn't seem relevant to my issue, but thanks for the suggestion.
adorno thank you for your suggestions as well. I do appreciate everyone who is offering possibilities to fix it.
 
Back
Top