Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
suspend to ram and network
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ufayzull
n00b
n00b


Joined: 30 Sep 2004
Posts: 54

PostPosted: Sat Feb 17, 2007 2:00 pm    Post subject: suspend to ram and network Reply with quote

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
View user's profile Send private message
opentaka
l33t
l33t


Joined: 18 Feb 2005
Posts: 840
Location: Japan

PostPosted: Sat Feb 17, 2007 3:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
ufayzull
n00b
n00b


Joined: 30 Sep 2004
Posts: 54

PostPosted: Sat Feb 17, 2007 5:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
ufayzull
n00b
n00b


Joined: 30 Sep 2004
Posts: 54

PostPosted: Sat Feb 17, 2007 5:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
opentaka
l33t
l33t


Joined: 18 Feb 2005
Posts: 840
Location: Japan

PostPosted: Sun Feb 18, 2007 3:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Sun Feb 18, 2007 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Sun Feb 18, 2007 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
opentaka
l33t
l33t


Joined: 18 Feb 2005
Posts: 840
Location: Japan

PostPosted: Sun Feb 18, 2007 8:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Sun Feb 18, 2007 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
ufayzull
n00b
n00b


Joined: 30 Sep 2004
Posts: 54

PostPosted: Mon Feb 19, 2007 12:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Mon Feb 19, 2007 8:22 am    Post subject: Reply with quote

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
View user's profile Send private message
ufayzull
n00b
n00b


Joined: 30 Sep 2004
Posts: 54

PostPosted: Tue Feb 20, 2007 2:32 am    Post subject: Reply with quote

OK, I'll just go with stopping eth0 for now.
Thanks for all the input!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum