brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: modinfo -p lists the options a Linux kernel module accepts

Troubleshooting
~/tips/tip-troubleshooting-modinfo-parameters

modinfo -p usb_storage

Find the parameters a driver offers before copying one from a forum.

A forum post says to set some driver option to fix your device. Before I paste it into a config file, I check that the option exists in the driver on this machine.

modinfo -p usb_storage

Each line gives a parameter name, a short description and its type. The names vary between kernel versions, so advice that is a few years old can mention things your driver no longer has.

Other fields of the same module are one switch away:

modinfo -n usb_storage
modinfo -F version e1000e

-n prints the path of the module file, and -F prints a single named field, if the module has it.

To see the values that are in effect right now for a loaded module, read them from sysfs:

grep -r . /sys/module/usb_storage/parameters/

That prints every readable parameter with its current value.

modinfo describes the module file on disk. Drivers built into the kernel, rather than loaded as modules, may show little or nothing, and not every parameter is documented well. An option that is listed can still be a bad idea for your hardware. Change one thing at a time and write down what the value was, so you can put it back.

Further reading: modinfo man page

More Troubleshooting tips Get-NetTCPConnection -State Listen ps -o pid,lstart,etime,cmd -p 1234 sudo lsof -nP -p 1234 fc-match Helvetica wp plugin list --status=active --field=name > active-plugins.txt All Troubleshooting tips (21) All topics

Link