Using the Allmodinfo Script to Investigate Linux Drivers

I’m setting up a new system at work, and yet again found myself faced with trying to nut out which driver corresponds to which device, so I can figure out what’s wrong with the touchpad and keyboard hotkeys.  I’m also curious what wired and wireless drivers are in use and if there’s any unneeded power sucks I could eliminate to increase battery life. This article will show you a quick hack I put together to identify the drivers my laptop uses so I can search for information about them on the web.


The allmodinfo Script

Sorting through the raw list of drivers is kind of hunt and peck, so I hacked together a script to identify what each is:

for mod in `cat /proc/modules | cut -d " " -f 1`
    desc=`modinfo -d $mod`
    printf "%-20s $desc\n" "$mod:"

The output of this script looks like this:

lockd:               NFS file locking service version 0.5.
fscache:             FS Cache Manager
rfcomm:              Bluetooth RFCOMM ver 1.11
bnep:                Bluetooth BNEP ver 1.3
arc4:                ARC4 Cipher Algorithm
uvcvideo:            USB Video Class driver
hid_multitouch:      HID multitouch panels
videobuf2_vmalloc:   vmalloc memory handling routines for videobuf2
videobuf2_memops:    common memory handling routines for videobuf2
videobuf2_core:      Driver helper framework for Video for Linux 2
v4l2_common:         misc helper functions for v4l2 device drivers
videodev:            Device registrar for Video4Linux drivers v2
media:               Device node registration for media drivers
usbhid:              USB HID core driver
btusb:               Generic Bluetooth USB driver ver 0.6
bluetooth:           Bluetooth Core ver 2.20
snd_hda_codec_realtek: Realtek HD-audio codec
snd_hda_codec_hdmi:  HDMI HD-audio codec
snd_hda_codec_generic: Generic HD-audio codec parser
joydev:              Joystick device interfaces
intel_rapl:          Driver for Intel RAPL (Running Average Power Limit)
iosf_mbi:            IOSF Mailbox Interface accessor
x86_pkg_temp_thermal: X86 PKG TEMP Thermal Driver
intel_powerclamp:    Package Level C-state Idle Injection for Intel CPUs
coretemp:            Intel Core temperature monitor
snd_hda_intel:       Intel HDA driver
snd_hda_controller:  Common HDA driver funcitons
snd_hda_codec:       HDA codec core
snd_hwdep:           Hardware dependent layer
snd_pcm:             Midlevel PCM code for ALSA.
crct10dif_pclmul:    T10 DIF CRC calculation accelerated with PCLMULQDQ.
ghash_clmulni_intel: GHASH Message Digest Algorithm, acclerated by PCLMULQDQ-NI
iwlmvm:              The new Intel(R) wireless AGN driver for Linux
aesni_intel:         Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized
snd_seq_midi:        Advanced Linux Sound Architecture sequencer MIDI synth.
snd_seq_midi_event:  MIDI byte  sequencer event coder
mac80211:            IEEE 802.11 subsystem
aes_x86_64:          Rijndael (AES) Cipher Algorithm, asm optimized
lrw:                 LRW block cipher mode
gf128mul:            Functions for multiplying elements of GF(2^128)
cryptd:              Software async crypto daemon
snd_rawmidi:         Midlevel RawMidi code for ALSA.
snd_seq:             Advanced Linux Sound Architecture sequencer.
iwlwifi:             Intel(R) Wireless WiFi driver for Linux
serio_raw:           Raw serio driver
i915:                Intel Graphics
lpc_ich:             LPC interface for Intel ICH
snd_seq_device:      ALSA sequencer device management
snd_timer:           ALSA timer interface
cfg80211:            wireless configuration support
snd:                 Advanced Linux Sound Architecture driver for soundcards.
Jack detection support for ALSA
drm_kms_helper:      DRM KMS helper
mei_me:              Intel(R) Management Engine Interface
drm:                 DRM shared core routines
DRM panel infrastructure
mei:                 Intel(R) Management Engine Interface
shpchp:              Standard Hot Plug PCI Controller Driver
i2c_algo_bit:        I2C-Bus bit-banging algorithm
soundcore:           Core sound module
wmi:                 ACPI-WMI Mapping Driver
video:               ACPI Video Driver
parport_pc:          PC-style parallel port driver
ahci:                AHCI SATA low-level driver
r8169:               RealTek RTL-8169 Gigabit Ethernet driver
psmouse:             PS/2 mouse driver
libahci:             Common AHCI SATA low-level routines
mii:                 MII hardware support library

Using this Information

Here are the entries I’m interested for making sure my hotkeys and network connectivity work properly:

iwlwifi:             Intel(R) Wireless WiFi driver for Linux
r8169:               RealTek RTL-8169 Gigabit Ethernet driver
psmouse:             PS/2 mouse driver

Scanning through this list I can see there’s nothing particularly exotic about the touchpad or keyboard, so hopefully troubleshooting those issues should be straightforward. The wireless uses iwlmvm, which I’ve not dealt with before but looks to be open source so searching about issues should hopefully be a productive use of time. The RealTek ethernet catches my attention because I’ve had some bad experiences with RealTek drivers in the past (like almost everyone else). A quick search indicates this particular one is a reimplementation by the Linux community; this is good. The worst case scenario would be that it’s missing some functionality, but I don’t use Ethernet on laptops much any more so it’s probably going to be good enough.

If you ever need to troubleshoot driver issues on a computer, or investigate driver support on a new computer, this script should prove useful. Happy hacking!

Author: Bryce Harrington

Bryce is a founder and developer of the Inkscape project, but began his career in the aerospace industry as a spacecraft propulsions engineer.