Was sleep ever fixed on GEN 1 devices?

Yes the Twonky media server works, yes remote access works. What may not work with some of those changes is the searching feature when connected remotely and with icons being created for viewing when connecting remotely.

The other thing that may not work properly is the Capacity section of the My Cloud Dashboard. Since I started using a startup script to improve sleep time the Video, Photos, Music Tracks for the Capacity section indicate zero rather than showing a capacity. Doesn’t bother me since I rarely access the Dashboard these days.

No idea. I generally have that line commented out, but left it uncommented so one can experiment. There was past discussion in other threads about disabling cron.



Oh yes, I know these two topics but I found them confusing, as they dont’t flag an agreement on the right approach and I do not understand enough of the whole Linux talk. My question if Samaba would be deactivated actually was initiated by these threads and it also initiated my original question about the monitorio because it was mentioned somewhere.

But thanks for highlighting a possible solution again. I will try and edit these files right on the server as suggested and get back with feedback.

On my gen1 system I made changes to the S98user_start file. My system sleeps 87% of the time. I don’t have cron stopped. The cron job does house cleaning during the day at different times. Like log rotation. Checking for updated firmware. Doing mdadm functions.

This is my /etc/rc2.d/S98user-start file
/etc/rc2.d/S03atop stop
/etc/rc2.d/S20nfs-common stop
/etc/rc2.d/S20nfs-kernel-server stop
/etc/rc2.d/S20restsdk-serverd stop
/etc/rc2.d/S20winbind stop
/etc/rc2.d/S50netatalk stop
/etc/rc2.d/S60mDNSResponder stop
/etc/rc2.d/S61upnp_nas stop
/etc/rc2.d/S85twonky stop
/etc/rc2.d/S85wdmcserverd stop
/etc/rc2.d/S86wdphotodbmergerd stop
/etc/rc2.d/S92wdnotifierd stop
/etc/rc2.d/S95wdAutoMount stop
mount -o remount,noatime,nodiratime /dev/root /

There is no “right” approach. It will all depend on how aggressive you want to get and what features (samba, twonky, remote access, etc) you want to remain active. What works for one user like rac8006’s start file above may not work for the next person. For example rac8006’s script appears to stop Twonky. If one needs Twonky they’d have to skip using that line; /etc/rc2.d/S85twonky stop (and possibly one or more others). Same goes for remote access. It is in some respects, trial and error then lots of testing to see what works best for you and what doesn’t.

I will also mention that various devices on your network will also cause the My Cloud not to sleep for long periods of time. For example if you have any Windows computer with mapped My Cloud Shares that go into sleep mode, they may reconnect to the My Cloud when coming out of sleep mode causing the My Cloud to wake up from sleep.

Thank you both for your help. I managed to get the sleep.ch running after finding the line break that corrupted the file. The sleep times look horrible - a lot of 7 second wake ups :-/

Unfortunately I cannot edit the S98user-start file. The /etc/rc2.d/ ls displays the file name in red and if I try to run it I get a “No such file or directory”

Coudl it be that it’s just missing on my device?

The S98user_start is a symbolic link to /CachVolume/user_start Make sure that it exists.

I checked /CachVolume/ and there is no user-start. Do I have to create it?

Other question is, can I just run the commands supposed to be put into the start script and they work alone or do they have to be executed in certain order?


Contains a symbolic link to the actual file. You should not have to create it. But that ‘e’ is important…

Sorry, in this case I just c&p the wording above. attached a screenshot from the directory you are referrinf to - there is neither a file nor a directory with that name oO

Thanks. I don’t know why I missed the e.

This is my CacheVolume
AbbottandCostello:/CacheVolume# ls -l
total 80
drwxr-xr-- 3 root root 4096 Jun 22 2015 WDPROT
-rw-rw-rw- 1 www-data www-data 109 Mar 8 2017 alert_notify_time
drwxrwxrwx 3 root root 4096 Dec 27 2014 cake
-rwxrwxrwx 1 root root 12 Sep 25 2015 last_firmware_info_sent
drwxr-xr-x 3 root root 4096 Dec 27 2014 netatalk
-rw-r–r-- 1 root root 2 May 28 2015 orion_cm_enabled
-rwxr-xr-x 1 root root 866 Sep 21 2015 share_acl_backup
drwxr-xr-x 2 root root 4096 Jul 12 2012 transcodingcache
drwxrwxrw- 6 root root 4096 Sep 25 2015 twonkymedia
-rw-rw-rw- 1 root root 34109 Jan 27 2016 update.log
drwxr-xr-x 3 root root 4096 Jan 27 2016 upgrade
-rwxrwxrw- 1 root root 940 Mar 3 2016 user-start

Have a look in /etc/rc2.d

If there is a symbolic link there, then you may have to create the actual user file /CacheVolume/user-start

Ah! Note that it should be a hyphen, not an underscore.

It’s so long since I did it that I can’t remember if there was an empty file there, or whether I had to create it.

Yes, there is a symbolic link and it’s red. It’s pointing into nowhere. So, I will create an empty file with no file extension at the target location and solely write the above commands into the file?

OK, I created this file, added all code into it as described above by @Bennor and restarted the Device. Then I checked the status:

/etc/init.d/wdmcserverd status
/etc/init.d/wdphotodbmergerd status
/etc/rc2.d/S20restsdk-serverd status
/etc/init.d/cron status

and it’s all [ok] green.

So I seem to have missed something or did anything wrong. Apparently the script is not run on startup. If I run it manually I get:

-bash: /etc/rc2.d/S98user-start: Permission denied

Does the file need specific rights?

It needs 777 and root root

OK, I thought so. How would I do that? Sorry, my knowledge about Linux is nearly not existing.

EDIT: Ok, Google helps. I guess I ran Chmod 750 /etc/rc2.d/S98user-start
and after that it worked. (Not 100% sure which number I used behind Chmod - I’m at work right now and cannot check).

Then I restarted the drive and checked the status of the processed - voila - they remained deactivated.

I’m not sure what you meant about root root, though. Do I have to include the chmod action into my user-start script?

When you do the ls -l /CacheVolume. The first column is the file permissions and file type. d for directory l for link or - for regular file. Follow that by rwxrwxrwx which corresponds to the 777. In your case 750 is rwxr-x—
Column 3 and 4 are the owner and group. You use the chown root to change the owner to root. You use the chgrp root to change the group to root.

Ok, thanks for the explanation. I will have to try that as soon as I’m back home, although the user-start seemed to have been executed correctly at system startup without the root root already.

Sorry if my last question sounds stupid but do I have to apply the rights changes to the S98user-start link or to the actual user-start file?

To the user_start file. The odds are that the file already has root root since you were login as root when
you created the file.

You must be right, since I have not applied the changes to the NAS, yet but it was sleeping since last night when I created the start up script.

WDMyCloud:/DataVolume/shares/Public# sh sleeptime.sh
09 26 04:38:46 04:38:54 8 0:00:08 <-- Script initiated
09 26 04:49:05 08:52:42 14617 4:03:37 <-- accidental access of the Twonky Web interface when starting the browser that morning
09 26 09:02:53 17:38:33 30940 8:35:40 <-- Start of my PC but I have no drive mapping - so I do not know why wake up
09 26 17:48:44 18:01:37 773 0:12:53 <-- SSH access to run the sleep script
Total Sleep Time: 12:12:53
Start 1506376928
End 1506441697
Total Up Time: 17:59:29 71% Sleep 29% Wake

Ok, that makes sense and having checked the directory, you are right:
-rwxrwxr-x 1 root root 493 Sep 26 03:27 user-start

According your description that must be 775, correct?!? I guess for my purpose it makes no difference…

Thanks so much for your support!

I will have an eye on my sleep times and might play around with the start up scripts from @rac8006, @Bennor and @Mona to see what brings the best results but overall I’m already satisfied that this ■■■■ thing finally is sleeping for a day or so.