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:
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!
I have a Toshiba Satellite Pro L450 and this did not work. Neither the wired or wireless is working after suspend or reboot. Help!
Works great on a Dell Dimension E520 and a couple of Acer laptops.
Thanks for your knowledge.
Works perfectly on a Lenovo Thinkpad X61 with a USB wireless adapter. Going into and out of sleep or hibernate mode on Debian Wheezy.
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.
Sorry, my bad , I had a bad line of code in the file when I saved it … Suspend and reconnect works fine 🙂
It doesnt work for me. I’m running Mint 17 and my network driver is iwlwifi. My hotkeys also stop working after a suspend.
Thanks a lot, worked for me:
Fedora 20 & Ubuntu 14.04
Works on Asus Zenbook UX32A.
But you forgot to mention that you need to make the unload_modules file executable (sudo chmod 755 /etc/pm/config.d/unload_modules)
And big THX! 🙂
strage, worked perfect for an hour or so … sry but i think my problem is somewhere else … 🙁
Laptop:Hp Pavilion dv5
Module: r8169 62190 0
Thanks so much! Works on thinkpad Edge E430 running ubuntu 14.04 with realtek r8169 module.
Any reason on why this is not a default behaviour? That certainly pushes away the average user.
This worked great on my compaq CQ62.
Life saver, thank you! Worked great on my HP with Xubuntu.
Thanks for your advise it’s totaly working for my Asus K55V
My ethernet hardware was Realtek r8169 like yours
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!
Don’t work on LMDE 2 with r8169.
Any help ?
Thanks for this solution!
For anyone who is suffering from this problem on an iMac 12,2 (mid 2011 model, Atheros wireless card, ath9k driver, Ubuntu 18.04 LTS):
> sudo gedit /etc/pm/config.d/unload_modules
SUSPEND_MODULES=”$SUSPEND_MODULES cfg80211 mac80211 ath ath9k ath9k_common ath9k_hw”
> Save and exit.
> sudo ls -l /etc/pm/config.d/unload_modules
If not already executable:
> sudo chmod 755 /etc/pm/config.d/unload_modules#
I don’t know if all these modules and commands are necessary, but it works for me, so I give zero f**** why, because it annoyed me for so long already.