About Module Parameters
To modify a module's behavior, specify parameters for the module in the modprobe command:
sudo modprobe module_name parameter=value ...
Separate multiple parameter and value pairs with spaces. Array values are represented by a comma-separated list, for example:
sudo modprobe foo arrayparm=1,2,3,4
Alternatively, change the values of some parameters for loaded
modules and built-in drivers by writing the new value to a file
under
/sys/module/module_name/parameters
,
for example:
echo 0 | sudo tee /sys/module/ahci/parameters/skip_host_reset
Configuration files (/etc/modprobe.d/*.conf
)
specify module options, create module aliases, and override the
usual behavior of modprobe for modules with
special requirements. The /etc/modprobe.conf
file that was used with earlier versions of
modprobe is also valid if it exists. Entries in
the /etc/modprobe.conf
and
/etc/modprobe.d/*.conf
files use the same
syntax.
The following are commonly used commands in modprobe configuration files:
-
alias
-
Creates an alternative name for a module. The alias can include shell wildcards. To create an alias for the
sd-mod
module:alias block-major-8-* sd_mod
-
blacklist
-
Ignore a module's internal alias that's displayed by the modinfo command. This command is typically used in the following conditions:
-
The associated hardware isn't required.
-
Two or more modules both support the same devices.
-
A module invalidly claims to support a device.
For example, to demote the alias for the frame-buffer driver
cirrusfb
, type:blacklist cirrusfb
The
/etc/modprobe.d/blacklist.conf
file prevents hotplug scripts from loading a module so that a different driver binds the module instead regardless of which driver happens to be probed first. If it doesn't already exist, you must create it. -
-
install
-
Runs a shell command instead of loading a module into the kernel. For example, load the module
snd-emu10k1-synth
instead ofsnd-emu10k1
:install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && /sbin/modprobe snd-emu10k1-synth
-
options
-
Defines options for a module. For example, to define the
nohwcrypt
andqos
options for theb43
module, type:options b43 nohwcrypt=1 qos=0
-
remove
-
Runs a shell command instead of unloading a module. To unmount
/proc/fs/nfsd
before unloading thenfsd
module, type:remove nfsd { /bin/umount /proc/fs/nfsd > /dev/null 2>&1 || :; } ; /sbin/modprobe -r --first-time --ignore-remove nfsd
For more information, see the
modprobe.conf(5)
manual page.