As the maintainer who did it, it's intentional and unavoidable at least with current form.Hi,
does anybody known why nvidia-drm-kmods RUN_DEPENDS on x11/nvidia-driver? I created local poudriere repo for building kmods and was surprised nvidia-drm-kmods brings looots of dependencies.
My understanding is yes.But does using "modesetting" via nvidia-drm really require all those nvidia-driver libs?
%%LOCALBASE%% is replaced with configured LOCALBASE (default: /usr/local). (snip)
[ 120.431] (II) Platform probe for /dev/dri/card0
[ 120.619] (**) OutputClass "nvidia" ModulePath extended to "/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/xorg/modules"
[ 120.619] (**) OutputClass "nvidia" ModulePath extended to "/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/xorg/modules"
[ 120.619] (**) OutputClass "nvidia" setting /dev/dri/card0 as PrimaryGPU
[ 120.620] (--) PCI:*(1@0:0:0) 10de:25b2:10de:1879 rev 161, Mem @ 0x6b000000/16777216, 0x4000000000/4294967296, 0x4100000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/65536
[ 120.620] (II) LoadModule: "glx"
[ 120.621] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[ 120.627] (II) Module glx: vendor="X.Org Foundation"
[ 120.627] compiled for 1.21.1.23, module version = 1.0.0
[ 120.627] ABI class: X.Org Server Extension, version 10.0
[ 120.628] (II) Applying OutputClass "nvidia" to /dev/dri/card0
[ 120.628] loading driver: nvidia
[ 120.628] (II) Applying OutputClass "nvidia" to /dev/dri/card0
[ 120.628] loading driver: nvidia
[ 120.628] (==) Matched nvidia as autoconfigured driver 0
[ 120.628] (==) Matched nv as autoconfigured driver 1
[ 120.628] (==) Matched modesetting as autoconfigured driver 2
[ 120.628] (==) Matched scfb as autoconfigured driver 3
[ 120.628] (==) Matched vesa as autoconfigured driver 4
[ 120.628] (==) Assigned the driver to the xf86ConfigLayout
[ 120.628] (II) LoadModule: "nvidia"
[ 120.628] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[ 120.630] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 120.630] compiled for 1.16.99.901, module version = 1.0.0
[ 120.630] Module class: X.Org Video Driver
[ 120.631] (II) LoadModule: "nv"
[ 120.631] (WW) Warning, couldn't open module nv
[ 120.631] (EE) Failed to load module "nv" (module does not exist, 0)
[ 120.631] (II) LoadModule: "modesetting"
[ 120.631] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[ 120.632] (II) Module modesetting: vendor="X.Org Foundation"
[ 120.632] compiled for 1.21.1.23, module version = 1.21.1
[ 120.632] Module class: X.Org Video Driver
[ 120.632] ABI class: X.Org Video Driver, version 25.2
(snip)
[ 120.638] (II) NVIDIA dlloader X Driver 610.43.02 Tue May 19 10:39:03 UTC 2026
[ 120.638] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 120.639] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 120.639] (II) scfb: driver for wsdisplay framebuffer: scfb
[ 120.639] (--) Using syscons driver with X support (version 2.0)
[ 120.639] (--) using VT number 9
(snip)
[ 120.654] (II) NVIDIA(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 120.654] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 120.654] (==) NVIDIA(0): RGB weight 888
[ 120.654] (==) NVIDIA(0): Default visual is TrueColor
[ 120.654] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 120.654] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
[ 120.654] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
[ 120.654] (**) NVIDIA(0): Enabling 2D acceleration
[ 120.654] (II) Loading sub module "glxserver_nvidia"
[ 120.654] (II) LoadModule: "glxserver_nvidia"
[ 120.654] (II) Loading /usr/local/lib/xorg/modules/extensions/libglxserver_nvidia.so
[ 120.738] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[ 120.738] compiled for 1.16.99.901, module version = 1.0.0
[ 120.738] Module class: X.Org Server Extension
[ 120.738] (II) NVIDIA GLX Module 610.43.02 Tue May 19 10:37:27 UTC 2026
[ 120.739] (II) NVIDIA: The X server supports PRIME Render Offload.
(snip to the end of file)
Tried renaming instead of removing not to be picked but easier to restore.> [ 120.628] (II) LoadModule: "nvidia"
Xorg might just load all modules it finds in /usr/local/lib/xorg/modules/drivers.
Try removing /usr/local/lib/xorg/modules/extensions/libglxserver_nvidia.so and /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
startx (partioally stroke out with ***):% startx &
[1] 11182
% xauth: file /***/***/.serverauth.***** does not exist
X.Org X Server 1.21.1.23
X Protocol Version 11, Revision 0
Current Operating System: FreeBSD ***.***.local 15.1-STABLE FreeBSD 15.1-STABLE #143 stable/15-n284117-ae9f66486df6-dirty: Fri Jun 26 13:17:17 JST 2026 root@***a.***.local:/usr/obj/usr/src/amd64.amd64/sys/TEST15 amd64
Current version of pixman: 0.46.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jun 26 19:54:22 2026
(==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
scfb trace: probe start
scfb trace: probe done
(EE)
Fatal server error:
(EE) failed to create screen resources(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
[1] + exit 1 startx
%
(snip)
[ 193.004] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 193.004] (II) Platform probe for /dev/dri/card0
[ 193.172] (**) OutputClass "nvidia" ModulePath extended to "/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/xorg/modules"
[ 193.172] (**) OutputClass "nvidia" ModulePath extended to "/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/nvidia/xorg,/usr/local/lib/xorg/modules,/usr/local/lib/xorg/modules"
[ 193.172] (**) OutputClass "nvidia" setting /dev/dri/card0 as PrimaryGPU
[ 193.172] (--) PCI:*(1@0:0:0) 10de:25b2:10de:1879 rev 161, Mem @ 0x6b000000/16777216, 0x4000000000/4294967296, 0x4100000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/65536
(snip)
[ 193.180] (II) Applying OutputClass "nvidia" to /dev/dri/card0
[ 193.180] loading driver: nvidia
[ 193.180] (II) Applying OutputClass "nvidia" to /dev/dri/card0
[ 193.180] loading driver: nvidia
[ 193.180] (==) Matched nvidia as autoconfigured driver 0
[ 193.180] (==) Matched nv as autoconfigured driver 1
[ 193.180] (==) Matched modesetting as autoconfigured driver 2
[ 193.180] (==) Matched scfb as autoconfigured driver 3
[ 193.180] (==) Matched vesa as autoconfigured driver 4
[ 193.180] (==) Assigned the driver to the xf86ConfigLayout
[ 193.180] (II) LoadModule: "nvidia"
[ 193.181] (WW) Warning, couldn't open module nvidia
[ 193.181] (EE) Failed to load module "nvidia" (module does not exist, 0)
(snip)
[ 193.181] (II) LoadModule: "modesetting"
[ 193.181] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[ 193.182] (II) Module modesetting: vendor="X.Org Foundation"
[ 193.182] compiled for 1.21.1.23, module version = 1.21.1
[ 193.182] Module class: X.Org Video Driver
[ 193.182] ABI class: X.Org Video Driver, version 25.2
(snip)
[ 193.189] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 193.189] (II) scfb: driver for wsdisplay framebuffer: scfb
[ 193.189] (--) Using syscons driver with X support (version 2.0)
[ 193.189] (--) using VT number 9
[ 193.200] (II) modeset(0): using drv /dev/dri/card0
[ 193.200] (WW) Falling back to old probe method for scfb
[ 193.200] scfb trace: probe start
[ 193.200] scfb trace: probe done
[ 193.200] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 193.201] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 193.201] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[ 193.201] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
[ 193.201] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
[ 193.201] (==) modeset(0): RGB weight 888
[ 193.201] (==) modeset(0): Default visual is TrueColor
[ 193.201] (II) Loading sub module "glamoregl"
[ 193.201] (II) LoadModule: "glamoregl"
[ 193.201] (II) Loading /usr/local/lib/xorg/modules/libglamoregl.so
[ 193.207] (II) Module glamoregl: vendor="X.Org Foundation"
[ 193.207] compiled for 1.21.1.23, module version = 1.0.1
[ 193.207] ABI class: X.Org ANSI C Emulation, version 0.4
[ 193.650] (II) modeset(0): glamor: Using OpenGL 3.1 context.
[ 193.650] (II) modeset(0): glamor X acceleration enabled on NVIDIA RTX A400/PCIe/SSE2
[ 193.650] (II) modeset(0): glamor initialized
[ 193.650] (==) modeset(0): VariableRefresh: disabled
[ 193.650] (==) modeset(0): AsyncFlipSecondaries: disabled
[ 193.650] (II) modeset(0): Output DP-1 has no monitor section
[ 193.651] (II) modeset(0): Output DP-2 has no monitor section
[ 193.689] (II) modeset(0): Output DP-3 has no monitor section
[ 193.689] (II) modeset(0): Output DP-4 has no monitor section
(snip)
[ 193.730] (==) modeset(0): DPI set to (96, 96)
[ 193.730] (II) Loading sub module "fb"
[ 193.730] (II) LoadModule: "fb"
[ 193.730] (II) Module "fb" already built-in
[ 193.730] (II) UnloadModule: "scfb"
[ 193.730] (II) Unloading scfb
[ 193.823] (==) modeset(0): Backing store enabled
[ 193.823] (==) modeset(0): Silken mouse enabled
[ 193.827] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[ 193.827] (==) modeset(0): DPMS enabled
[ 193.827] (WW) modeset(0): Option "PrimaryGPU" is not used
[ 193.828] (II) modeset(0): [DRI2] Setup complete
[ 193.828] (II) modeset(0): [DRI2] DRI driver: nouveau
[ 193.828] (II) modeset(0): [DRI2] VDPAU driver: nouveau
(snip)
[ 193.833] (II) Initializing extension GLX
[ 193.834] (EE) AIGLX error: dlopen of /usr/local/lib/dri/nouveau_dri.so failed (Cannot open "/usr/local/lib/dri/nouveau_dri.so")
[ 193.834] (EE) AIGLX error: unable to load driver nouveau
[ 193.836] (II) IGLX: Loaded and initialized swrast
[ 193.836] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[ 193.836] (II) Initializing extension XFree86-VidModeExtension
[ 193.836] (II) Initializing extension XFree86-DGA
[ 193.836] (II) Initializing extension XFree86-DRI
[ 193.836] (II) Initializing extension DRI2
[ 193.836] (EE) modeset(0): Failed to create pixmap
[ 193.836] (EE)
Fatal server error:
[ 193.836] (EE) failed to create screen resources(EE)
[ 193.837] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 193.837] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 193.837] (EE)
[ 193.843] (EE) Server terminated with error (1). Closing log file.
OPTIONS_DEFINE= RUNTIME
OPTIONS_DEFAULT= RUNTIME
RUNTIME_RUN_DEPENDS= nvidia-driver${PKGNAMESUFFIX}>0:x11/nvidia-driver${PKGNAMESUFFIX}
Actual DRM/KMS (additional) kmod ports, graphics/nvidia-drm-{510|515|61|66|612|latest}-kmod{-580|-devel} are basically for adding hybrid graphics (aka Optimus) support. This is because recent iGPUs want DRM/KMS to work, so running NVIDIA dGPUs with iGPUs without using tricky way using OSMESA (Off Screen MESA) need DRM/KMS supports.Keep in mind, nvidia.ko is from x11/nvidia-kmod, not from x11/nvidia-driver. So nvidia-driver is needed for Xorg, not for a drm. Anybody can install nvidia-driver by hands. Or without breaking anything it can be an optional dependency in nvidia-drm-kmod, like:
Makefile:OPTIONS_DEFINE= RUNTIME OPTIONS_DEFAULT= RUNTIME RUNTIME_RUN_DEPENDS= nvidia-driver${PKGNAMESUFFIX}>0:x11/nvidia-driver${PKGNAMESUFFIX}
I see now. This config causes loading of nvidia_drv.so, which means that nvidia-driver is indeed a required runtime dependency.Each graphics/nvidia-drm-*-kmod (master port of corresponding graphics/nvidia-drm-*-kmod-580 and graphics/nvidia-drm-*-kmod-devel) installs /usr/local/share/X11/xorg.conf.d/20-nvidia-drm-outputclass.conf, which should be picked as system default.
What use does DRM have without DRI (which is the case for nvidia-drm, if I understand it correctly)? I doubt you can use nvidia-drm in headless scenarios, but even if you can it is too much niche to add an option to the port. But I'm not a maintainer anyways.So nvidia-driver is needed for Xorg, not for a drm.
And I'm one of the maintainers for NVIDIA GPU driver related ports.I see now. This config causes loading of nvidia_drv.so, which means that nvidia-driver is indeed a required runtime dependency.
What use does DRM have without DRI (which is the case for nvidia-drm, if I understand it correctly)? I doubt you can use nvidia-drm in headless scenarios, but even if you can it is too much niche to add an option to the port. But I'm not a maintainer anyways.
DRM (Direct Rendering Manager) and DRI (Direct Rendering Infrastructure) are underlying infrastructures for X11 / Wayland, but not all of infrastructures.What use does DRM have without DRI (which is the case for nvidia-drm, if I understand it correctly)?