[SOLVED] S3 Sleep, would someone be so kind?


Recommended Posts

Hi everyone,

 

New UnRAID user here.  Came from using WHS but became frustrated and fed up of my HD movies stuttering over my homeplug network so migrated to an UnRAID pro setup.

Still have my WHS array so my data is safe so for that reason I am using the 5.0b3 release.

 

Have to say I'm very very impressed.  With the help of the forums here and the wiki so far I've got UnRAID up and running, installed unMENU, apcupsd, AirVideo to stream stuff to my iPhone, Bandwidth Monitor NG, iStat, UnRAID status alert sent hourly via e-mail and monthly parity check, pci utils, SMART tools and Clean Powerdown.

 

Never thought I'd get that far as I'm a linux newbie!  

 

Now I'm having problems with S3 sleep, Can't get it working at all with the default

 

echo -n mem >/sys/power/state 

 

command.  No problems, went down the S2Ram route instead.

 

Can telnet into my UnRAID server and use the command

 

/boot/custom/bin/s2ram -f

 

Which works beautifully and responds faultlessly to WOL from any of my other PCs or my iPhone.

 

However I'm trying to use the S3.sh script that has been posted in the forums here and this is where I'm stuck.

 

I have a number of PCs on  my network but actually the only one I'm really interested in is my HTPC and don't want my server to go to sleep if it's either on or preferably if it's streaming.  Most of the HTPC use is for Live TV which is all driven locally via MediaPortal and For The Record.

 

The IP address of my UnRAID box is 192.168.1.1 and my HTPC is 192.168.1.3, I have DHCP enabled on my Router (WNDR3700) but all my PCs are on reserved IP addresses therefore essentially static.

 

The script is residing in the boot\custom\bin\ folder and is called s3.sh and s2ram is in the same directory.  I have installed libx86-1.1.10i486 and my go file includes the line

 

/boot/custom/bin/s3.sh & #| at now + 1 minute

 

I've attached my s3.sh file and would be most grateful if anyone who is a little more experienced at Linux than me could take a look and tell me why it's not working.  (I have edited it in EditPad Lite using the Unix LF format)  I have left the configuration going for over 24 hours now but my UnRAID box has a severe case of insomnia.

 

Thanks for any help and I've also included my syslog as well (although I have just rebooted my server after turning DHCP off in my UnRAID configuration.

 

ATB and Thanks to the UnRAID Team for such a superb piece of software.

 

Neil

 

syslog-2011-02-08.txt

Link to comment

First, I am new to Linux. I did not try to understand your change to original S3.sh.

 

Here is how I use my server. The server is only use for backup and restore. The server is always asleep except that I have a task on a PC (Win 7 64b) at 1:59 AM everyday to wake up the server using WOL. At 2:00 AM, another task start the backup.

 

If I need to use the server at other time, I have on my PC a icon that I click to send a WOL to the server. When the server is running and after the disk spin down, the server is sending a ping every minutes to the PC. If the PC is responding, the server is not allow to enter sleep.

 

I included my S3.sh as an example

my_s3.txt

Link to comment

First, I am new to Linux. I did not try to understand your change to original S3.sh.

 

Here is how I use my server. The server is only use for backup and restore. The server is always asleep except that I have a task on a PC (Win 7 64b) at 1:59 AM everyday to wake up the server using WOL. At 2:00 AM, another task start the backup.

 

If I need to use the server at other time, I have on my PC a icon that I click to send a WOL to the server. When the server is running and after the disk spin down, the server is sending a ping every minutes to the PC. If the PC is responding, the server is not allow to enter sleep.

 

I included my S3.sh as an example

 

Thank you, when I have a little more time I will try your script, like the functions available in the one I already have but I think it may be useful to try a different approach and see if that works. 

 

Link to comment

Has anyone approached you with a solution yet?  I'm interested in this as well, because I have a strong desire to work on putting my server to sleep at night.

 

Montr has kindly given some input and another angle for me to try, but due to work pressures haven't yet given it a go.  There is plenty of information on the forum and I've done my best to digest it as much as possible but just need some help with this last bit.

 

I can recommend having a good read of http://lime-technology.com/forum/index.php?topic=3657.0

 

It certainly helps, as you can read in my first post there are essentially three different commands to get your server to go to sleep depending on what version of UnRAID you're using and whether your MB works with each one.  I have had to use the s2ram method, which does work beautifully for me, however the other two methods were somewhat unreliable on my hardware causing my box to hang when resuming requiring a dirty reboot and recheck of parity afterwards.

 

Link to comment

Don't quote me on this. I was using 5.02 beta and was informed by unraid support that it did not currently support Sleep functions. This was due to its status of beta. It is possible that 5.04 beta has that limitation as well. I had to downgrade to 4.6 to use the S3. Just putting this out there. I changed a lot of hardware and spent a lot of time trying to get it to work in 5.02 beta, then support posted a response to my message on the forum one day stating the above.

 

This is the link to the procedure for setting up wave up on lan and it works.

 

http://lime-technology.com/wiki/index.php?title=Setup_Sleep_%28S3%29_and_Wake_on_Lan_%28WOL%29

 

If using windows 7, make sure you turn on the telnet client.

Here is the VBs script that shutdown unraid in an orderly fashion. It works great. My server boots in under 30 seconds after being shutdown. I use eventghost wol feature to wake the server and to run and close the vbscript to shutdown the server.

shutdown.txt

Link to comment

Hate to say this, but NO version of unRAID officially supports S3 sleep.  It is apparently on the future feature list here in some form, but there are SO many different buggy implementations in various BIOS I doubt if it will ever be consistent.

 

See here: http://download.lime-technology.com/develop/infusions/aw_todo/task.php?id=18

 

The description is listed for 5.? (not even 5.1):

Power management features:

- "official" support of S2 standby. In the past this has been unreliable because of bios issues in many motherboards. Probably a lot more stable now.

 

The method to put a server to sleep in the linux kernel used in 4.6 is different than in the 4.7 version.  The button in unMENU will no longer work and I've not had any opportunity to update it to detect the difference and use the correct command since there have been so many issues and changes I've needed to deal with in the 4.7 and 5.0-beta releases.

 

I've personally never gotten S3 sleep to wake up successfully on the C2SEE Motherboard that lime-tech uses.  It is not important to me to spend a lot of time on since my server is up 24/7 anyway.  (It will go to sleep, but never wake up)

 

Good luck, but with different motherboards needing different techniques to restore video and network connectivity after waking, it will on be a trial-and-error basis.  Do not hold your breath waiting for lime-tech.  

 

It is not that 5.0beta2/3/4/? do not support S3 sleep... none "officially" do.

 

Joe L.

Link to comment

I have a GigaByte Atom D510 processor motherboard, 2GB RAM, 1 Seagate 1TB 5900RPM low-power (model:?), 120 mm fan and pico-supply. The S3 sleep to RAM and WOL works perfectly, no glitch with unraid 4.6 and now 4.7. I used the server is used only for backup. The server runs for about 15 mins everyday except for the first day of the month where is full image is done, about 3 hours. In sleep mode, the power consumption is about 2W. When running with drive spinning, the power consumption is about 30-32W.

Link to comment

S3 Sleep & WOL works perfect on my server. (V5-Beta4)

 

All disk spinning is about 100W in sleep is it 2W

 

With V5 I'm using powernow-k8 so instead of 2.2Ghz is it running now at 800Mhz, so I think it would be around 75W instead of 100W

 

Using the server for streaming movies  ;D and backups for 2 PC & my Hackintosh  :D

 

//Peter

Link to comment

I'm reading this thread with interest.  Putting my unRAID server to sleep would be great, but I read in a post quite some time ago that it probably wasn't a good thing to do in a situation where you are relying on it to perform a backup if a disk failed. (Sorry can't remember the exact wording).

 

But after reading this thread it suddenly occurred to me (I'm a little slow :D) that I could put it to sleep over night then have it wake at a certain time the next day.  That would certainly suit my needs and I wouldn't have to worry about waking it every time I want to use it.

 

A couple of questions I'd like to know from those that put their servers to sleep...

 

1 - Do all the drives spin up when you wake it up?

 

2 - If so, can you store their state in RAM so they don't?

 

Thx

Link to comment

I'm reading this thread with interest.  Putting my unRAID server to sleep would be great, but I read in a post quite some time ago that it probably wasn't a good thing to do in a situation where you are relying on it to perform a backup if a disk failed. (Sorry can't remember the exact wording).

 

But after reading this thread it suddenly occurred to me (I'm a little slow :D) that I could put it to sleep over night then have it wake at a certain time the next day.  That would certainly suit my needs and I wouldn't have to worry about waking it every time I want to use it.

 

A couple of questions I'd like to know from those that put their servers to sleep...

 

1 - Do all the drives spin up when you wake it up?

 

2 - If so, can you store their state in RAM so they don't?

 

Thx

 

I have set my server to go asleep at a set time but I don't think it's possible to set it to wake up at a specific time. My server wakes up when my media player is switched on or when I run a WOL program from my PC

Link to comment

As I describe in my post #2, I wake up the server from a Win7 PC that send a WOL to the server. The scheduled task wake up the Win7 PC first and then wakeup the server. One minute later, another task start the backup.

 

On unRaid, I do not know a command that can do a wakeup. Another option is to schedule a wakeup from the BIOS if you have that option in your BIOS.

WOL_wakeup.png.3b147e48ee9198dfb93c431c3e2f4b29.png

WOL_trigger.png.9edbfdbd373ff39cf006246c5ca4b545.png

Link to comment

I'm reading this thread with interest.  Putting my unRAID server to sleep would be great, but I read in a post quite some time ago that it probably wasn't a good thing to do in a situation where you are relying on it to perform a backup if a disk failed. (Sorry can't remember the exact wording).

 

But after reading this thread it suddenly occurred to me (I'm a little slow :D) that I could put it to sleep over night then have it wake at a certain time the next day.  That would certainly suit my needs and I wouldn't have to worry about waking it every time I want to use it.

 

A couple of questions I'd like to know from those that put their servers to sleep...

 

1 - Do all the drives spin up when you wake it up?

 

2 - If so, can you store their state in RAM so they don't?

 

Thx

 

For me, when I put my Asus AMD based board to S3 sleep, it consumes less then  1 watt.  But when I send the magic packet to wake it up all my drives spin up. Power surge and a long delay just to browse a directory.  I didn't like the spin up so I keep it active, with a under-clocked, passive cooled CPU and 2 hour drive spin-downs.

 

 

Link to comment

The drives spinning up is something I wouldn't be happy about as well - better to leave the server running and all the drives spun down. Still, in saying that, I guess all my drives are spinning when I start the server from scratch each day.  I could get my linux-based xbmc-ion to send a magic packet on first start to wake the server up, then leave it ticking over for the rest of the day.

 

I was told some drives have a jumper that keeps them spun down when resuming from S3, but it seems my WD drives don't have this.  Pity it's not something that can be set in the bios or the drives firmware.

Link to comment

Hate to say this, but NO version of unRAID officially supports S3 sleep.  It is apparently on the future feature list here in some form, but there are SO many different buggy implementations in various BIOS I doubt if it will ever be consistent.

 

See here: http://download.lime-technology.com/develop/infusions/aw_todo/task.php?id=18

 

The description is listed for 5.? (not even 5.1):

Power management features:

- "official" support of S2 standby. In the past this has been unreliable because of bios issues in many motherboards. Probably a lot more stable now.

 

The method to put a server to sleep in the linux kernel used in 4.6 is different than in the 4.7 version.  The button in unMENU will no longer work and I've not had any opportunity to update it to detect the difference and use the correct command since there have been so many issues and changes I've needed to deal with in the 4.7 and 5.0-beta releases.

 

I've personally never gotten S3 sleep to wake up successfully on the C2SEE Motherboard that lime-tech uses.  It is not important to me to spend a lot of time on since my server is up 24/7 anyway.  (It will go to sleep, but never wake up)

 

Good luck, but with different motherboards needing different techniques to restore video and network connectivity after waking, it will on be a trial-and-error basis.  Do not hold your breath waiting for lime-tech.  

 

It is not that 5.0beta2/3/4/? do not support S3 sleep... none "officially" do.

 

Joe L.

 

Thanks Joe,

 

I understand that it's not officially supported, my problem is that I've got s3 working fine, just have a problem with the script I originally posted so it never goes into s3 sleep.  My server is only used for streaming so makes perfect sense for it to be asleep for large portions of the day/week.

 

Still hoping someone could be kind enough to look at my script and advise!

 

:)

Link to comment

do you have bwm-ng installed?

 

What happens when you run the script in the foreground using the -xv option of the shell?

 

Invoke it in a telnet window as

sh -xv s3.sh

and watch as variables are evaluated.

 

The method to go to sleep in 5.0b4 is DIFFERENT than in earlier versions of unRAID.  If the s2ram is using the wrong method, the server will not go to sleep

 

Joe L.

Link to comment

do you have bwm-ng installed?

 

What happens when you run the script in the foreground using the -xv option of the shell?

 

Invoke it in a telnet window as

sh -xv s3.sh

and watch as variables are evaluated.

 

The method to go to sleep in 5.0b4 is DIFFERENT than in earlier versions of unRAID.  If the s2ram is using the wrong method, the server will not go to sleep

 

Joe L.

 

Yep, got bwm-ng installed

 

Used sh -xv s3.sh and watched carefully, everything was working up until the point it was supposed to go to sleep and it stated that libx86-1.1-i486-1.tgz wasn't installed.  So added the line

 

installpkg /boot/packages/libx86-1.1-i486-1.tgz

 

to my go file and hey presto, seems to be working now.

 

Thanks Joe.  Never would have done it without your help.

 

Neil :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.