How to see driver parameters?

12,108

One method to accomplish this is to make use of lshw. The options passed to the drivers are typically displayed in the output in configuration: lines.

Example

$ sudo lshw -C network
...
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=iwlwifi driverversion=3.15.10-200.fc20.x86_64 firmware=18.168.6.1 ip=192.168.1.80 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn

Notice the argument, driver=iwlwifi, this tells you which kernel module, aka. driver, we're dealing with. The rest of the arguments are what potentially got passed to this module.

IF you want to see all the options available to a given driver you can use modinfo for that.

$ modinfo iwlwifi
...
intree:         Y
vermagic:       3.15.10-200.fc20.x86_64 SMP mod_unload 
signer:         Fedora kernel signing key
sig_key:        68:13:88:D1:2F:3D:25:40:2D:05:A1:F2:AD:1B:A6:55:EA:99:4D:E3
sig_hashalgo:   sha256
parm:           debug:debug output mask (uint)
parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)
parm:           amsdu_size_8K:enable 8K amsdu size (default 0) (int)
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           antenna_coupling:specify antenna coupling in dB (defualt: 0 dB) (int)
parm:           wd_disable:Disable stuck queue watchdog timer 0=system default, 1=disable (default: 1) (int)
parm:           nvm_file:NVM file name (charp)
parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm:           power_save:enable WiFi power management (default: disable) (bool)
parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)

You can also browse the /sys filesystem to look at the various drivers and parameters they accept like so:

$ ls -1 /sys/module/iwlwifi/parameters/
11n_disable
amsdu_size_8K
antenna_coupling
bt_coex_active
debug
fw_restart
led_mode
nvm_file
power_level
power_save
swcrypto
wd_disable

Just change the path to the name of the driver/module that you're interested in and add the sub-directory /parameters.

References

Share:
12,108

Related videos on Youtube

comeback4you
Author by

comeback4you

Updated on September 18, 2022

Comments

  • comeback4you
    comeback4you over 1 year

    Drivers often support various parameters. For example NIC driver e1000 supports flow-control (FlowControl) or auto-negotiation (AutoNeg) parameters. Is there a way to see which parameters were passed to driver during loading? modinfo just displays all the possible parameters for driver, but I would like to see which parameters (and the value of those parameters) were passed to module. dmesg doesn't seem to provide this information as well.

    One place where I did find some information was under /sys/module/, but for example in case of e1000, only the copybreak parameter was listed in /sys/module/e1000/parameters while according to modinfo the e1000 module supports more than dozen parameters.

    • PersianGulf
      PersianGulf over 9 years
      lspci -v can show a few more
    • comeback4you
      comeback4you over 9 years
      @Mohsen Pahlevanzadeh This doesn't show the driver/module parameters, does it?
    • PersianGulf
      PersianGulf over 9 years
      use lscpi -v -k
    • PersianGulf
      PersianGulf over 9 years
      anyway, read manual of lshw
    • comeback4you
      comeback4you over 9 years
      @Mohsen Pahlevanzadeh lscpi -v -k doesn't show the driver parameters. Nor does the manual of lshw.
    • PersianGulf
      PersianGulf over 9 years