How to Inspect Kernel Module Parameters and License Information in Ubuntu Using modinfo

Linux hardware drivers—such as Wi-Fi adapters, graphics cards, storage RAID controllers, and network interface cards—operate as dynamically loadable kernel modules (.ko files). When troubleshooting hardware incompatibilities, debugging driver crashes, or fine-tuning hardware parameters (such as disabling power management or enabling experimental features), systems administrators need complete visibility into module metadata. In Ubuntu, the modinfo command extracts comprehensive driver profiles directly from compiled kernel objects.

Querying Kernel Driver Metadata with modinfo

The modinfo command queries the module database residing in /lib/modules/$(uname -r)/ without requiring the module to be actively loaded in memory:

  1. Open your terminal via Ctrl + Alt + T or connect over SSH.
  2. Execute modinfo followed by the module name (for example, the Intel Wi-Fi driver iwlwifi):
    modinfo iwlwifi
  3. The terminal outputs a detailed technical dossier:
    filename:       /lib/modules/6.8.0-45-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.zst
    license:        GPL
    description:    Intel(R) Wireless WiFi driver for Linux
    author:         Intel Corporation <[email protected]>
    firmware:       iwlwifi-ty-a0-gf-a0-59.ucode
    depends:        cfg80211
    parm:           power_save:enable-WiFi power management (default: true) (bool)
    parm:           11n_disable:disable 11n functionality, 1=disable, 2=disable aggTX, 4=disable aggRX (uint)

Inspecting Configurable Driver Parameters (parm)

The lines prefixed with parm: are crucial for systems engineering. They detail the exact configuration flags supported by the driver:

  • Parameter Name & Description: Explains what the parameter controls (e.g. power_save or bt_coex_active).
  • Accepted Data Types: Indicates whether the parameter expects a boolean (bool: 0 or 1), integer (int), or text string.
  • Applying Custom Parameters: To pass custom parameters permanently, create a configuration file inside /etc/modprobe.d/ (e.g. options iwlwifi power_save=0) and regenerate initramfs.

Extracting Specific Fields with the -F Flag

When writing automated auditing scripts or verifying licensing compliance, use the field selector (-F) to isolate specific values:

  • Check Module License:
    modinfo -F license e1000e
    Output: GPL v2
  • List Required Firmware Files:
    modinfo -F firmware iwlwifi
    Outputs all .ucode firmware binaries expected by the driver in /lib/firmware/.
  • Inspect Module Dependencies:
    modinfo -F depends nouveau
    Displays all subsidiary kernel modules that must be loaded prior to this driver initializing.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.