The Reason why your WD Cloud ain't getting no sleep and We Should Petition WD to fix!

I have twonky disabled along with several of the other processes disabled.  My probelm was definetly samba.

To me twonky should only scan when files are added.  Thats the way minidlna works.  There may be other

issues that cause the sleep problem.  I probably should reenable all the services and see if it changes the

sleep pattern.

RAC

So I have all the major services (including twonky, itunes server, scans) disabled at the core level (not at the menu level) and I re-enable the cron yesterday night using

/etc/init.d/cron start

the user.log is at /var/log/user.log 

use 

cat /var/log/user.log 

to have it listed at your terminal

and here are my timings from 3:30 yesterday night after it cleaned up my logs and archiving all previous user.log info

May 3 03:30:10 WDMyCloud logger: exit standby after 887 (since 2015-05-03 03:15:18.598573001 -0700)
May 3 03:39:10 WDMyCloud logger: exit standby after 233 (since 2015-05-03 03:35:12.748573001 -0700)
May 3 03:45:10 WDMyCloud logger: exit standby after 53 (since 2015-05-03 03:44:12.818573001 -0700)
May 3 03:55:10 WDMyCloud logger: exit standby after 292 (since 2015-05-03 03:50:13.278573001 -0700)
May 3 04:02:10 WDMyCloud logger: exit standby after 112 (since 2015-05-03 04:00:13.308573001 -0700)
May 3 04:09:10 WDMyCloud logger: exit standby after 113 (since 2015-05-03 04:07:12.838573001 -0700)
May 3 04:15:10 WDMyCloud logger: exit standby after 53 (since 2015-05-03 04:14:12.878573001 -0700)
May 3 04:25:09 WDMyCloud logger: exit standby after 291 (since 2015-05-03 04:20:12.968573001 -0700)
May 3 04:35:09 WDMyCloud logger: exit standby after 292 (since 2015-05-03 04:30:12.448573001 -0700)
May 3 04:45:10 WDMyCloud logger: exit standby after 293 (since 2015-05-03 04:40:12.578573001 -0700)
May 3 04:55:10 WDMyCloud logger: exit standby after 292 (since 2015-05-03 04:50:13.258573001 -0700)
May 3 05:06:23 WDMyCloud logger: exit standby after 365 (since 2015-05-03 05:00:13.318573001 -0700)
May 3 05:15:10 WDMyCloud logger: exit standby after 219 (since 2015-05-03 05:11:26.588573001 -0700)
May 3 05:25:10 WDMyCloud logger: exit standby after 291 (since 2015-05-03 05:20:13.108573001 -0700)
May 3 05:39:10 WDMyCloud logger: exit standby after 533 (since 2015-05-03 05:30:12.608573001 -0700)
May 3 06:00:10 WDMyCloud logger: exit standby after 953 (since 2015-05-03 05:44:12.798573001 -0700)
May 3 06:13:25 WDMyCloud logger: exit standby after 487 (since 2015-05-03 06:05:13.328573001 -0700)
May 3 06:30:09 WDMyCloud logger: exit standby after 696 (since 2015-05-03 06:18:28.228573001 -0700)
May 3 06:40:10 WDMyCloud logger: exit standby after 293 (since 2015-05-03 06:35:12.568573001 -0700)
May 3 07:00:10 WDMyCloud logger: exit standby after 893 (since 2015-05-03 06:45:12.648573001 -0700)
May 3 07:25:10 WDMyCloud logger: exit standby after 1193 (since 2015-05-03 07:05:12.778573001 -0700)
May 3 07:35:10 WDMyCloud logger: exit standby after 292 (since 2015-05-03 07:30:12.968573001 -0700)
May 3 07:45:10 WDMyCloud logger: exit standby after 292 (since 2015-05-03 07:40:13.098573001 -0700)
May 3 07:55:10 WDMyCloud logger: exit standby after 293 (since 2015-05-03 07:50:12.828573001 -0700)
May 3 08:02:10 WDMyCloud logger: exit standby after 113 (since 2015-05-03 08:00:12.828573001 -0700)
May 3 08:09:10 WDMyCloud logger: exit standby after 112 (since 2015-05-03 08:07:13.348573001 -0700)
May 3 08:17:09 WDMyCloud logger: exit standby after 171 (since 2015-05-03 08:14:13.458573001 -0700)
May 3 08:30:10 WDMyCloud logger: exit standby after 473 (since 2015-05-03 08:22:12.498573001 -0700)
May 3 08:39:10 WDMyCloud logger: exit standby after 232 (since 2015-05-03 08:35:13.008573001 -0700)
May 3 08:45:09 WDMyCloud logger: exit standby after 51 (since 2015-05-03 08:44:13.068573001 -0700)
May 3 09:00:10 WDMyCloud logger: exit standby after 592 (since 2015-05-03 08:50:12.518573001 -0700)
May 3 09:30:10 WDMyCloud logger: exit standby after 1493 (since 2015-05-03 09:05:12.628573001 -0700)
May 3 09:40:10 WDMyCloud logger: exit standby after 293 (since 2015-05-03 09:35:12.848573001 -0700)
May 3 10:05:10 WDMyCloud logger: exit standby after 1192 (since 2015-05-03 09:45:12.918573001 -0700)
May 3 10:10:25 WDMyCloud logger: exit standby after 7 (since 2015-05-03 10:10:13.088573001 -0700)
May 3 10:17:10 WDMyCloud logger: exit standby after 97 (since 2015-05-03 10:15:28.218573001 -0700)
May 3 10:30:10 WDMyCloud logger: exit standby after 472 (since 2015-05-03 10:22:13.368573001 -0700)

I have my sleep timer set to 5 minutes and as you can see the average wake up time, remember those exit standby numbers are in seconds (with cron running) is between 53 seconds to 2,3,4,5 minutes to a max of 25 minutes.

The bottom line is the constant on/off cycle is more harmful to your drive then just leaving it on. I should have left the drive on before turning on the cron (jobs that are run to maintain your hard drive).

This is a problem that WD needs to address but it has been four years now with no major changes to the firmware that addresses this. Although I am relatively happy with the work-around that I am using with all services disabled and never upgrading my firmware, I still prefer that WD resolves this permanently so I don’t have to maintain my vigilance on the drive. 

Since I do use sleep, I check the logs everyday to ensure that it doesn’t sleep-wake cycle as bad as above. The above is pretty bad. The only other time I saw a sleep-cycle as bad as above was when the WD servers were having problems and you can see that the device was woken exactly 25 minutes throughout the night. Taking the device offline confirmed that the servers is one of the factors that were waking the device up. 

Ralphael

I’m not sure that you have the same problem that I have.  But a simple test is to stop samba with the following:

/etc/rc2.d/S20samba stop

Let it run for a few hours and see it the sleep time increase. 

RAC

I’ll add that to my stop list tonight before heading to bed.

Your problem may be more related with multiple NAS devices as well as a Window PC somewhere that may be broadcasting WINS.

The only device in my home that is still left on is (albeit suppose to be sleeping)  the WD Cloud;

My PC and Mac are off except my router, iPhone and iPad. Although I close my cloud app on both my Apple devices, there may be a ping from the WD Server to ensure connectivity. I am not surprise if that is a possibility.

I’ve added this post to Personal Cloud Ideas/New Ideas and at least it has the status of aknowledge which is good to know.

Go there and click on the up-arrow.

At minimal, if not a solid sleep through the night, I would like

  1. a manual swtich at the menus to deactivate the scans

  2. log of wake-up drive access; who what when, not all drive access but just the one that woke the drive up.

  3. re-scheduling of cron jobs at user discretion or at least during the time when the drive is awake and not woken just to run cron jobs.

  4. This non-sleep thing is all from the fears of someone hacking your drive; to see activity on your cloud drive in the middle of the night is disconcerting. Thus a log of all network activity would be nice displayed at the user menu on which of your users have accessed your drive.

  5.  a log of the scan activities (if the scans are not user controllable). something to indicate the usage status of your drive rather then just a black box that with the click of the drive you can hear that someone is accessing your precious data.

Last words:

I love this tiny device that sits on my Bookshelf with a Reader Digest book cover and with the above few suggestion the device can and will become so much usable especially to those with tons of media files of which is the reason that we bought this WD Cloud for.

Alright rac8006, I’ve turned off SMB and got the following result:

May 3 13:27:54 WDMyCloud logger: exit standby after 915 (since 2015-05-03 13:12:34.068573001 -0700)
May 3 15:06:19 WDMyCloud logger: exit standby after 5598 (since 2015-05-03 13:32:56.898573001 -0700)

looks good… I’m connected via AFP right now… AFP is very robust but a tad slower for transfering files. 

I’ll let it sleep tonight for longer periods.

edited: 

here are my timing last night. Not much difference with or without SMB.

May 4 00:15:44 WDMyCloud logger: exit standby after 7 (since 2015-05-04 00:15:32.538573001 -0700)
May 4 00:55:56 WDMyCloud logger: exit standby after 1801 (since 2015-05-04 00:25:50.158573001 -0700)
May 4 02:50:33 WDMyCloud logger: exit standby after 6570 (since 2015-05-04 01:00:58.898573001 -0700)
May 4 03:05:17 WDMyCloud logger: exit standby after 577 (since 2015-05-04 02:55:35.698573001 -0700)
May 4 03:10:30 WDMyCloud logger: exit standby after 6 (since 2015-05-04 03:10:19.888573001 -0700)
May 4 06:13:22 WDMyCloud logger: exit standby after 10664 (since 2015-05-04 03:15:33.318573001 -0700)
May 4 06:33:09 WDMyCloud logger: exit standby after 879 (since 2015-05-04 06:18:25.558573001 -0700)
May 4 08:34:59 WDMyCloud logger: exit standby after 7002 (since 2015-05-04 06:38:12.408573001 -0700)

Hey there,
Have been reading this thread & many others relating to the device’s inability to power down, quite intently.
I too contacted WD today & received the story ‘this issue should be corrected in the next firmware update…in a couple of weeks’!
Given the date/time stamps on some of the articles I’ve read, I’m somewhat doubting what I was told.
That said, I did disable the Cloud Access in Settings, just above Energy Saver & it appears to have worked.
Have allowed the device to hibernate a couple of times & was able to wake it up by accessing the drive by both LAN & WiFi.
Hope this is of some help!

It will wakeup randomly even if you turn off everything. Latest fw of 4x series, gen1 device.
remount with noatime option, monitorio sync tweaks, - all known hacks were tested - had no luck to let the disk spindown for the whole night.

Unfortunatly the standard response to more than a few problems, including the sleep problem, with the My Cloud seems to be, “it will be corrected in a future firmware update” when in reality it is never fixed.

While it may appear the device is now sleeping the only way to really tell if its sleeping over time is to check the logs. Often, even with the various SSH tweaks and Dashboard setting changes, the My Cloud will sleep for a period of time, then wake up only to go back to sleep some time later.

Using something like the Sleep.awk script can help tell you how long your My Cloud is actually sleeping for.

https://community.wd.com/t/new-sleep-awk/153431

If you look at cron. You will see that the system is setup to wake up at midnight,8AM,4PM to run some scripts.
It is also setup to wake up at 3AM to check for new firmware and do other house keeping tasks.

He-he… All what need to do - is move all temp/cache files to ramdisk (And disable logs. Who need logs? Anyone read it? Nope!).

In debian - all what need to do - Install ramlog and add simple tweak in samba init script (Move cache and temp db to ram).
Also MiniDLNA not scan media every time by cron like twonky, only when files adds/changed/deleted.

I have another question for WD - Why he using Marvell SDK (With all workarounds inside). Its ugly, bugged like a hell…
(untranslable) И вообще там костыль на костыле…

A few things I found about sleep. The current version of samba has a tendency to update the browse.dat file every few seconds or so. Supposedly this has been fixed in a later release. Also it appears that the 8 second sleep is caused by those processes that run during monitorio.sh get removed from cache. When the system wakes up to do its housekeeping functions. Then the drive is put in standby. But monitorio.sh then requires some code to be brought back into cache. This wakes up the disk. After a few loops thru monitorio.sh code everything is back in cache and the drive finally can go back to standby. In previous versions o firmware atop was not running. Now atop rotates the logs every 8 hours at midnight 8AM and 4PM.

Hi…here is my trick to make wd sleep (but i dont have cloud enabled…)
Im using win7, wdmc v2 firmware 2.xxx, as other v2 wdmc aware that no change can be made on wd, not even scheduler, script, etc…so i need to do it everytime the wdmcv2 reboot/loss power etc.
basically i just tell wd from my pc to run specific command …

tools needed : putty, notepad
A. make simple text files with these line (there is enter at the end of the line), lets call it “wdsleep.txt”

/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotodbmergerd stop
/etc/init.d/convert stop
/etc/init.d/wdnotifierd stop
/etc/init.d/wddispatcherd stop
/etc/init.d/atop stop
killall crond

B. enable ssh on wdmcv2 (please be careful)
C.make a bat file and make it autorun on pc start, with this line (lets pretend that all of your files is in E drive)
E:\path\to\your\puttyexe\putty.exe -ssh sshd@ipaddress of your wdmc -pw yoursshpw -m E:\path\to\your\text\on\step1\wdsleep.txt

I must say that this is ridiculous thing to do…but wd seems to ignore our problem.
I really hate the WD mycloud OS v2, its great that fox_exe make such a nice replacement OS.

@cloud_van.damme, check this: https://ftp.anionix.ru/WDMyCloud/WDMyCloud-Gen2/Apps/WDMyCloud_WDSleepFix_1.0.bin (Enable for stop these daemons, Disable for start again).

@Fox_exe…thank youuuu, here is my report :
as in how to in your ftp site, I replace the define js with your define js
I did removed it >> rm /usr/local/model/web/pages/function/define.js
make link >> ln -sf /mnt/HD/HD_a2/Public/define.js /usr/local/model/web/pages/function/define.js
install wdcrack and than wdsleepfix, reboot

I got a blank page on web admin, ((as in screeshot)) and than I look at
/usr/local/model/web/pages/function/ folder and the define js is :
lrwxrwxrwx define.js → /mnt/HD/HD_a2/Nas_Prog/WDSleepFix/define.js << shouldnt it be /mnt/HD/HD_a2/Public/define.js ?
I copied your define.js inside /mnt/HD/HD_a2/Nas_Prog/WDSleepFix/, reboot
webgui is fixed.

20 minutes later it sleep, yayyyyy
is there any setting to set it lower ? 10 or 15 minutes maybe…


and another oot question :slight_smile:
where is original transmission setting file on your build ?
(regular path would be /etc/config/transmission ) not the settings.json

In install folder: /mnt/HD/HD_a2/Nas_Prog/Transmission/settings (Or something similar)

Woops… My faut. Fixed.

I got a new name for wd sales division :grin:
NAS WD – NAS With Dysomnia

Next report : 23 hours later : I notice wd light is blue and the wd is waken, dont know why, and I dont know when its awaken, no log report shows exit standby no device on the network is alive ( investigating it at the moment).
Is there any settings to get more detailed log ? Or the default settings will show exit standby ?

something on log show wd notify, I dont really care but it shows wdnotifier: parseConfig() invalid configuration entry: << what is that ? I dont know if its happening before or after wdsleepfix. I will start fresh log for more info.

I think you should start a new thread @Fox.exe with your wdsleepfix…so the petition is not hijacked

SleepFix - is “workaround”. Not fix.
Maybe i need create new firmware for WD? (OMV + WD Services for example?). No, i has already bothered to correct others errors.

1 Like

Anyone test the latest firmware to see if sleep functionality has been “enhanced” ? lol

Hi all, I have a related question… Is there anyway to tell if the hard drive is sleeping, from a scripting perspective?

I have a script I’m using to engage the fan when the drive temperatures get hot, but I don’t want to inadvertently keep the HD’s awake by polling for their temperatures. If the HD’s have been put to sleep, then I’ll monitor the system’s board temperature until they wake up again.

Thanks!