# Appropriate use of loader.conf(5) for kernel modules



## grahamperrin@ (Dec 3, 2021)

There's a FreeBSD recommendation to use /boot/loader.conf for `nvidia` (with the latest driver for NVIDIA).

Is this use of loader.conf appropriate (with FreeBSD 13.0-RELEASE), or somewhat archaic? 

loader.conf(5)


----------



## Menelkir (Dec 3, 2021)

AFAIK, you should use kld_list="nvidia-modeset" on rc.conf instead.
Also, you can use /boot/loader.conf.local instead of /boot/loader.conf, so you can make the .local yours and let the loader.conf alone.


----------



## grahamperrin@ (Dec 3, 2021)

Menelkir said:


> AFAIK, you should use … rc.conf instead. …



+1 to rc.conf(5) instead.

Re: `nvidia-modeset` ▶ <https://forums.freebsd.org/posts/544929>


----------



## grahamperrin@ (Dec 3, 2021)

On one hand, <https://http.download.nvidia.com/XFree86/FreeBSD-x86_64/470.86/README/installdriver.html> (Chapter 3) for 470.86 (the latest production branch) states:



> … your /boot/loader.conf file will be updated to automatically load the NVIDIA kernel module on boot, as well as the Linux ABI compatibility module should you not have it compiled into your kernel.



On the other hand, <https://forums.freebsd.org/posts/524703> for NVIDIA Quadro K1100M (GK107GLM) recalls that things were "better" with `nvidia-modeset_load` set to *no* in /boot/loader.conf

so I question the sanity of NVIDIA's Chatper 3.


----------



## Menelkir (Dec 3, 2021)

The nvidia page probably wasn't updated properly.


----------



## SirDice (Dec 3, 2021)

The installer from NVidia itself installs a whole bunch of useless entries in loader.conf. Use the port/package: x11/nvidia-driver. It has the proper procedure in its pkg-message.


----------



## Alain De Vos (Dec 3, 2021)

Two thoughts. The nvidia driver fom the nvidia site might be unknown to the freebsd package manager pkg, as such uninstall might be problematic.
Also to remove entries from loader.conf you sometimes have to boot into single user mode which is an annoyance.


----------



## grahamperrin@ (Dec 4, 2021)

SirDice said:


> the proper procedure in its pkg-message.



I think not ▶ <https://forums.freebsd.org/posts/544936> …


----------

