How to Find and reload specific driver from kernel?

way to find the specific driver name

  • lspci | grep -i network

I am not sure whether that device is on the PCI or USB bus but you can try the following.

  1. Use lsusb or lspci to find information about the device
  2. Lookup that device for the corresponding module ("driver")
  3. Make sure that module is loaded and available with lsmod and modprobe

Another Idea would be to use lsmod and diff to find out which modules are going missing when your laptop uses sleep mode. It could be more than one module that has a problem.

  1. restart machine
  2. make sure that the wifi adapter is working
  3. use lsmod to get all loaded modules

    lsmod > loaded-modules-before-sleep.txt
    
  4. put computer to sleep mode

  5. wake machine up
  6. make sure that the wifi adapter ISN'T working
  7. use lsmod to get all loaded modules

    lsmod > loaded-modules-after-sleep.txt
    
  8. use diff to see what has changed!

    diff loaded-modules-before-sleep.txt loaded-modules-after-sleep.txt
    

reload driver without resetting system

Once you know the module to load, simply use modprobe as root

  • modprobe wifi_module_name

find current kernel version via terminal

uname to the rescue! uname should tell you what you want to know.

  • uname -a

Adding a shorter and more specific answer for my own convenience :)

To find out the kernel module, issue lspci -vvnn | grep -A 9 Network (from ubuntu WifiDocs):

~$ lspci -vvnn | grep -A 9 Network 
03:00.0 Network controller [0280]: Broadcom Corporation BCM4331 802.11a/b/g/n [14e4:4331] (rev 02)
    Subsystem: Apple Inc. AirPort Extreme [106b:010f]
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 256 bytes
    Interrupt: pin A routed to IRQ 17
    Region 0: Memory at a0500000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: wl
    Kernel modules: bcma, wl

From this you can see that wl is in use.

To reload on demand, do

sudo rmmod wl && sudo modprobe wl

To reload on sleep/hibernate, install pm-utils and add a file with any name in /etc/pm/config.d/, for instance /etc/pm/config.d/suspend with the following contents:

SUSPEND_MODULES="wl"

This is explained at Arch pm-utils wiki and pm-action man page