Ask Your Question

Confirming loaded options of kernel modules [solved]

asked 2013-08-13 08:12:45 -0500

Jann5s gravatar image

updated 2013-08-15 07:15:29 -0500

Hi all,

I have some issues with the intel iwlwifi driver, and I've found many topics suggesting several options for the module. However, I can't seem to get the module to accept the options, I must be doing something wrong.

As I see there are three ways to pass the options to the module:

  1. add the option to the kernel commandline (in grub) during boot, e.g.


  2. pass the option in the modprobe command during the restart of the module, e.g.

    modprobe -rv iwldvm
    modprobe -rv iwlwifi
    modprobe -v iwldvm
    modprobe -v iwlwifi auto_agg=N
  3. create a .conf file in /etc/modprobe.d and reboot or restart the module, e.g.

    echo "option iwlwifi auto_agg=N" > /etc/modprobe.d/iwlwifi.conf
    modprobe -rv iwldvm
    modprobe -rv iwlwifi
    modprobe -v iwldvm
    modprobe -v iwlwifi

I've tried all three methods, but I'v never seen any difference in the output of modinfo iwlwifi:

filename:       /lib/modules/3.10.5-201.fc19.x86_64/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
license:        GPL
author:         Copyright(c) 2003-2013 Intel Corporation
version:        in-tree:d
description:    Intel(R) Wireless WiFi driver for Linux
firmware:       iwlwifi-100-5.ucode
firmware:       iwlwifi-1000-5.ucode
firmware:       iwlwifi-135-6.ucode
firmware:       iwlwifi-105-6.ucode
firmware:       iwlwifi-2030-6.ucode
firmware:       iwlwifi-2000-6.ucode
firmware:       iwlwifi-5150-2.ucode
firmware:       iwlwifi-5000-5.ucode
firmware:       iwlwifi-6000g2b-6.ucode
firmware:       iwlwifi-6000g2a-5.ucode
firmware:       iwlwifi-6050-5.ucode
firmware:       iwlwifi-6000-4.ucode
firmware:       iwlwifi-3160-6.ucode
firmware:       iwlwifi-7260-6.ucode
srcversion:     909B2DF1434FD4B044B519F
alias:          pci:v00008086d000008B3svsd00008070bcsci snip
alias:          pci:v00008086d00004232svsd00001201bcsci
depends:        cfg80211
intree:         Y
vermagic:       3.10.5-201.fc19.x86_64 SMP mod_unload 
signer:         Fedora kernel signing key
sig_key:        F0:89:16:5D:B1:2C:1D:F4:9C:D6:66:F6:B4:77:F2:94:49:5E:31:58
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: agg TX, 4: agg RX (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:           bt_ch_inhibition:Enable BT channel inhibition (default: enable) (bool)
parm:           plcp_check:Check plcp health (default: 1 [enabled]) (bool)
parm:           wd_disable:Disable stuck queue watchdog timer 0=system default, 1=disable, 2=enable (default: 0) (int)
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)
parm:           auto_agg:enable agg w/o check traffic load (default: enable) (bool)

What am I not getting?

edit retag flag offensive close merge delete


After playing with journalctl (as @AdamW suggested), I notice that iwlwifi is loaded at the moment I load iwldvm, is this correct? Because this would mean that the second method would not work, since the iwlwifi module is not reloaded with the new settings if it is already loaded (please confirm).

Moreover, I've tried changing some options, and I cannot find any difference in the output of journalctl -b | grep iwlwifi

So the question remains: How can I confirm that the module is loaded with the defined options?

Jann5s gravatar imageJann5s ( 2013-08-15 06:27:59 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-08-15 07:03:56 -0500

Jann5s gravatar image

updated 2013-08-15 07:09:55 -0500

After understanding that I've misinterpreted the output of modinfo (thank you @AdamW ), I searched some more, and quite quickly I found the solution (however I cant post the link to the source because of karma).

The values for all parameters can be found at:

/sys/module/[module name]/parameters/[optionname]

So in my case, before

[me@pc ~]$ cat /sys/module/iwlwifi/parameters/auto_agg

then, unload the module

[me@pc ~]$ sudo modprobe -rv iwldvm
rmmod iwldvm
rmmod mac80211
rmmod iwlwifi
rmmod cfg80211

then, change the options in /etc/modprobe.d/.

[me@pc ~]$ sudo -c sh 'echo "options iwlwifi auto_agg=N" > /etc/modprobe.d/iwlwifi.conf'

then, reload the module

[me@pc ~]$ sudo modprobe -v iwldvm
insmod /modules/3.10.5-201.fc19.x86_64/kernel/net/wireless/cfg80211.ko
insmod /modules/3.10.5-201.fc19.x86_64/kernel/net/mac80211/mac80211.ko
insmod /modules/3.10.5-201.fc19.x86_64/kernel/net/wireless/iwlwifi/iwlwifi.ko auto_agg=N
insmod /modules/3.10.5-201.fc19.x86_64/kernel/net/wireless/iwlwifi/dvm/iwldvm.ko

then, confirm the setting

[me@pc ~]$ cat /sys/module/iwlwifi/parameters/auto_agg

Which also confirms my question in my comment above, i.e. loading iwldvm will load iwlwifi

edit flag offensive delete link more


Awesome. I think we all learned something here today :)

AdamW gravatar imageAdamW ( 2013-08-15 11:13:40 -0500 )edit

Can somebody please confirm the answer, it seems I cannot do it myself.

Jann5s gravatar imageJann5s ( 2013-08-15 13:51:19 -0500 )edit

answered 2013-08-15 03:21:39 -0500

AdamW gravatar image

You're missing that modinfo is not a command that tells you anything about the current configuration of a given module. Its output won't change whatever you set a given module option to at any particular time. All it's telling you is that auto_agg is a parameter, it's a boolean, and the default setting is to enable it. It won't change that output if you turn it off with any of the methods you described.

I don't actually know of a simple way to check what options a given module is loaded with, but if it's a well-behaved module, it ought to log it when it's loaded, so 'journalctl -b | grep iwlwifi' may yield results.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-08-13 08:12:45 -0500

Seen: 8,944 times

Last updated: Sep 30 '13