Ubuntu laptop losing wifi after suspend

2013-11-04

Linux laptop (Novatech N1410) running Ubuntu 13.04 (32bit). Intel i5 with 8GB of RAM.

Ended up with the usual ’linux woes’ of getting things configured. main issue: all networking (wifi & ethernet) would fail after putting the laptop to sleep.

After an evening of googling, and subsequent dabbling, I pieced together enough information for this short fix.

Solution

You need to find the kernel module associated with your network device. As above mentions, for me it was both. You can get the information from lsmod, however lshw is a lovely tool that’s a bit more user friendly.

So install lshw, and use it to find your network interfaces:

sudo apt install lshw
sudo lshw -c network

Find your problematic device, and note down the requisite driver (found under “driver” in the configuration entry).

In my case:

  • Ethernet: r8169
  • Wireless: iwlwifi

The next step is simply to add this to the list of modules that are unloaded, and thus refreshed, when the OS is suspended. You will need to open a file using sudo, using your editor of choice:

sudo $EDITOR  /etc/pm/config.d/unload_modules

where $EDITOR is something like vim, emacs, or sublime.

Once open, append the line SUSPEND_MODULES: "$SUSPEND_MODULES _____", replaceing _____ with the driver found above. Save, and that should be job done.