PDA

View Full Version : No network after resume.


eqisow
2009-02-04, 17:15
I installed XBMC on Intrepid minimal using this (http://xbmc.org/wiki/?title=HOW-TO:_Install_XBMC_for_Linux_on_Ubuntu_8.10_(Intrepi d)_step-by-step) guide.

I finally have most of the kinks worked out, except one.

I have no network after resume from RAM. I'm not sure what logs or info to post with this, except to say that I don't recall having this problem when I was testing xbmc (installed the same way) on my pc, before buying the htpc. My wireless is an Edimax-7727-in running the RT2760 chipset.

Any help, guides, or advice on either of those issues would be muchly appreciated!

Edit: I put a script containing only "/etc/init.d/networking restart" in /etc/acpi/resume.d. The error goes from something like "network unavailable" to the network being "up," but not being connected. ie. it says network shares unavailable instead of network unavailable.

What's more, I can drop to the command line and issue "sudo /etc/init.d/networking restart" after it resumes and get networking back. This is obviously an unacceptable solution for an htpc, but it makes me wonder why it doesn't work in the script.

Edit again: I tried adding unloading and loading of the wireless module to the script - no dice. I tested and the stop/start scripts work perfectly if I run them manually. Surely this isn't a permissions problem? I'm not sure where the suspend/resume log is.. guess I'll look.

Maxim
2009-02-04, 23:52
I can tell you you're definitely on the right track. Be careful about the doc's and howtos you find out there since Ubuntu made some changes to how the power management worked and the older docs will lead you chasing ghosts.

You're definitely on the right track though.

Also a thing about the networking service and ubuntu. Ubuntu doesn't use /etc/init.d/networking exclusively. If you have a GUI based install then most likely your networking isn't getting loaded until X is loaded and NetworkManager is brought up.

If you haven't configured /etc/network/interfaces for /etc/init.d/networking to use then you're not going to have networking at all when using /etc/init.d/networking.

Another thing might be that the resume script is running /etc/init.d/networking before the drivers have loaded up. I'm not fully familiar with it, but that's what it seems to me.

eqisow
2009-02-05, 00:21
Thanks Max. I do indeed have a static IP set up with /etc/network/interfaces and the only GUI I have is XBMC, which doesn't seem to have any sort of real network manager.

Would adding a sleep 5 to the script help, or would acpi just sit and wait for it to finish before moving to the next script?

Oh, I already tried moving the script from 62 to 97, just before acpi unlock. maybe after? not even sure that works...

Maxim
2009-02-05, 00:49
Well, I have a feeling that it's something to do with the wireless. I see a script on my machine in /etc/acpi/ that is 63-wifi-radar.sh. I would imagine that the driver would be turned on, and then the wifi-radar would do the negotation with access point. I don't have any experience with wireless adapaters in Linux so i'm at a loss as to what it could be. You can definitely try a sleep somewhere, it can't do anything but help. Maybe it just a needs a few seconds to think things over.

eqisow
2009-02-05, 01:22
That's exactly what happens on a full ubuntu system, but wifi radar's not going to work very well for me.

Sleep doesn't help. Moving to 97 doesn't help. I'm a little lost at this point, honestly.

ronie
2009-02-05, 02:14
As far as i know Ubuntu is moving to pm-utils and dropping acpi-support.
You might want to have a look at the scripts in /usr/lib/pm-utils/sleep.d
Custom scripts should be defined in /etc/pm-utils/sleep.d

The suspend/resume logfile is /var/log/pm-suspend.log
At least this is the case on my pc (Ubuntu Jaunty).

Also take a look at /etc/defaults/acpi-support, i think (not sure) the suspend method is defined in this file (whether to use acpi-support or pm-utils).

Hope this'll get you somewhere.

eqisow
2009-02-05, 03:44
Holy <expletive>! Thank you ronie. A simple network stop/start script in /usr/lib/pm-utils/sleep.d fixed my problem. I love the Ubuntu guys, but I can't believe they changed suspend daemons, moved the scripts, and left the old useless ones there. That was quite a few hours of unnecessary frustration. :(