Solved Wayland and NVidia February 2024

I've gotten a bit confused. Searching forums and the the various documentation is not making it clear. Can one, in theory at least, use Wayland with just packages or is it still necessary to build the port as described on github?

If one installs nvidia-drm-kmod, which one? I use the nvidia-535 driver--do I want the nvidia-drm-kmod-535 or the drm-515, or the drm-510. If I'm trying wayland with this, do I kldunload the nvidia and nvidia-modset modules that I have loaded?
Is there anywhere where this is documented? Or would someone who has had success share their method?

Or, is the only way to do it the way in the link above, build nvidia from source?
Does one have to enable linux in /etc/rc.conf?

If there is documentation, would someone point me to it? (Assuming there's something more current than the github link mentioned above).

Currently, just using my existing NVidia driver, which according to the handbook, should probably work, I just get an error. Handbook article at https://docs.freebsd.org/en/books/handbook/wayland/)

The error, aside from some openbox things in my rc.xml that labwc doesn't support is
00:00:10.035 [ERROR] [backend/backend.c:210] Found 0 GPUs, cannot create backend 00:00:10.035 [ERROR] [backend/backend.c:376] Failed to open any DRM device 00:00:10.037 [ERROR] [../src/server.c:256] unable to create backend Some friendly trouble-shooting help =================================== If a seat could not be created, this may be caused by lack of permission to the seat, input and video groups. If you are using a systemd setup, try installing polkit (sometimes called policykit-1). For other setups, search your OS/Distro's documentation on how to use seatd, elogind or similar. This is likely to involve manually adding users to groups.

I'm in the video group. There is no seat group

If the above does not work, try running with `WLR_RENDERER=pixman labwc` in
order to use the software rendering fallback

Running the suggested WLR etc. does no good. I'm guessing it has to do with the found 0 GPUs but don't have enough knowledge to know.
 
Well, I'd seen that, but it still wasn't clear to me. However, with some trial and error, I did get it working, though the mouse disappears. I'll have to update my own wayland page.

I have both nvdia-drm-510-kmod-535 and nvida-drm-kmod-535 installed, So, I'm not sure which gets called, but anyway, in /etc/rc.conf I added
kld_list="nvidia-drm"
I left my /boot/loader.conf alone. It had the line
nvidia-modset_load="YES"
I have that one set to enable my usual xorg with NVidia.
Anyway, adding the rc.conf line to load nvidia-drm did the trick.

So, I've marked this solved. Now that I've gotten it working, I've found that I really do prefer xorg. I have my $HOME/.Xdefaults set up just the way I like it, and while labwc isn't horrible, it's just not as good (for my needs). Plus the mouse issue, which I suspect I'll find a solution with a bit of effort. But the big problem was that I couldn't start it with NVidia, and I fixed that. What had confused me about ashafer's post was that I wasn't clear if one could just add the drm from pkg and have it work. I guess I never tried, or perhaps tried some time ago, but, at any rate, now I know it can work with packages, not needing a port.

With these settings I can either call labwc or do startx without having to change anything.
 
Back
Top