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


Recommended Posts

Kapperz, do you get proper videosignal on the monitor after WOL from S3? I have the precedor of this board (GA-MA780G) and suffer from that problem. No other functional issues beside this. There were hints using S2RAM, but I couldn't find a working slackwarepackage.

Thanks, Guzzi

http://lime-technology.com/forum/index.php?topic=4405.30

Did that not work for you?

 

uups, didn't see that - will give it a try, thanks!

Link to comment

Kapperz, do you get proper videosignal on the monitor after WOL from S3? I have the precedor of this board (GA-MA780G) and suffer from that problem. No other functional issues beside this. There were hints using S2RAM, but I couldn't find a working slackwarepackage.

Thanks, Guzzi

http://lime-technology.com/forum/index.php?topic=4405.30

Did that not work for you?

 

uups, didn't see that - will give it a try, thanks!

 

Hi, this is to confirm s2ram is working fine on my setup. I get the videoscreen back and Eth-link set to 1000 also by the script. Mobo is GA-MA78GM-S2H.

 

Now after looking in the syslog it seems, all messages - also the stuff being done for shutdown - are being written AFTER wakeup and all with same timestamp.

 

Question to the professionals here: Is there the possiblility to write a line within this script to get at least one entry in syslog when machine is sent to suspend (including the timestamp WHEN the script triggered it)?

Thanks, Guzzi

Link to comment

To write messages to syslog from a script or via file use the logger command.

usage: logger [-is] [-f file] [-p pri] [-t tag] [-u socket] [ message ... ]

 

add something like the following example to the power change script before it is enabled. (I don't have that answer, but the rest should help)

 

logger -i -tsleepscript -plocal0.info "Switching power state to S3"

 

Name -t or -p what fits your installation.

-p must be a valid syslog facility.

-t can be the script or program name.

Link to comment

To write messages to syslog from a script or via file use the logger command.

usage: logger [-is] [-f file] [-p pri] [-t tag] [-u socket] [ message ... ]

 

add something like the following example to the power change script before it is enabled. (I don't have that answer, but the rest should help)

 

logger -i -tsleepscript -plocal0.info "Switching power state to S3"

 

Name -t or -p what fits your installation.

-p must be a valid syslog facility.

-t can be the script or program name.

 

Thanks for the hint - one more question: Do I need to follow a "sleep" to give it some time to finish? Well, I can just give it a try and see what happens - will post results...

Guzzi

Link to comment
  • 2 weeks later...

How do you guys invoke S2RAM?

 

is "/boot/script/s2ram -f" correct on my 'go" file?

 

Thanks!

 

I use it with -f -p - but it depends on your MB and if and in what manner it is supported

 

Options:

 

sonne@erde:~> s2ram -h

Usage: s2ram [-nhi] [-fspmra]

 

Options:

    -h, --help:      this text.

    -n, --test:      test if the machine is in the database.

                      returns 0 if known and supported

    -i, --identify:  prints a string that identifies the machine.

    --nofbsuspend    do not suspend the framebuffer (debugging only!).

    -f, --force:      force suspending, even on unknown machines.

 

the following options are only available with --force:

    -s, --vbe_save:  save VBE state before suspending and restore after resume.

    -p, --vbe_post:  VBE POST the graphics card after resume

    -m, --vbe_mode:  get VBE mode before suspend and set it after resume

    -r, --radeontool: turn off the backlight on radeons before suspending.

    -a, --acpi_sleep: set the acpi_sleep parameter before suspend

                      1=s3_bios, 2=s3_mode, 3=both

    -v, --pci_save:  save the PCI config space for the VGA card.

 

Google is your friend, e.g. http://de.opensuse.org/S2ram

 

Link to comment

Manual Test from command line works fine - just inserted it in the Sleepscript and will check after next sleep state (currently not possible due to usage of family ;-)

Syslog shows:

Nov 24 23:28:15 XMS-GMI-02 AutoS3sleep[11578]: Switching power state to S3 now

 

One question to get "GreenIT" running - I tried to get the S3-Syslogmessages Colored:

I tried to add

match_case||"s3sleep"||green

to syslog_match.conf

But my syslogentries are still in "black"...

 

Dec 3 11:05:35 XMS-GMI-01 AutoS3sleep[21258]: Switching power state to S3 now

Dec 3 21:44:25 XMS-GMI-01 AutoS3sleep[22504]: Returning from Power State S3 now

 

Any hint what is wrong?

 

 

Link to comment

Manual Test from command line works fine - just inserted it in the Sleepscript and will check after next sleep state (currently not possible due to usage of family ;-)

Syslog shows:

Nov 24 23:28:15 XMS-GMI-02 AutoS3sleep[11578]: Switching power state to S3 now

 

One question to get "GreenIT" running - I tried to get the S3-Syslogmessages Colored:

I tried to add

match_case||"s3sleep"||green

to syslog_match.conf

But my syslogentries are still in "black"...

 

Dec 3 11:05:35 XMS-GMI-01 AutoS3sleep[21258]: Switching power state to S3 now

Dec 3 21:44:25 XMS-GMI-01 AutoS3sleep[22504]: Returning from Power State S3 now

 

Any hint what is wrong?

 

 

Yes, the messages have a leading capital "S" in S3sleep.  You explicitly asked it to match an initial lower case "s" in "s3sleep"

 

change the rule to be either

match_case||"S3sleep"||green

or

any_case||"s3sleep"||green

 

Since this rule is one of your own, you can put it in a file of its own named

syslog_user_match.conf

and your rule will be added to those already defined in my supplied file.  This will make it easier if at some point the supplied rule file gets a new set of rules, as it will not overwrite yours.  This trick will not work with turning off existing pattern coloring rules, since the locally created definitions are just appended to the end of the first list, but for new patterns, it will work.

Link to comment

How do you guys invoke S2RAM?

 

is "/boot/script/s2ram -f" correct on my 'go" file?

 

Thanks!

 

I use it with -f -p - but it depends on your MB and if and in what manner it is supported

 

Options:

 

sonne@erde:~> s2ram -h

Usage: s2ram [-nhi] [-fspmra]

 

Options:

    -h, --help:       this text.

    -n, --test:       test if the machine is in the database.

                      returns 0 if known and supported

    -i, --identify:   prints a string that identifies the machine.

    --nofbsuspend     do not suspend the framebuffer (debugging only!).

    -f, --force:      force suspending, even on unknown machines.

 

the following options are only available with --force:

    -s, --vbe_save:   save VBE state before suspending and restore after resume.

    -p, --vbe_post:   VBE POST the graphics card after resume

    -m, --vbe_mode:   get VBE mode before suspend and set it after resume

    -r, --radeontool: turn off the backlight on radeons before suspending.

    -a, --acpi_sleep: set the acpi_sleep parameter before suspend

                      1=s3_bios, 2=s3_mode, 3=both

    -v, --pci_save:   save the PCI config space for the VGA card.

 

Google is your friend, e.g. http://de.opensuse.org/S2ram

 

 

@ Guzzi,

 

Thanks that's works for me...

 

Now my only hope is to have my PS3 wake-up my UNRaid server but I cant seem to find a way. :)

Link to comment

 

@ Guzzi,

 

Thanks that's works for me...

 

Now my only hope is to have my PS3 wake-up my UNRaid server but I cant seem to find a way. :)

 

No idea for that, because I have no PS3. You might try searching the keywords "PS3" and "WakeOnLAN"/MagicPacket.

If the PS3 is not capable of sending a Magicpacket and you have another machine running 24/7, you might run a monitoring script there to check is PS3 started and send Magicpacket to Unraid server in that case.

Could also be running e.g. on your DSL-router - I know that AVM boxes are running minilinux on them and are capable to send WoL-Packets.

Good luck!

Link to comment

 

@ Guzzi,

 

Thanks that's works for me...

 

Now my only hope is to have my PS3 wake-up my UNRaid server but I cant seem to find a way. :)

 

No idea for that, because I have no PS3. You might try searching the keywords "PS3" and "WakeOnLAN"/MagicPacket.

If the PS3 is not capable of sending a Magicpacket and you have another machine running 24/7, you might run a monitoring script there to check is PS3 started and send Magicpacket to Unraid server in that case.

Could also be running e.g. on your DSL-router - I know that AVM boxes are running minilinux on them and are capable to send WoL-Packets.

Good luck!

 

Thanks for the Tip! I'll try that and post back here if I find something working. :)

Link to comment

Anyone has a hint for me? When I try to put my system into sleep mode, I get the following:

 

root@startank:~# echo 3 > /proc/acpi/sleep

-bash: echo: write error: No such device

 

same with S5

 

root@startank:~# echo 5 > /proc/acpi/sleep

-bash: echo: write error: No such device

 

root@startank:~# ls -l /proc/acpi/sleep

-rw-r--r-- 1 root root 0 Dec 12 02:31 /proc/acpi/sleep

 

root@startank:~# cat /proc/acpi/sleep

S0 S1 S5

 

I have enabled ACPI in the BIOS and

 

root@startank:~# ethtool eth0

Supports Wake-on: pumbag

Wake-on: g

 

I am using 4.5 beta11. I was reading this thread and also following

http://lime-technology.com/wiki/index.php?title=Setup_Sleep_(S3)_and_Wake_on_Lan_(WOL)

 

Anyone has any idea? Thanks much!

Link to comment

The X7SBE indeed supports S3, however just reading the manual the default is off and a jumper must be set.

 

PS2 Keyboard (KB)/Mouse Wake Up

Select Enable to “wake your system up” from the S1, S3, S4 or S5 state. If this

feature is set to Enabled, you will also need to enable the JPWAKE jumper by

closing pins 1-2. (Please refer to Pg. 1-5 and Chapter 2 for more details). The

default setting is Disabled.

 

USB Wake Up

This setting allows you to wake up the system from S3/S4 state. Make sure

to set the proper

 

It also says ACPI S3 optional on a digram... but the manual is definitely not clear on this and I can't find that jumper!!

 

 

Link to comment

Just got an email from Supermicro stating that the X7SBE supports S3 by default and that no jumpers have to be set. I doublechecked and ACPI is enabled in the BIOS. Still wondering why I can't suspend the system from unRAID? I have noticed lot of people are running unRAID with this mainboard, any hints?

Link to comment

I use my unRAID box about 2-3 times a week. In the long run, is it better to sleep/suspend my box or turn it off until I need it. For power savings, turning it off will better of course but will it be better for the harddisks if I sleep/suspend so that they do not have to power cycle so often?

 

Link to comment

I use my unRAID box about 2-3 times a week. In the long run, is it better to sleep/suspend my box or turn it off until I need it. For power savings, turning it off will better of course but will it be better for the harddisks if I sleep/suspend so that they do not have to power cycle so often?

 

The disks are designed for thousands of power cycles... most office PCs are turned off and on daily.
Link to comment

I have got a system to wake from S3. But once it does, the shares are not accessible, nor can I telnet into it or view the webgui. It is as if the system is either hung or not re-negotiating the Ethernet link. I used the sleep script from the wiki which has a line to re-establish the dhcp. I believe it is a copy of the one from this post.

 

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.

Link to comment

Apologies for my ignorance. Between this thread and the wiki I am still thoroughly confused. What exactly do I need to do here to make this work?

 

Hard to help without knowing what is confusing you.

 

In the wiki agw explains how to install an s3.sh script which he links to. That script works fine as intended but does not include all the features and customizations we have been talking about and adding recently.

 

If you want to take advantage of those new features then install ReneV's latest s3_notHrHdTcpIp.sh script in the same manner described in the wiki. But be sure to use a text editor to edit the configurable options in the script to suit your needs before running it. [Edit: You also will need to install bwm-ng.]

Eventually someone will update the wiki to incorporate the new script and its features. Meanwhile, if you have specific questions just ask them.

Thank you for your help. But, I still can't get it to work. The only way I can make it sleep is with the command from the wiki. One time, though, it went to sleep while I was streaming a movie from it. Also, I have never been able to wake it up. I'm trying to use ReneV's latest combined with the wiki instructions, but I'm just not getting it to work. It all confuses me--bwm-ng, s3 script, & go file. If there are simple things I can try, please let me know. Otherwise, maybe I'll just wait until someone either posts a dummy's guide, or updates the wiki (although, that may take awhile from the looks of it).
Link to comment

joikd

I do intend to someday get back in and update the s3 wiki page with the new and improved script (again, unless someone beats me to it!).  I've recently swapped motherboards in my desktop and server, and have been waiting for 4.5 to go 'final' before I spend the time to try and set the new machine back up with all of the little tweaks like s3.  And I would never try to write a wiki article describing the use of a script that I've not stepped through on my own.

 

So, that's my excuse.

 

With respect to your most recent post, it sounds like it might be a good exercise for you to simply test the sleep command and magic packet wake-up function manually for a while.  Until you know that you can reliably put the server to sleep and wake it up back up using the magic packet - you don't really need to concern yourself with the go script, bwm-ng or any of the other details.  Have you done Steps 1-6 from the wiki article?

 

If so, post back which steps are giving you trouble and the community (most are much smarter than me) can probably get you moving in the right direction.

 

agw

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.