View previous topic :: View next topic |
Author |
Message |
ufayzull n00b
Joined: 30 Sep 2004 Posts: 54
|
Posted: Sat Feb 17, 2007 2:00 pm Post subject: suspend to ram and network |
|
|
Hi,
I'm trying to get this suspend to ram to work.
My script is pretty simple, consists of just this line:
Code: | #echo -n "mem" > /sys/power/state |
Everything works, except when the PC wakes up the network doesn't work anymore. I can't ping anything and basically I have to restart network with Code: | #/etc/init.d/net.eth0 restart |
The motherboard is ASUS A8N-E and I'm using integrated nVidia gigabit NIC with forcedeth driver.
Uname info:
Code: |
# uname -a
Linux snow 2.6.19-beyond4 #3 SMP Fri Feb 16 23:34:38 EST 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
|
Does anyone have ideas on this? TIA. |
|
Back to top |
|
|
opentaka l33t
Joined: 18 Feb 2005 Posts: 840 Location: Japan
|
Posted: Sat Feb 17, 2007 3:34 pm Post subject: |
|
|
Bringing down the interface and restarting the interface should work:
/etc/hibernate/common.conf
Code: |
### network
DownInterfaces eth0
UpInterfaces eth0
|
or if this does not work, try editing the line in the same file:
Code: |
### services
RestartServices net.eth0
|
_________________ "Being defeated is often a temporary condition. Giving up is what makes it permanent" - Marilyn vos Savant
|
|
Back to top |
|
|
ufayzull n00b
Joined: 30 Sep 2004 Posts: 54
|
Posted: Sat Feb 17, 2007 5:05 pm Post subject: |
|
|
opentaka,
Could you please clarify this for me.
So what you saying is that after waking from suspend the network is always down no matter what, and it does not depend on my NIC or the NIC's driver? And it is the nature of suspend? So before going into the suspend mode I have to bring my ethNs down and then during wakeup I have to bring them back up again?
Or are you suggesting this as a fix to the problem I have?
Thank you. |
|
Back to top |
|
|
ufayzull n00b
Joined: 30 Sep 2004 Posts: 54
|
Posted: Sat Feb 17, 2007 5:18 pm Post subject: |
|
|
Another thing, what package is /etc/hibernate/common.conf is part of?
I'm not using it on a laptop (well I guess you know it already the motherboard is ASUS A8N-E), and all I have is "sys-power/acpid-1.0.4-r3" package. I listen to the power button and when it is pressed i just issue "echo -n "mem" > /sys/power/state".
It doesn't really matter thou, I could add "/etc/init.d/net.eth0 stop" on suspend and "/etc/init.d/net.eth0 start" on wakeup. |
|
Back to top |
|
|
opentaka l33t
Joined: 18 Feb 2005 Posts: 840 Location: Japan
|
Posted: Sun Feb 18, 2007 3:59 am Post subject: |
|
|
ufayzull wrote: | Another thing, what package is /etc/hibernate/common.conf is part of?
I'm not using it on a laptop (well I guess you know it already the motherboard is ASUS A8N-E), and all I have is "sys-power/acpid-1.0.4-r3" package. I listen to the power button and when it is pressed i just issue "echo -n "mem" > /sys/power/state".
It doesn't really matter thou, I could add "/etc/init.d/net.eth0 stop" on suspend and "/etc/init.d/net.eth0 start" on wakeup. |
Ah, I thought you are using suspend2, which I strongly recommend:
http://gentoo-wiki.com/HOWTO_Software_Suspend_v2 _________________ "Being defeated is often a temporary condition. Giving up is what makes it permanent" - Marilyn vos Savant
|
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Sun Feb 18, 2007 7:32 pm Post subject: |
|
|
Suspend 2 is more like suspend to disk than suspend to RAM. IMO, Suspend 2 is a workaround for machines with buggy or missing suspend to RAM implementations. While Suspend 2 may be better than nothing, suspend to RAM is substantially better than Suspend 2, as suspend to RAM is nearly instantaneous for both suspend and resume. _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
widremann Veteran
Joined: 14 Mar 2005 Posts: 1314
|
Posted: Sun Feb 18, 2007 7:53 pm Post subject: |
|
|
Mad Merlin wrote: | Suspend 2 is more like suspend to disk than suspend to RAM. IMO, Suspend 2 is a workaround for machines with buggy or missing suspend to RAM implementations. While Suspend 2 may be better than nothing, suspend to RAM is substantially better than Suspend 2, as suspend to RAM is nearly instantaneous for both suspend and resume. |
It's not an either-or type thing. There are pros and cons of each...it depends on what you are doing. Suspend to RAM is quick, yes, but it also uses battery, so eventually you may run out of battery. Suspend to disk doesn't use battery and also allows you to boot to other operating systems even while suspended. It may be a little slower, but that's usually not a big deal. |
|
Back to top |
|
|
opentaka l33t
Joined: 18 Feb 2005 Posts: 840 Location: Japan
|
Posted: Sun Feb 18, 2007 8:31 pm Post subject: |
|
|
Mad Merlin wrote: | Suspend 2 is more like suspend to disk than suspend to RAM. IMO, Suspend 2 is a workaround for machines with buggy or missing suspend to RAM implementations. While Suspend 2 may be better than nothing, suspend to RAM is substantially better than Suspend 2, as suspend to RAM is nearly instantaneous for both suspend and resume. |
suspend2 = hibernate + hibernate-ram ; !=swsusp _________________ "Being defeated is often a temporary condition. Giving up is what makes it permanent" - Marilyn vos Savant
|
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Sun Feb 18, 2007 11:05 pm Post subject: |
|
|
widremann wrote: | Mad Merlin wrote: | Suspend 2 is more like suspend to disk than suspend to RAM. IMO, Suspend 2 is a workaround for machines with buggy or missing suspend to RAM implementations. While Suspend 2 may be better than nothing, suspend to RAM is substantially better than Suspend 2, as suspend to RAM is nearly instantaneous for both suspend and resume. |
It's not an either-or type thing. There are pros and cons of each...it depends on what you are doing. Suspend to RAM is quick, yes, but it also uses battery, so eventually you may run out of battery. Suspend to disk doesn't use battery and also allows you to boot to other operating systems even while suspended. It may be a little slower, but that's usually not a big deal. |
Certainly in this case (a desktop machine), battery consumption is not an issue, and for a laptop, it's really not an issue unless you're leaving the laptop suspended and unplugged for days or weeks at a time (a use case I've never encountered).
I also don't dual boot any of my machines, so being able to boot another OS while one is suspended also isn't an interesting use case to me.
Mind you, I do suspend and resume my main laptop quite frequently, so any loss of speed there would be glaringly obvious. _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
ufayzull n00b
Joined: 30 Sep 2004 Posts: 54
|
Posted: Mon Feb 19, 2007 12:39 am Post subject: |
|
|
I installed "hibernate-script" and added DownInterfaces eth0, UpInterfaces eth0 to the common.conf.
Everything seems to work fine.
I'm curious thou, Mad Merlin, do you have to stop and start eth0 during suspend? Or is it NIC/driver specific issue? |
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Mon Feb 19, 2007 8:22 am Post subject: |
|
|
ufayzull wrote: | I'm curious thou, Mad Merlin, do you have to stop and start eth0 during suspend? Or is it NIC/driver specific issue? |
No, I don't need to restart any of my net devices when suspending and resuming, it's likely a NIC/driver specific problem. _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
ufayzull n00b
Joined: 30 Sep 2004 Posts: 54
|
Posted: Tue Feb 20, 2007 2:32 am Post subject: |
|
|
OK, I'll just go with stopping eth0 for now.
Thanks for all the input! |
|
Back to top |
|
|
|