Ubuntu fix network stopped working after resume from sleep

I'm currently using Ubuntu Lucid on my HP Compaq CQ56 laptop. It is really Linux friendly laptop, but like every other configuration it needs some tweaking to really shine. In this post I will show you how to fix problem with ethernet network not working after resume from sleep. This procedure works for ethernet or wifi network devices, or any other hardware device that makes problems after resume from sleep.

First thing is to find out the kernel module that makes your network hardware alive (and dead after resume from sleep). It takes some knowledge to determine this name, usually it starts with "r" if you have Realtek NIC or "rt" for Ralink wifi hardware but it could be anything else. It might help to look into your hardware specification. To see the list of loaded kernel modules use this command:

sudo lsmod

The result of that command would be the list like this one:

r8169                  34108  0 
mii                     4381  1 r8169
binfmt_misc             6587  1 
videodev               34361  1 uvcvideo
v4l1_compat            13251  2 uvcvideo,videodev
rt3090sta             905769  0 
vboxdrv               230432  2 vboxnetadp,vboxnetflt
joydev                  8740  0 

Problem on my laptop is with Realtek 8169 ethernet device whose network connection is lost after returning from sleep. So name I was looking for is the name of "r8169" kernel module from the list above. Next thing is to add this kernel module to the list of kernel modules to unload before going to sleep and reload after returning from sleep. We do this by editing (creating it if it doesn't exist) /etc/pm/config.d/unload_modules file like this:

sudo gedit /etc/pm/config.d/unload_modules

Now we add following to that file (you should replace "r1869" with the name of kernel module that is making problems for your configuration):


That is it. Now put your PC to sleep and test is your troublesome hardware working after resume. If you feel kind you can also report here if it works or not. Cheers!


A quality focused Magento specialized web development agency. Get in touch!

70 thoughts on “Ubuntu fix network stopped working after resume from sleep

  1. keanne

    I have a Toshiba Satellite Pro L450 and this did not work. Neither the wired or wireless is working after suspend or reboot. Help!

  2. Sean

    Works perfectly on a Lenovo Thinkpad X61 with a USB wireless adapter. Going into and out of sleep or hibernate mode on Debian Wheezy.

  3. Pete

    After the change, the Suspend does not work at all … hmmm… the computer is running and I can see the wireless reconnecting OK , which is great :-), but I need this after coming back from ‘sleep’ … any thoughts. I am using Ubuntu 14.04 LTS 64 bits.

  4. David

    This saved the day for me — Ubuntu-MATE 14.04 on a Dell Inspiron 1545 (driver is ‘wl0’). I had already used ‘lshw -C network’ to find the wireless driver name, so for me it was just a matter of creating the file in /etc. Thanks for the great info!


Leave a Reply

Your email address will not be published. Required fields are marked *