2

I'm running ArchLinux with default linux kernel,playing around with lsmod I noticed that there are around 20 modules for either hardware that I don't have or they are not being used for anything, I checked /etc/modules-load.d/ and /etc/modprobe.d/ and both directory are empty, I wanted to see what was loading them

$ lsmod | awk '{print $1"   "$3"    "$4}'

Module                   Used    by
fuse                     3    
rfcomm                   2    
ipt_MASQUERADE           1    
nf_nat_masquerade_ipv4   1    ipt_MASQUERADE
nf_conntrack_netlink     0    
nfnetlink                2    nf_conntrack_netlink
xfrm_user                1    
xfrm_algo                1    xfrm_user
iptable_nat              1    
nf_conntrack_ipv4        3    
nf_defrag_ipv4           1    nf_conntrack_ipv4
nf_nat_ipv4              1    iptable_nat
xt_addrtype              2    
iptable_filter           1    
xt_conntrack             1    
nf_nat                   2    nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack             7    nf_conntrack_ipv4,ipt_MASQUERADE,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat

br_netfilter             0    
bridge                   1    br_netfilter
stp                      1    bridge
llc                      2    bridge,stp
overlay                  0    
bnep                     2    
uvcvideo                 0    
rtsx_usb_sdmmc           0    
rtsx_usb_ms              0    
videobuf2_vmalloc        1    uvcvideo
mmc_core                 1    rtsx_usb_sdmmc
memstick                 1    rtsx_usb_ms
videobuf2_memops         1    videobuf2_vmalloc
dm_thin_pool             1    
dm_persistent_data       1    dm_thin_pool
dm_bio_prison            1    dm_thin_pool
dm_bufio                 1    dm_persistent_data
libcrc32c                3    nf_conntrack,dm_persistent_data,nf_nat
crc32c_generic           0    
videobuf2_v4l2           1    uvcvideo
videobuf2_core           2    uvcvideo,videobuf2_v4l2
videodev                 3    uvcvideo,videobuf2_core,videobuf2_v4l2
btusb                    0    
rtsx_usb                 2    rtsx_usb_sdmmc,rtsx_usb_ms
btrtl                    1    btusb
media                    2    uvcvideo,videodev
dm_mod                  11    dm_bufio,dm_persistent_data,dm_thin_pool

dax                      1    dm_mod
intel_rapl               0    
x86_pkg_temp_thermal     0    
intel_powerclamp         0    
coretemp                 0    
nls_iso8859_1            1    
kvm_intel                0    
nls_cp437                1    
kvm                      1    kvm_intel
vfat                     1    
fat                      1    vfat
snd_soc_skl              0    
snd_soc_skl_ipc          1    snd_soc_skl
joydev                   0    
arc4                     2    
snd_hda_codec_hdmi       1    
mousedev                 0    
snd_hda_codec_conexant   1    
snd_hda_codec_generic    1    snd_hda_codec_conexant
iwlmvm                   0    
snd_soc_sst_ipc          1    snd_soc_skl_ipc
iTCO_wdt                 1    
snd_soc_sst_dsp          1    snd_soc_skl_ipc
mac80211                 1    iwlmvm
iTCO_vendor_support      1    iTCO_wdt
snd_hda_ext_core         1    snd_soc_skl
snd_soc_sst_match        1    snd_soc_skl
irqbypass                1    kvm
iwlwifi                  1    iwlmvm
evdev                   23    
snd_soc_core             1    snd_soc_skl
crct10dif_pclmul         0    
crc32_pclmul             0    
crc32c_intel             1    
ghash_clmulni_intel      0    
snd_compress             1    snd_soc_core
snd_pcm_dmaengine        1    snd_soc_core
pcbc                     0    
ac97_bus                 1    snd_soc_core
aesni_intel              0    
aes_x86_64               1    aesni_intel
ideapad_laptop           0    
crypto_simd              1    aesni_intel
glue_helper              1    aesni_intel
hci_uart                 0    
btbcm                    2    hci_uart,btusb
btqca                    1    hci_uart
btintel                  2    hci_uart,btusb
bluetooth               33    btrtl,hci_uart,btintel,btqca,bnep,btbcm,rfcomm,btusb

input_leds               0    
cfg80211                 3    iwlmvm,iwlwifi,mac80211
cryptd                   3    crypto_simd,ghash_clmulni_intel,aesni_intel

led_class                3    iwlmvm,rtsx_usb_sdmmc,input_leds
ecdh_generic             1    bluetooth
sparse_keymap            1    ideapad_laptop
mac_hid                  0    
snd_hda_intel            6    
rfkill                   6    bluetooth,ideapad_laptop,cfg80211
r8169                    0    
mii                      1    r8169
snd_hda_codec            4    snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_codec_generic

intel_cstate             0    
intel_rapl_perf          0    
snd_hda_core             7    snd_hda_intel,snd_hda_codec_conexant,snd_hda_codec,snd_hda_ext_core,snd_soc_skl,snd_hda_codec_hdmi,snd_hda_codec_generic

snd_hwdep                1    snd_hda_codec
i915                    33    
ucsi                     0    
psmouse                  0    
pcspkr                   0    
snd_pcm                  8    snd_hda_intel,snd_hda_codec,snd_pcm_dmaengine,snd_hda_ext_core,snd_hda_core,snd_soc_skl,snd_hda_codec_hdmi,snd_soc_core

wmi                      1    ideapad_laptop
snd_timer                1    snd_pcm
snd                     22    snd_compress,snd_hda_intel,snd_hwdep,snd_hda_codec_conexant,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_soc_core,snd_pcm

video                    2    i915,ideapad_laptop
battery                  0    
soundcore                1    snd
drm_kms_helper           1    i915
intel_lpss_acpi          0    
intel_lpss               1    intel_lpss_acpi
i2c_hid                  0    
drm                     30    i915,drm_kms_helper
shpchp                   0    
tpm_tis                  0    
button                   1    i915
mei_me                   0    
mei                      1    mei_me
intel_gtt                1    i915
syscopyarea              1    drm_kms_helper
sysfillrect              1    drm_kms_helper
sysimgblt                1    drm_kms_helper
fb_sys_fops              1    drm_kms_helper
tpm_tis_core             1    tpm_tis
i2c_algo_bit             1    i915
tpm                      2    tpm_tis,tpm_tis_core
intel_pch_thermal        0    
i2c_i801                 0    
acpi_pad                 0    
sch_fq_codel             2    
ac                       0    
vboxnetflt               0    
vboxnetadp               0    
pci_stub                 1    
vboxpci                  0    
vboxdrv                  3    vboxnetadp,vboxnetflt,vboxpci
ip_tables                2    iptable_filter,iptable_nat
x_tables                 5    ip_tables,iptable_filter,ipt_MASQUERADE,xt_addrtype,xt_conntrack
ext4                     2    
crc16                    2    bluetooth,ext4
jbd2                     1    ext4
fscrypto                 1    ext4
mbcache                  1    ext4
hid_logitech_hidpp       0    
hid_logitech_dj          0    
usbhid                   0    
hid                      6    i2c_hid,usbhid,hid_logitech_dj,hid_logitech_hidpp

sr_mod                   0    
cdrom                    1    sr_mod
sd_mod                   6    
serio_raw                0    
atkbd                    0    
libps2                   2    atkbd,psmouse
ahci                     5    
libahci                  1    ahci
xhci_pci                 0    
xhci_hcd                 1    xhci_pci
libata                   2    ahci,libahci
usbcore                  7    uvcvideo,usbhid,xhci_pci,rtsx_usb,btusb,xhci_hcd

scsi_mod                 3    sd_mod,libata,sr_mod
usb_common               1    usbcore
i8042                    1    ideapad_laptop
serio                    6    serio_raw,atkbd,psmouse,i8042

please pay attention that I'm only printing 3 columns: Module, Used and by.

then I proceed to grep those module that are Used == 0 and by == "" and I got these

$ lsmod | awk '{print $1"   "$3"    "$4}' | grep acpi_pad
acpi_pad   0

$ lsmod | awk '{print $1"   "$3"    "$4}' | grep battery
battery   0

$ lsmod | awk '{print $1"   "$3"    "$4}' | grep joydev
joydev   0

so my question is, why these modules are being loaded? with what purposes, is it safe to blacklist them?

thanks in advance!

:-)

1 Answer 1

2

They are loaded because something used them at some time, possibly indirectly, for example during boot, but currently there are no applications using them.

It's safe to rmmod them (they'll just get reloaded when they will be needed), but it's not safe to blacklist them (because then whatever needed them won't work, nor will they work in the future if you decide you need to use that part of your hardware).

They take up very little of your memory, so there's no need to worry about them. Just leave everything as it is.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .