Is there a way in which I can set plex to allow both hibernation of hdd and the server to go in standby? For me this is a must cause I don’t want the server to be online all the time. I have no problem disabling all library searches and logging…
PMS still maintains its connection to Plex.tv. When it checks & updates your connection information, it is logged which in turn spins the drives.
If you’re using NAS rated drives, you’re actually better off leaving them spinning. There is more wear & tear spinning them down & up. Analogy: When does a light bulb burn out? … When you turn it on. (yes strange but very true and applicable)
But can’t I disable that feature I dont want the server connected to plex.tv. Also I know that hdd being life live longer but it doesn’t stand in a comparison to the power consumption and use of it. I rather want them to safe power and die earlier then vice verca.
@trumpy81 said:
leaving the NAS on 24/7 wont increase your power bill a great deal.
Well, that is not exactly true for most parts of the world. Electricity is not as cheap as in the US.
I am using my 415 mostly for only a few hours a day, downloading stuff and maybe watching a movie. So if I want to have it sleeping for 20h a day, that should be ok. Having my 415+ (with 4 hdds) in hibernate mode uses around 30W. Having the NAS and plex running it uses 55W.
The following calculation should be quite fair:
I do have to pay 0.26 Euro per kWh
(25W x 20h wasted uptime x 365 days x 0.26Euro) / 1000 = 47.45 Euro WASTED per year.
So I am throwing around 50 Euro a year down the drain. Just because you feel the necessity to have a permanent internet connection.
There is absolutely no need for that. Connect to the internet, to download movie posters. Maybe once per day connect to the plex internet server to check licences. But don’t waste peoples money and electricity for a nonsense 24/7 internet connection.
@trumpy81 said:
leaving the NAS on 24/7 wont increase your power bill a great deal.
Well, that is not exactly true for most parts of the world. Electricity is not as cheap as in the US.
I am using my 415 mostly for only a few hours a day, downloading stuff and maybe watching a movie. So if I want to have it sleeping for 20h a day, that should be ok. Having my 415+ (with 4 hdds) in hibernate mode uses around 30W. Having the NAS and plex running it uses 55W.
The following calculation should be quite fair:
I do have to pay 0.26 Euro per kWh
(25W x 20h wasted uptime x 365 days x 0.26Euro) / 1000 = 47.45 Euro WASTED per year.
So I am throwing around 50 Euro a year down the drain. Just because you feel the necessity to have a permanent internet connection.
There is absolutely no need for that. Connect to the internet, to download movie posters. Maybe once per day connect to the plex internet server to check licences. But don’t waste peoples money and electricity for a nonsense 24/7 internet connection.
Then schedule a task (Control Panel - Scheduled tasks) which stops and starts PMS per your schedule. Once PMS is stopped, your HDDs will sleep
To stop:
"/var/packages/Plex Media Server/scripts/start-stop-status" stop
To start
"/var/packages/Plex Media Server/scripts/start-stop-status" start
Be advised: Doing this will cause the actual run-state to be out of sync with Package Center.
Besides the point with going out of sync as you mentioned, it is not really a solution to have to power on a computer, access the DSM website, go to control panel, go to scheduled tasks and have to manually run the task. Just to be able to watch a movie on the TV.
But thanks for your input. (and I do not mean this in a sarcastic way). I do like workarounds, but this is not a feasible one.
Maybe you (and I do not mean you personally, but all of the PMS devs) can take the input from the users complaining about this PMS behavior and don’t try to decrease its significance.
PMS writes to its log files periodically. This can not be disabled because disabling log file output would make tech support impossible . If the hard drives have spun down, they will spin up again.
Your only option is to let them spin or shut down PMS.
I do get the point of log files. I am working in tech support myself.
But I don’t understand why there is not an option (and let it be turned off by default) to completely disable log files for users who know what they are doing. If there are issues you still can tell them to enable log files, reproduce issue and send them to you.
Sure, you can hack it and send it all to syslog but it’s still outputting. Should you send syslog output to a syslog server, it becomes the other machine’s problem.
If it’s just the plex logging keeping the drives spinning, perhaps the logging could be redirected to a flash drive plugged into the synology device. Is it possible to set the location of the log file this way?
Log file location isn’t configurable through PMS.
If the log file location were redirected to a flash drive, due to the nature of flash drive technology (SLC storage), it would soon ‘burn out’.
Ok, I guess it’s not possible, though I don’t think the “burn out” would be an issue with what the the OP was trying to accomplish. A simple thumb drive would last quite a while and if it burned out could be replaced for a few dollars, a good trade off to save the energy costs he was concerned about.
I have a really long workaround for this but it works.
On my RPi which is on 24/7 i have 2 folders which are synced to box.com (you can use google drive dropbox etc but box.com seemed to work best for me) those folders are “plexon and plexoff”
I have an incron entry watching each folder, if a change is made in the folder then the incron script is run. In this case plexon.sh or plexoff.sh which SSH’s into the NAS and runs…
“/var/packages/Plex Media Server/scripts/start-stop-status” start or stop
because box.com supports IFFFT i can trigger a write to those folders in lots of ways like when the smart TV is turned on or just a DO/IFFFT button on my phone and because IFFFT is involved pretty much anyway you want. I personally have a couple of FLIC buttons near each TV.
Pretty involved but now my nas sleeps more than 50% of the time.
IF Synology had IFFFT built in that would be awesome it’s been on the “Feature Requests & Product Improvement Suggestions” for 4 Years but no sign of it from Synology yet
Hi guys, i recently bought a Synology NAS and installex Plex and the whole lack of hibernation has been bothering me for a few days(especially because i have a HGST Deskstar NAS hdd which is similar to having a little tractor in the room ).
So i started from your suggestions of turning PLEX server ON/OFF via the scripts you guys provided : /var/packages/Plex\ Media\ Server/scripts/start-stop-status stop/start.
The only problem is i don’t want to constantly log in to DSM and run the commands or start the service. The next best suggestion was to create a schedule task to execute these at some time of day. This also is not something i want because it might be the case that i don’t watch a movie until late in the evening so if Plex Starts at 12PM then the little tractor will be working unnecessarily until say 20pm.
So my solution was to somehow run these commands via SSH from my Android phone. This is similar to issuing raspberry pi commands or home automation tasks.
So i installed a little app called ‘Raspberry SSH Lite’ which allows the creation of button widgets on your phone that have SSH commands linked to them(this is how it looks):
The only problem as you might have noticed is that in order for the command to work, it needs to be ran with elevated privileges(root), you’ll get a permission denied if you try with the normal account(it needs to delete a user folder when the service is stopped). The login with the root account via ssh is disabled by default for security reasons so if you want to go via this route you need to enable this.
Enable SSH & connect to the NAS(via putty in this case)
Log in with your normal account then :
a. elevate permissions to root(s) : sudo -i (type the same password for the account)
b. then change the password for the root account : synouser -setpw root NewPassword
This will give the root account a password that can be used to login with
Now we need to change the /etc/ssh/sshd_config file to allow root logins
cd /etc/ssh
create a backup of the file in case something goes wrong: cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
edit the file : vim sshd_config
remove the # from the PermitRootLogin entry or replace the value to yes.
** To save the amended file in vim :
hit ESC -> type “ :” (colon) -> type “wq” -> enter
Reboot the NAS (you can just type ‘reboot’ in the ssh console and press enter)
You can now test and see if you can connect via SSH with the root account and the password you set. Once that is successful you can run the commands via the buttons on your phone.
**Notice: As this is not the most secure solution i suggest changing the ssh port to something other that the default of 22. I use this mainly inside my LAN as you can see although i suppose you could configure it to run via DDNS or external IP.
I have also tried to configure the login via SSH Key(public/private keys) (you can see the checkbox on the button settings) but i was unsuccessful(i’m not very experienced in this area). If anyone has any thoughts on how to accomplish this as an additional layer of security please let me know.
Hope this proves usefull
Interesting that the root cause of plex being unable to allow NAS hibernate is the need to write logs. Ive been using plex for years, and my Windows computer goes to sleep when nobody is watching a film… plex is running but it knows that nobody need it, so it allow the server to sleep.
Cant you implement the same mechanism in Synology NAS?