sudo modprobe nf_tables # load a module (with its dependencies)
sudo modprobe -r nf_tables # unload it (-r, if unused)
sudo modprobe overlay dm_mod # several at once
modinfo nf_tables # info: path, parameters, dependencies, alias
modinfo -p i915 # a module's available PARAMETERS
lsmod | grep nf_ # what's loaded
sudo depmod -a # rebuild the dependency map (after a manual install)# module parameters at load time:
sudo modprobe usbcore autosuspend=-1
# permanently — /etc/modprobe.d/*.conf:
echo 'options i915 enable_psr=0' | sudo tee /etc/modprobe.d/i915.conf
Autoload and blacklist
bash
# load at boot:
echo nf_tables | sudo tee /etc/modules-load.d/nft.conf
# blacklist:
echo 'blacklist pcspkr' | sudo tee /etc/modprobe.d/no-beep.conf
sudo update-initramfs -u # if the module loads from initramfs — rebuild it# hard block from the kernel cmdline: module_blacklist=nouveau (in GRUB_CMDLINE, see boot-grub)
dmesg / kernel messages
bash
sudo dmesg -T | grep -i <module> # what the module wrote at load time
sudo journalctl -k -b -1 # the kernel of the previous boot
This is where driver and hardware problems show up. The kernel buffer,
message levels, root-only access and common lines are covered in
dmesg.
Troubleshooting
5
SymptomCause and fix
A device/driver isn't working
dmesg | grep -i <device> for initialization errors. lsmod to see whether
the module is loaded; sudo modprobe <module> to load it manually; modinfo
for the needed parameters/firmware.
The OOM-killer killed a process
dmesg -T | grep -i oom or journalctl -k | grep -i oom — the kernel killed
a process under memory pressure (see oom-killer).
A module doesn't load at boot
Add it to /etc/modules-load.d/*.conf; check modinfo and dependencies
(depmod -a). If it loads from initramfs — run update-initramfs -u.
modprobe -r: "Module is in use"
Something is using the module (lsmod's "Used by" column). Stop the
consumer, or unload dependent modules first.
The disk is throwing I/O errors
dmesg showing "I/O error, dev sdX" is a sign of a failing disk; check SMART
(smartctl -a) and make a backup (see filesystems).