Waking Issues After Previous WOL


Recommended Posts

I realize a lot has been posted about WOL and sleep, but I think I have something a bit unusual:

 

I usually wake my unraid from sleep by pressing the reset switch. The problem I've finally determined is if I instead wake my unraid through Wake on Lan (WOL), the next time unraid sleeps and I then try to wake the unraid through the reset switch, it actually forces a reboot and then an auto parity check. 

 

Why would waking the unraid from WOL lead to a reboot the next time it sleeps and I press the reset switch?

Link to comment

The sleep that the unraid is waking from, occasionally rebooting and running a parity check, is an automatic sleep via the built-in function.  Is there a way to prevent the automatic parity check after a forced reboot?

Sleep is not built in to unraid, it's a third party add-on that doesn't always work with all motherboards or cards. The automatic check is necessary to detect corruption that is likely to be induced when the array is forcefully stopped without the necessary checks to ensure everything is synced properly. If you don't do the check, you are likely to get into a situation where a failed drive will not be rebuilt correctly.
Link to comment

@jonathanm

 

Though Sleep was previously a Dynamix plug-in, it is included in v6.  Regardless, it's odd that most of the time my unraid wakes fine from an automatic sleep.  My problem is that it seems that if I use WOL to wake my unraid and later it automatically sleeps, the following attempt to wake via WOL doesn't work, and pressing the power switch causes a hard reboot when otherwise the power switch wakes without incident.  Thanks for your interest, though.

Link to comment

@jonathanm

 

Though Sleep was previously a Dynamix plug-in, it is included in v6.  Regardless, it's odd that most of the time my unraid wakes fine from an automatic sleep.  My problem is that it seems that if I use WOL to wake my unraid and later it automatically sleeps, the following attempt to wake via WOL doesn't work, and pressing the power switch causes a hard reboot when otherwise the power switch wakes without incident.  Thanks for your interest, though.

 

Okay, what you've described is this:

 

(a)  Wake the PC via WOL

(b)  Wait for it to sleep

©  Press power switch and the PC will do a hard reboot instead of waking up.

 

Is that correct ??

 

If so, then see if this does the same thing:

 

(a)  Wake the PC via WOL

(b)  Wait for it to sleep

©  Wake the PC via WOL ... and see if it also does a hard reboot

 

If so, then clearly (b) isn't actually entering sleep mode, but is simply killing power ... which is, correctly, being seen by UnRAID as an unclean shutdown -- whence the automatic parity check.

 

Assuming this is the case, then either your motherboard (or one of your add-on cards) isn't supporting S3 properly; or some setting has changed in the BIOS relative to sleep.    One thing I'd do before "messing" with it is change your motherboard battery (probably a CR2032) ... but in case the issue is simply that your CMOS settings aren't being preserved due to a failed battery.

 

Link to comment

Okay, what you've described is this:

 

(a)  Wake the PC via WOL

(b)  Wait for it to sleep

©  Press power switch and the PC will do a hard reboot instead of waking up.

 

Is that correct ??

 

Exactly! 

 

Though I'm going to run some more tests, your idea to try the WOL->Sleep->WOL won't work because in addition to the power switch causing a reboot after WOL->Sleep, the subsequent WOL doesn't work at in that scenario.

 

I'm fairly certain I changed the BIOS battery when I switched to this mobo 2 months ago.

Link to comment

If the 2nd sequence doesn't work (i.e. you can't wake it via WOL), then clearly the system is NOT going to S3 state properly.

 

This explains why UnRAID is doing a parity check ... the system is simply losing power and not shutting down properly.

 

What happens if you do the following:

 

(a)  Use the Web GUI to Stop the array and then Power Down the system.

(b)  Try to turn it on via WOL

 

 

Link to comment

Finally ran some tests, which basically validate my issue of things being screwy after a successful WOL where by WOL no longer works and the power switch causes a reboot.  Super weird.

 

Though I broke the following into steps, it is actually one continuous sequence:

1) WOL -> auto sleep -> power sw. -> reboots (when it should just wake)

2) Sleep GUI Button -> WOL -> wakes normally

3) Sleep GUI Button -> WOL -> doesn't wake -> power sw. -> reboots

4) Stop array -> Power down -> WOL -> boots normally (no parity check)

5) Sleep GUI Button -> WOL -> doesn't wake -> power sw. -> reboots

 

The bottom line is what different from waking via WOL vs. a power-switch?  Either with Unraid or my mobo, something is critically different.

Link to comment

What's the difference in what you did with #3 vs. #2 ??

 

If it simply didn't wake when you did the WOL in #3, try sending the magic packet again instead of using the power switch.  Sometimes sending the packet 2 or 3 times in a row will be more reliable than depending on a single instance.

 

#4 is likely the most reliable method => it guarantees the system has been properly shut down; and you're simply using WOL to turn it on.    No S3 sleep state involved.

 

Link to comment

The above results suggest to me that a lot of the time the sleep is not happening correctly, so the subsequent WOL fails.  Once that happens the power saw is forcing a reboot. 

 

It seems to me that rather than investigating the WOL you need to look into why sleep followed by power saw does not wake the system correctly.  My suspicion is if that was always simply waking the system then the WOL would work as well.

Link to comment

What's the difference in what you did with #3 vs. #2 ??

 

Good observation.  The difference is that #3 follows a wake via WOL.  It's only after a WOL success does then a WOL not work and the power switch causes a reboot.

 

Of course manually shutting down my unraid is safest and works, but I'm primarily using it as a media server and it is not practical to have people understand and follow those steps each time after they are done using the server.

Link to comment

In that case, I'd just disable S3 sleep.    The system will simply spin down all the drives, but otherwise still be on, so you'll not have any issues.    Yes, it'll use a bit more power, but it'll be 100% reliable.

 

Meanwhile, you can continue to look into why S3 isn't working correctly, and if you find a solution, you can set it up again -- but assuming reliable operation is more important, I'd just disable it for now.

 

Link to comment

If you're certain that's 100% reliable, then that will certainly do the trick as well.

 

I'd do it enough times in a row to be confident about it, however.    i.e. wait for auto-sleep;  wait a few minutes; then press the power button.    Repeat 3-4 times.    Then repeat the whole thing manually putting it to sleep state via the GUI button.    If it is definitely working perfectly this way, then that's a reasonable solution.

 

If that's the case, I'd disable WOL in the BIOS ... this will eliminate any chance of accidentally causing the problem.

 

 

Link to comment

Excellent suggestions, especially the disabling the WOL.  The only minor catch is that on very rare occasions I'll remote-in to my home and need to wake the unraid via WOL.  For now I'll just delete the WOL shortcut from my home desktop PCs after I've done some repeated tests.  thanks.

Link to comment
  • 7 years later...

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.