Looking for better ideas how how to sleep/suspend my unraid box


Recommended Posts

100% agree with agw!

 

forget about all the scripts and check, if your machine supports S3 properly (by far not all HW/BIOS combinations do!).

 

Entering S3 from commandline:

 

echo 3 > /proc/acpi/sleep

 

pressing powerbutton should then wake up your machine - check syslog if everything is fine. If yes, at least S3 mode entering worked fine and reinitializing too.

 

Second check, if waking up the server via magic packet (instead of power button) works by sending a magic packet to your NICs MAC address

 

if all this is fine, you can try integrate those scripts - otherwise you won't be able to use them anyway with your setup.

 

and btw: S3 is not officially supported by Tom/limetec - probably because of the problems with so many HW/BIOS environments I assume - I had to change my MoBo to get it working ;-)

 

 

 

 

Link to comment

After more testing it appears the system will wake from s3 properly if a monitor is attached, but not if there is no monitor attached.

Anyone have a clue why this may be?

 

Most likely it's due to a bug/feature in the MB BIOS implementation of S3.

Seems to be. After flipping ACPI bios settings willy nilly, it is now working....mostly. It doesn't re-post video on resume, but I don't care. It's a headless system now that its running anyhow.
Link to comment

After more testing it appears the system will wake from s3 properly if a monitor is attached, but not if there is no monitor attached.

Anyone have a clue why this may be?

 

Most likely it's due to a bug/feature in the MB BIOS implementation of S3.

Seems to be. After flipping ACPI bios settings willy nilly, it is now working....mostly. It doesn't re-post video on resume, but I don't care. It's a headless system now that its running anyhow.

 

I had the same problem and solved it by using S2RAM.

Link to comment

I finally am able to sleep and wake with "echo 3 >/proc/acpi/sleep" & "wakeup.bat" from wiki. It was a firewall issue that prevented it from waking. So, I've put the server to sleep and awoken it many times to be sure there is no issue. Thanks for directing my efforts here first.

 

My next problem is the scripts. I downloaded "bwm-ng-0.6-i486-2bj.tgz" and put it in "/boot/packages". Do I leave "bwm-ng-0.6-i486-2bj.tgz" as-is, or do I extract it? It contains "bwm-ng-0.6-i486-2bj.tar", which contains "install" & "usr" folders. I put this in my "go" file: installpkg /boot/packages/bwm-ng-0.6-i486-2bj.tgz

Does the order of items matter in the "go" file? I just placed it next in line.

 

I renamed ReneV's latest to s3.sh and placed it in: /boot/custom/bin

The only thing I changed was: noCountdownHours=""

I added this to the "go" file under the one above: /boot/custom/bin/s3.sh | at now + 1 minute

 

The drives spin down like normal, but the server never sleeps.

 

What am I doing wrong?

 

 

EDIT: Nevermind. It's working. I didn't have "fromdos <"

Everything is working so far. Thanks again.

Link to comment
  • 2 weeks later...

Hi!

 

I am using reneV's script and I am not able to get the "ping" setting working.

The server goes to sleep even if the clients are still online.

 

My config:

# [CONFIGURATION]

# before going to sleep
intrnlTimeoutTicks=20	# ticks after HDD spindown before checking for external activity
extrnlTimeoutTicks=1	# ticks of no external activity before sleep; only after spindown+internal countdown

# control of internal timeout
checkHDDs=$yes		# check if all HDDs are parked before counting down towards sleep
noCountdownHours=""	# only countdown towards sleep outside these hours
			# example: <noCountdownHours="07 08 19 20">
			# always countdown: <noCountdownHours="">

# control of external timeout 
checkTCP=$no		# check for TCP activity

pingIPs="192.168.1.166 192.168.1.155 192.168.1.22" # do not sleep if <$pingsIPs> are pingable
			# example: <pingIPs="192.168.1.4 192.168.1.5">
			# no ping-check: <pingIPs="">

# after waking up from sleep
doDhcpRenewal=$no	# <$no> for servers w/static IP address
forceGb=$yes		# might not be needed; probably always safe

# [/CONFIGURATION]

 

manaul pinging works

root@Tower:~# ping 192.168.1.166 -c 3
PING 192.168.1.166 (192.168.1.166) 56(84) bytes of data.
64 bytes from 192.168.1.166: icmp_seq=1 ttl=128 time=9.33 ms
64 bytes from 192.168.1.166: icmp_seq=2 ttl=128 time=0.328 ms
64 bytes from 192.168.1.166: icmp_seq=3 ttl=128 time=0.332 ms

--- 192.168.1.166 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2008ms
rtt min/avg/max/mdev = 0.328/3.333/9.339/4.246 ms

 

Do I need the bwm-ng package for pinging, too?

 

Link to comment

I've run the script that's been posted up here, but the system never shut down overnight.  I confirmed sleep to s3 works on my mobo, the gigabyte ga-ma785g-ud3h and I can wake it with the wolcmd packet. I do have 3 WDC 1TB drives added to the system but not in the array.  I currently only have the free license at the moment and plan on having the full within the next week.  Could it be that the script cannot verify those drives have no activity since they're not in the array or something?  Not sure why the script never kicked in overnight. 

 

Also, where exactly do I place it in my go script?  Do I set the Go script to navigate to the directy I put it in and then just type in the file name?  I have mine in /boot/script

so I entered cd /boot/script and on the next line s3.sh (the script file).  Is that correct?  I entered this at the end of the go script.  I haven't tested that the go script works yet, as I ran the script command from telnet. 

Link to comment

VampyreGTX:

 

Wiki article

I titled my sleep script s3.sh and saved in /boot/custom/bin

 

IMPORTANT: "boot" is already the name of the root directory of your flash device. So, if you save your script as per this example, do not create another "boot" directory. Doing so will cause unRAID to lose track of your config directory and your entire configuration will be lost (unless previously backed up elsewhere.)

 

10. Edit ‘go’ file to call script

I added the following lines to my go script to initiate the sleep script during boot:

# Execute s3.sh sleep script
fromdos < /boot/custom/bin/s3.sh | at now + 1 minute

Make sure you adjust file directory structure as necessary depending upon where you saved your s3.sh script.

Link to comment

pan!c, thanks! I'll adjust the Go script tomorrow when I get off Shift.  If I wanted to run the script manually, from the telnet, how do I do that?  Just navigate to the directory it's saved in and type s3.sh?  Or so I have to enter another command to execute it first?  I'm new to linux so this board has been a great source fo information as I learn it.  I still have some cmd line knowledge from my old DOS days, but that's about it. 

Link to comment

I've adjusted the Go Script as noted my Pan!c, however, the server still doesn't automatically go into s3 sleep.  Like I've said, I've confirmed it will if I manually enter the sleep command; however, not with the script that was created by AGW (i think it was).  I still have those 3 drives outside of the array, not mounted.  Could they be causing it from going to sleep?  Do arrays not added into the array spindown automatically?  I'll be getting the pro license tomorrow so I will be able to test it again then when I add those 3 to the array, but trying to find any other reasons. 

Link to comment

that's what I was thinking.  Can anyone confirm if drives that are attached, but not added to the array get spundown automatically? 

They are not spun down unless you do it yourself. 

Furthermore, on some disks, their firmware to spin down does not work, even if you do set it.

(It is why unRAID has its own timers and spin-down logic)

 

You can use the "-S nnn" option to hdparm to try to set the spin-down timer on a hard drive. If you are lucky, it will work.

 

For the disks outside of the array, for a 1 hour spindown time,  you can try

hdparm -S 242 /dev/XXX

where XXX = device name  (sda, sdb, hda, hdb, etc...)

 

The encoding of the timeout value is somewhat

peculiar. A value of zero means "timeouts are disabled": the

device will not automatically enter standby mode.

Values from 1to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes.

Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours.

A value of 252 signifies a timeout of 21 minutes.

A value of 253 sets a vendor-defined timeout period between 8 and 12 hours,

The value 254 is reserved.

255 is interpreted as 21 minutes plus 15 seconds.

Note that some older drives may have very different interpretations of these values.

 

Joe L.

Link to comment

My suspend works great, also the WOL, but sometimes when waking the server the unRAID server starts up the fan are running but that's it, the server are not online. so the only thing is to powerdown, when starting up it do a parity check.

 

Have someone else this issue ?

 

I have edit my syslinux.cfg and add this : append initrd=bzroot acpi_sleep=s3_bios

 

I'm looking to see if this could be a solution -> http://wiki.archlinux.org/index.php/Pm-utils

 

Here is the packages -> http://ftp.riken.go.jp/pub/pub/Linux/slackware/slackware-13.0/slackware/ap/pm-utils-1.2.5-i486-1.txz

 

Have someone else using this

 

 

 

Link to comment

not easy to answer this ... I have NOT have this experienced ever (so far) in my environment, using S3 regulary.

I assume, you have no entries in the syslog, so the freeze is before any reinitialization happened!?

Possible reasons (fixes) could be:

- Powersupply too weak (voltages drop when WOL happens and MB/CPU hangs) - check with no drives attached or check with "sifficient" powersupply

- MB HW incompatibility - change MB (I did so in the beginning, 'cause I wastn't able to get S3 properly running with my former MB)

- ACPI/BIOS incompatibility - check if newer/fixed BIOS is available or try using addons circumstancing that (you already did some stuff like boot parameters, e.g. I have to use S2RAM to properly reinitialize graphics after WOL. There is lot's of stuff in the linux kernel to handle bad BIOS/MB/ACPI behavior, so also a newer linux kernel might fix it/help.

- instability by configuration: If you are undervolting, this could lead to freezes in such situations - use standard config or even try a little (!) overvolting to stabilize the set (I used undervolting in the past to save cureent, running on standard now plus S3 as better solution and avoiding freezes or other problems. You could also try resetting to defualts in BIOS to get other settings back to normal and see if it helps.

Difficult to solves such issues - as stated above, I had quite some problems in the past and ended up changing the mobo - my final solution was to order some mobos and test them - I kept the one working best and sent back the others.

Because I am a linux noob, other people can help you more on linux specific things

happy new year and "happy testing",

Guzzi

Link to comment

Hi I have this PSU: Corsair CMPSU-650TX 650W,  I also have the latest bios.

Then I  have a 9 disk and a adaptec 1430SA card

 

So it would be interesting if it's possible to get a updated version 4.5 with the latest kernel  ;)

 

 

What did you change regarding "overvolting" ?

- instability by configuration: If you are undervolting, this could lead to freezes in such situations - use standard config or even try a little (!) overvolting to stabilize the set (I used undervolting in the past to save cureent, running on standard now plus S3 as better solution and avoiding freezes or other problems

 

When I upgraded the bios I did a "load optimized settings"

Link to comment

Hi, I've just bought my pro unraid and everything is working ok, except the wake up.

 

I have been reading this post from before i got my license and I think i read something about my problem, but i cannot find it.

 

Here is my problem. After my pc goes perfectly into S3 mode with the "echo 3 >......."  i cannot wake up it neither pressing power buttom neither magic packet.

well i can really wake up with both ways but my pc enter in a continuous reboot cycle

 

 

any clue?

Thanks and sorry for my english.

Link to comment

Hi I have this PSU: Corsair CMPSU-650TX 650W,  I also have the latest bios.

Then I  have a 9 disk and a adaptec 1430SA card

 

So it would be interesting if it's possible to get a updated version 4.5 with the latest kernel  ;)

 

 

What did you change regarding "overvolting" ?

- instability by configuration: If you are undervolting, this could lead to freezes in such situations - use standard config or even try a little (!) overvolting to stabilize the set (I used undervolting in the past to save cureent, running on standard now plus S3 as better solution and avoiding freezes or other problems

 

When I upgraded the bios I did a "load optimized settings"

I did not overvolt my CPU, was not necessary - but I removed the undervolting because I experienced instabilities similar to yours. Overvolting (minimal!!!) nevertheless might help to stabilize the rig in some cases - that's why I mentioned it.

So loading the default usually should be fine - you might want to load "optimized", although this is usually using "tighter" settings, it might better for the rig - unfortunately there is lots of bad BIOS implementations everywhere :-( - I assume this is the reason why Tom officially is not willing to support S3.

As a solution it would help to add a testsection for S3 and point working setups - I would have been very happy, if this would have been available - avoiding all those "try and errors" by myself ...

btw - PSU should be fine. I have no experience with your adaptercard.

There is always hope to get implovement with newer kernel - the last update made quite some improvements to powermanagement.

To make it even more complicated: Even n older BIOS might work better ... I know this sounds bad, cause means lot's of testing, but unfortunately I have no better hints at the moment ...

Link to comment

Hi, I've just bought my pro unraid and everything is working ok, except the wake up.

 

I have been reading this post from before i got my license and I think i read something about my problem, but i cannot find it.

 

Here is my problem. After my pc goes perfectly into S3 mode with the "echo 3 >......."  i cannot wake up it neither pressing power buttom neither magic packet.

well i can really wake up with both ways but my pc enter in a continuous reboot cycle

 

 

any clue?

Thanks and sorry for my english.

THe only way is to test several improvements like BIOS settings, HW, etc. to find a working config. Might be possible, that your hardware does not support S3 properly and thus there is no working solution/workaround - then it would be the only solution to change HW - that's the way I did in the past ...

Link to comment

Hi, I've just bought my pro unraid and everything is working ok, except the wake up.

 

I have been reading this post from before i got my license and I think i read something about my problem, but i cannot find it.

 

Here is my problem. After my pc goes perfectly into S3 mode with the "echo 3 >......."  i cannot wake up it neither pressing power buttom neither magic packet.

well i can really wake up with both ways but my pc enter in a continuous reboot cycle

 

 

any clue?

Thanks and sorry for my english.

THe only way is to test several improvements like BIOS settings, HW, etc. to find a working config. Might be possible, that your hardware does not support S3 properly and thus there is no working solution/workaround - then it would be the only solution to change HW - that's the way I did in the past ...

 

I have a GA-P35-ds3R and Unraid 4.5 final (no overclocking) . Anyone with this HW can wake up ok?  If so , please tell me your bios conf..

I  got no errors spinning up or down , so i guessed HW was fine to try Sleep mode.

 

Thanks .

 

 

Link to comment

My suspend works great, also the WOL, but sometimes when waking the server the unRAID server starts up the fan are running but that's it, the server are not online. so the only thing is to powerdown, when starting up it do a parity check.

 

Have someone else this issue ?

 

 

After googling I see there could be some issue with this driver r8169

 

http://www.google.se/search?q=pm-suspend+%2Br8169&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:sv-SE:official&client=firefox-a

 

This is what I have.

NIC driver info (from ethtool -i)

driver: r8169
version: 2.3LK-NAPI
firmware-version: 
bus-info: 0000:03:00.0

 

 

 

But I have run very many suspend & WOL and so far it's looks good, right now I using Pm-utils to suspend my server :-) so far so good....

Link to comment

Just wanted to update my sleep issue.  It was because of the 3 drives in the server but not the array Those wouldn't spin down on their own and also, if I manually spun them down, the scrip in this thread also didn't query them or something so the server never went to S3.  Once I added the other 3 drives, it had no trouble going into S3.

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.