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):
SUSPEND_MODULES="$SUSPEND_MODULES r8169" |
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!
Thank a lot! This worked for me! I have a HP Pavilion Tx 2000 and I am using Ubuntu 10.10.
@Hiren C Bhatt
Hi! Thanks for reporting your findings. Ubuntu Maverick is the last sane Ubuntu 😉
Hi Marko,
forget network, i have issues just booting my laptop once it enters sleep mode.
any fix for this?
http://ubuntuforums.org/showthread.php?t=1742470
even this dint work for me.
http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
Thank you
Thank you for good information! Work fine!
My environment >
ThinkPad X61
Ubuntu 11.10
USB Wireless LAN : GW-USHYPER300
Thanks man, you save me,
Same hardware, same driver, same problem, same solution xD
Looks like this solved my problem with wifi on lenovo S12 ion (module wl), now I am able to connect after resume, I use WICD instead NM.
It worked for me, with the same kernel module “r8169”
At first it didn’t work, but after I rebooted Ubuntu I was able get my network working after sleep.
Ubuntu 11.10
HPDV51128ca
Realtek RTL8102E
It worked for me also.
Lucid 10.04 with ath9k module which prevented me to connect wirelessly after suspend
Whooo Hooo worked for me too. Not being a linux guru (windows me — Boooo) I’m well on my way to liking what I see.
Compaq 500 nouvo module now tick-a-tee boo
Thanks Netman
Brilliant, I was sick of having to re-boot after suspend to get wlan back online, this did the trick!!
Many thanks to you sir!! 🙂
You are a dipshit if you used to reboot, just turn the adapter off then back on and it’s fine. All laptops have a switch or a button to disable, if it’s a desktop with a dongle just unplug the dongle and plug it back in.
PS – Toshiba Satellite Pro C660 – 2F6
Ubuntu 11
Realtek r8169
Terrell Baranski
Thanks 🙂
it was really annoying that standby didn’t work
Thanks, i have problem with Ubuntu 12.04 with r8712u – wifi dos not work after suspend.
As you wrote, SUSPEND_MODULES=”$SUSPEND_MODULES r8712u” in
/etc/pm/config.d/unload_modules and it works fine!
Perfect on my debian squeeze@macbook pro. That pesky b43 wireless adapter can be a real pain in the a…
Perfect, it fixed my wired network issue on my laptop, Ubuntu 12.04. Mine was also r8169.
You just saved my day. This has been bugging me for quite some time. Thank you!
Another victory (and my first delve into the terminal) – How’s about that then!
via_rhine seems to be a popular LAN module
Thanks a lot!!!
Damn, I thought this was the fix Ive been waiting for, but saly it does not seem to have worked. 🙁
Mine was iwl3945
So I put SUSPEND_MODULES=”$SUSPEND_MODULES iwl3945″
into the file, and nothing has changed, 🙁
Any ideas? thank you.
Hi. Check
dmesg
command after returning from suspend was module really unloaded. If it was unloaded then problem is unfortunately elsewhere, most probably inside iw3945 kernel module.ok thank you. I will try to see what’s up. Thanks for the reply. 🙂
Thank you!
Worked like a charm.
In my case i needed to “wake up” more than one NIC,
If anyone need it, just put a comma between them, like this:
SUSPEND_MODULES=”$SUSPEND_MODULES module1, module2, module3″
Man, you don’t know how much I am happy now!
Thanks!
It works perfectly for me.
But for my case it slowed also my hibernate wake-up, I mean that before this trick I could hibernate or suspend my 12.10 ubuntu distro and have a fast reboot, but now I must wait a little … anyway it`s perfetc for wifi modules.
Thank you (I am luky i have the same wifi adapter of you!)
You’re awesome!
Output of lsmod
Module Size Used by
rtl8192ce 53641 0
rtl8192c_common 48780 1 rtl8192ce
rtlwifi 74749 1 rtl8192ce
Added this line tonew file /etc/pm/config.d/unload_modules
SUSPEND_MODULES="$SUSPEND_MODULES rtl8192ce"
Seems to have solved my problem of wifi being finicky after resuming from suspend on my Toshiba Satellite C855.
Thanks
Works for me! I just installed Ubuntu and would not be keeping it if I wasn’t able to get wifi after suspend working.
You’re a lifesaver!
Thanks mate, you are awesome!
That worked perfectly for me. USB wireless (r8712u) would not reload after suspend.
Ubuntu 12.04LTS, Dell D620 laptop w/ Asus Wireless N USB (r8712u)
Thanks, this solution finally solved my wifi issues 🙂
Sapphire Edge HD-3 (r8712u module) at Xubuntu 12.04 LTS!
r8127u did not work after suspend. built this file and it works great now. only line in file is: I have ubuntu 12.04
SUSPEND_MODULES=”$SUSPEND_MODULES r8712u”
great i made it and it works,,,,
BUT after i shut down the system and start again the systems stops and keep giving me message waiting to reload nework configuration and after long time it logged in with no ethernet working at all,,,and removed the line again to make it run normally but of course it is back again not working the ethernet after wake up ,,,help,,,Please!!!!
works fine with my ubuntu 12.04 (unity) and r8712u
Thanks! This works with my Netgear WN511B PCMCIA wi-fi adapter (lib80211 kernel module). Thank you again!
Work fine for USB Modem on Ubuntu 12.04
SUSPEND_MODULES=“$SUSPEND_MODULES usbserial”
Thanks alot mat
Thanks for this awesome advice!
Didn’t work on my Samsung NP535U using ath9k wifi chip. After waking up from hibernation, the network applet in the task bar said “Wifi disabled by hardware switch”
I had to do the following in the terminal:
sudo rfkill unblock wifi
then the wifi came back on.
hope this benefits someone
Thanks a lot. Works for me!
Doesn’t work on the latest Ubuntu…
I’d like to express my thanks also for this well explained solution. I am running Kubuntu 13.10 on a Lenovo T60, using a Realtek RTL8191SU (sold by Rosewill):
lsusb
Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
During the install Kbuntu installed the r8712u module:
~$ sudo lsmod | grep r8
r8712u 158680 0
and it always activated the adapter nicely during boot up. But after going to sleep and waking, it was inactive. Your solution worked perfectly, and now it reliably wakes up. Thank you again!
I have atheroe USB WIFI with the same module (r8169) but I add he following:
SUSPEND_MODULES=”$SUSPEND_MODULES r8169, ath9k_common, ath9k_htc, ath9k_hw, ath, mac80211″
Sorry, my English is bad
Working like a charm on Elementary OS Luna 64-bit with USB wi-fi adapter named Planet (driver name is rtl8192cu).
Thanks a lot Marko.
It does not work for me. I use Debian GNU/Linux (testing) and my ethernet card uses the
r8169
module. When I resume the system I can see the interface withifconfig
but it does not work, even if I turn it down and up.Worked perfectly:
-Ubuntu 13.10
-Qualcomm Atheros AR8171/8175 PCI-E Gigabit Ethernet Controller
-SUSPEND_MODULES=”$SUSPEND_MODULES alx”
Thanks!
I was having the same problem with my Toshiba C655 running Linux Mint 13. It would not connect after waking from Suspend or Hibernate. (Hibernate isn’t enabled by default in this distro but I searched and found a way to enable it.) After restarting, however, it connected immediately. Luckily I found this post, followed the instructions, and edited with the following:
SUSPEND_MODULES=”$SUSPEND_MODULES rtl8192ce”
Solution works perfectly! Thanks, Marco!
Worked for me on an old Acer Travelmate 2350 with ubuntu 12.04 using a Trendnet WiFi adapter. Many thanks for sharing your expertise.
Like a charm!
Compaq nc6320
Debian Wheezy
‘EDUP’ Realtek 8192 usb-nic.
Thank you!
I got it working also!
lsusb -command told me I have have:
0bda:8172 Realtek Semiconductor Corp. RTL8191S WLAN Adapter
did the following:
sudo gedit /etc/pm/config.d/unload_modules
added this line (file was empty):
SUSPEND_MODULES=”$SUSPEND_MODULES r8712u”
Save and try to suspend + startup, should work.
I hope this helps someone also 🙂
Perfect solution!! Thanks a lot!
Thanks,
But this problem persists for me even after doing the same. The driver is “e1000e” for my machine. Do, I need to restart the machine for the script to work. Thanks for the help.
The solution worked for me on a Dell Latitude 3330 laptop with Ubuntu 12.04. Thank you! How can I do the same for hibernate?
Thanks.