Raptor6L 29 Posted June 22, 2020 Posted June 22, 2020 Hi all I've got Emby Server on a HTPC (I call it a server) along with WMC and Emby Theater. I have the server set up to sleep when it's not doing something, or more accurately hasn't done something for 10 minutes. The problem I'm faced with is when the server is when it's streaming (let's say a movie) to another device (lets say a laptop) by the time the movie has finished the server has been idle for a while and gone to sleep. I have to restart the server to get going again. Anything in MP4, it doesn't even wait for the movie to finish, it'll go to sleep and when the device catches up to where the movie is bufferred up to (which is something like 10 minutes of playing time) Theater stalls. When I get everything going again, the resume point for the movie is where the server went to sleep, not the where we had played up to - so we have to skip forward approx 10 minutes. I remember back way back when, WHS had a feature that if the served device was awake, the server would remain awake. I guess something like that is what I'm looking for. Any ideas anyone? Thanks Chris
Gilgamesh_48 1240 Posted June 22, 2020 Posted June 22, 2020 My only advice is that servers should never sleep. It saves very little in power or wear and there are many potential problems.
rbjtech 5284 Posted June 22, 2020 Posted June 22, 2020 something like 'coffee' ff - allows you to specify if a certain program is running (emberserver) then don't go to sleep - https://sourceforge.net/projects/coffeeff/
Luke 42083 Posted June 22, 2020 Posted June 22, 2020 The windows emby server should be keeping itself awake without you having to do anything. Are you on Windows 10?
Raptor6L 29 Posted June 23, 2020 Author Posted June 23, 2020 13 hours ago, Gilgamesh_48 said: My only advice is that servers should never sleep. It saves very little in power or wear and there are many potential problems. Yep, I used to do this purely because I couldn't get the damn thing to sleep properly. I've got that side of things sorted now, so if it's not doing anything, I don't want it running just for the sake of it. 11 hours ago, rbjtech said: something like 'coffee' ff - allows you to specify if a certain program is running (emberserver) then don't go to sleep - https://sourceforge.net/projects/coffeeff/ I'm using Econap, which is like coffee_FF. Problem with that is whenever the server is running, emby server is running, so the thing would never sleep. 5 hours ago, Luke said: The windows emby server should be keeping itself awake without you having to do anything. Are you on Windows 10? Nope, Win 8.1. I still rely on WMC way too much to move to win10 with this machine. From one point of view, the server is doing exactly what it's supposed to do, which is when it's totally idle for 20 minutes (i had a look, it's actually 20, not 10) - go to sleep. What I'm looking for is the emby slave (theater, iphone, android, whatever the end user program is) to say to the host (emby server) "don't go to sleep, i'm still here". Once that message stops (which would happen when the emby slave app is closed), the server can go to sleep after it's alloted idle time is reached. I'm guessing that's not a doable thing? For the laptop (used in a 2nd lounge room, it's used purely for emby) I might have to experiment with a repeated schedule task. No idea what to do about the iphone, ipad and android though?
rbjtech 5284 Posted June 23, 2020 Posted June 23, 2020 (edited) By using powercfg on the command line (as admin) you can see all sorts of extra power config not available via the GUI https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options C:\WINDOWS\system32>powercfg /requests DISPLAY: None. SYSTEM:[PROCESS] \Device\HarddiskVolume7\Emby-Server\system\EmbyServer.exe AWAYMODE: None. EXECUTION: None. PERFBOOST: None. ACTIVELOCKSCREEN: None. As you can see from my system above - if embyserver is running, sleep is automatically disabled anyway as Luke has said above. (it's a server, so it's on 24x7 anyway) Your problem is something has to be listening for it to know when to wake (lol) - so you actually have two issues 1- how to stop the server sleeping mid playback and 2 - how are your clients going to 'wake' a sleeping server if they want to play something when it is already asleep ? The only solution for #2 is 'wake on lan' where the server will wake itself with special network packets from the clients - I'm not 100% sure if the emby clients send these - they may do. You can send the packets via a small utility before you run the client - but it's a faff. You'll also get into all sorts of 'relays' if you need to do this over a WAN as WoL technology is LAN based only (broadcast). The other issue is the time it takes to wake and get itself 'ready' for streaming - the emby clients will almost certainly time out here. Personally, I would just set the sleep to be on a timer - so it sleeps during the night if that's what you want - but sleeping every 20 mins is just going to destroy your hardware with all the power surges and heat cycles - imo. Edited June 23, 2020 by rbjtech
Luke 42083 Posted June 23, 2020 Posted June 23, 2020 17 hours ago, Raptor6L said: Yep, I used to do this purely because I couldn't get the damn thing to sleep properly. I've got that side of things sorted now, so if it's not doing anything, I don't want it running just for the sake of it. I'm using Econap, which is like coffee_FF. Problem with that is whenever the server is running, emby server is running, so the thing would never sleep. Nope, Win 8.1. I still rely on WMC way too much to move to win10 with this machine. From one point of view, the server is doing exactly what it's supposed to do, which is when it's totally idle for 20 minutes (i had a look, it's actually 20, not 10) - go to sleep. What I'm looking for is the emby slave (theater, iphone, android, whatever the end user program is) to say to the host (emby server) "don't go to sleep, i'm still here". Once that message stops (which would happen when the emby slave app is closed), the server can go to sleep after it's alloted idle time is reached. I'm guessing that's not a doable thing? For the laptop (used in a 2nd lounge room, it's used purely for emby) I might have to experiment with a repeated schedule task. No idea what to do about the iphone, ipad and android though? What Emby Server does is keep the machine awake as long as an Emby app has made an active connection over the past 15 minutes. That could be watching media but it could also be browsing around.
Raptor6L 29 Posted July 21, 2020 Author Posted July 21, 2020 Hi Luke Yes, that info helps. Emby is doing what I was hoping it would do, but I'm guessing it's being over-ridden by Econap. I need to sit down and play with the settings a bit more to try and come to a compromise, but time hasn't been available lately. Thanks for the info Luke!!! Chris
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now