amshafer / nvidia-driver

Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
43 stars 5 forks source link

Wayland not working #23

Open h-2 opened 3 months ago

h-2 commented 3 months ago

I think that I installed all the right things:

# pkg info | grep 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-515-kmod-550.54.14  NVIDIA DRM Kernel Module
nvidia-drm-kmod-550.54.14      NVIDIA DRM Kernel Module
nvidia-settings-535.146.02     Display Control Panel for X NVidia driver
# dmesg | grep drm
[drm] [nvidia-drm] [GPU ID 0x00000a00] Loading driver
[drm] Initialized nvidia-drm 0.0.0 20160202 for nvidia0 on minor 0
# kldstat | grep drm
16    1 0xffffffff83684000    108f0 nvidia-drm.ko
17 1 0xffffffff83695000 7c050 drm.ko
# lh /dev/dri
lrw-rw-rw-  8 root 10 Mar 22:13  card0 -> ../drm/0
lrw-rw-rw- 10 root 10 Mar 22:13  renderD128 -> ../drm/128

But if I try to start a wayland session, e.g. plasma-wayland, it doesn't work:

No backend specified, automatically choosing drm
kwin_core: Could not determine the active graphical session
kwin_wayland_drm: failed to open drm device at "/dev/dri/card0"
kwin_wayland_drm: No suitable DRM devices have been found

Am I missing something?

Thanks for your help!

amshafer commented 3 months ago

As of 550 you need to set hw.nvidiadrm.modeset=1 in /boot/loader.conf. Did you do this step?

Note that there are also a few outstanding issues with the pkg, so you might want to build from ports if you haven't already. That's mostly for multigpu setups so that might not affect you.

h-2 commented 3 months ago

Thanks for the quick reply!

As of 550 you need to set hw.nvidiadrm.modeset=1 in /boot/loader.conf. Did you do this step?

Yes, I have that!

Note that there are also a few outstanding issues with the pkg, so you might want to build from ports if you haven't already. That's mostly for multigpu setups so that might not affect you.

I'll give it a try, although, as you said, I don't have a multi-gpu setup.

amshafer commented 3 months ago

You're trying kwin wayland? Is that even supported on FreeBSD? Last I heard it was not stable and was a WIP?

You'll have to share dmesg/logs/etc for me to know what's going wrong.

h-2 commented 3 months ago

You're trying kwin wayland? Is that even supported on FreeBSD? Last I heard it was not stable and was a WIP?

I didn't know kwin-wayland was problematic :o I am actually aiming for sway, but I had thought that Kwin was the more established thing, so I did my experimenting with that.

I will give sway a try, and report back!