GitHub - amshafer/nvidia-driver: Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux - amshafer/nvidia-driver
github.com
This is a port of Linux's nvidia-drm.ko that interfaces with the DRM subsystem. FreeBSD has a Linux kernel compatibility layer which nvidia-drm can be modified to run on. This repository packages the base FreeBSD driver files with the Linux driver's nvidia-drm source files (with FreeBSD patches applied). The resulting driver can be found in the nvidia subdirectory.
The most important use case of this is Wayland compositors. Namely, a sway desktop is fully usable on Nvidia hardware when running with this driver. Wayland compositors primarily use the DRM-KMS api for advanced display features and for importing GPU buffers from clients without performing a copy.
Please note that this is currently in the testing stage. While the changes are very stable and can be used to comfortably run a Wayland desktop, more testing is needed before this starts to make its way into the ports tree. Please help by giving it a go and reporting any issues you may find!