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!