Jump to content

Emby preventing Windows 7 from entering sleep mode.


elsmandino

Recommended Posts

elsmandino

HI,

 

I noticed, recently, that my server had stopped going to sleep.

 

After a bit of trial and error, I turned off Emby Server and my server promptly went to sleep after the designated five minutes.

 

Is this a common problem and, if so, is there any way it can be fixed?

 

At the moment, I have to exit Emby when I go to work in the morning and open it again when I get home - so the server does not sit idling all day unnecessarily.

 

Thanks in advance.

Link to comment
Share on other sites

Logos302

If emby is stopping your server from going to sleep it probably doing something.  The logs will tell us what.  

Link to comment
Share on other sites

AmericanCrisis

I too have been having this problem which only started lately.  Event viewer indicates that my Win8.1 server only stays asleep for 10 minute increments and the network adapter is the culprit (waking the server up).  

 

If I disable WOL (wake on Lan) in the device manager for the network adapter then I cannot access Emby remotely (server doesn't wake up) however the server stays asleep longer.  I've played around with the advanced settings some for the network adapter and it doesn't seem to resolve when disabling things (like magic packets etc.).  I certainly don't want to mess around with third party software as that'll get confusing for family members who just want to use Chromecast in their bedrooms.  

 

So I am keeping WOL enabled and need to figure out what on the LAN is waking the server up so often.  The server wakes up when all other PC's are completely powered down and other DNLA devices are off too.  Literally nothing else it talking to it so I figured Emby had to be the culprit.  Wouldn't Event Viewer tell me though if it was Emby?

Link to comment
Share on other sites

  • 2 weeks later...
elsmandino

Hi,

 

The real time folder monitoring being turned off has done the trick - many thanks for that.

 

jhugh - you should give the above solution a try and report back on here if not. 

 

It is strange that this issue has only both arise for both of us recently - I am a long time Emby user and never suffered this problem before.

Link to comment
Share on other sites

AmericanCrisis

Hi,

 

The real time folder monitoring being turned off has done the trick - many thanks for that.

 

jhugh - you should give the above solution a try and report back on here if not. 

 

It is strange that this issue has only both arise for both of us recently - I am a long time Emby user and never suffered this problem before.

 

I had given that a try (de-selected real time folder monitoring) and I noticed all my media was gone on the web client and android app.  As soon as I re-selected and ran a refresh the media was back.  

 

I will try it again though.

Link to comment
Share on other sites

Deihmos

Do not use network paths but instead use path substitution. That worked for me on a previous build when I had the same problem. I have since made my phone idle at just 7 watts so I just leave it on. Windows will stay awake anytime a network path is accessed.

Edited by Deihmos
  • Like 1
Link to comment
Share on other sites

elsmandino

I am not quite sure I understand what path substitution is and whether it is something I need to worry about.

 

I have four folders on my server that I use with Emby - Movies, Music, TV, Photos.  Each one is shared with everyone on my network, so each folder shows up on my network list.

 

I have used the four network locations when setting up Emby.

 

Do I have any real need to worry about substitution in my case?

 

One other quick question - though I have managed to get my Server to sleep as per the above, if I watch something online via Kodi (so the Server is not being used) the Server will not sleep then.  This is not a major problem, but I was wondering whether this was a deliberate thing - is Kodi keeping the Server awake just in case I want to switch back to a recording or Live TV?

 

Is there any way I might change this?  The only reason being that if I am watching online videos all day, it seems to be pointless in keeping the Server on.

Link to comment
Share on other sites

Deihmos

In the library setup use the local path D:\Movies or whatever then use path substitution to map it D:\Movies to the network address. This worked for me in the past when the machine refused to sleep with real time monitoring. Meidia will appear almost instantly with the monitoring turned on. 

  • Like 1
Link to comment
Share on other sites

AmericanCrisis

It seems to be that in my case Emby isn't the culprit at waking my server from sleep on a continuous basis.  I do use UNC paths and I have turned "real time monitoring" off.  This didn't seem to help.  Furthermore, I have shut down Emby server all together for a day to see if the server would then stay asleep for longer than it has been (usually wakes up anywhere from 2 minutes to 30 minutes) and sure enough it still wakes up.

 

It seems that the network controller (Realtek) is just incredibly sensitive.  If I set the network controller to wake on magic packet only then, as stated in the past, it will stay asleep but won't wake up by my Emby clients remotely attempting to access (Roku mostly with some Android based clients).  This is definitely not an option as it defeats the purpose of having a media server.

 

I just updated the network controller driver to a version that is 2015.  A few weeks ago I updated the driver to a 2014 version and must not have gone to the correct webpage because I didn't see a 2015 version.  Needless to say I am hoping that the new version of the network controller driver will resolve this problem.  I really would just like the server to stay asleep for more than 30 minutes.  I will be happy the day that event viewer shows that the server entered sleep and didn't wake for several hours.  

Link to comment
Share on other sites

AdrianW

I had a similar problem with my NUC (I have MBS and MBC installed on it). Every morning the thing would be on even though I'd put it to sleep the night before.

 

I found SmartPower (free for personal use) - which is an app that keeps the PC awake based on certain user specified criteria, and if none of those criteria are met then it will put the PC to sleep. 

 

I've had it installed for about two weeks now, and even if something on the network does wake it, it will go back to sleep again after a short period.

 

It has an optional log - which is a help when tuning the criteria, it shows what is keeping the PC awake.

Link to comment
Share on other sites

Deihmos

It seems to be that in my case Emby isn't the culprit at waking my server from sleep on a continuous basis.  I do use UNC paths and I have turned "real time monitoring" off.  This didn't seem to help.  Furthermore, I have shut down Emby server all together for a day to see if the server would then stay asleep for longer than it has been (usually wakes up anywhere from 2 minutes to 30 minutes) and sure enough it still wakes up.

 

It seems that the network controller (Realtek) is just incredibly sensitive.  If I set the network controller to wake on magic packet only then, as stated in the past, it will stay asleep but won't wake up by my Emby clients remotely attempting to access (Roku mostly with some Android based clients).  This is definitely not an option as it defeats the purpose of having a media server.

 

I just updated the network controller driver to a version that is 2015.  A few weeks ago I updated the driver to a 2014 version and must not have gone to the correct webpage because I didn't see a 2015 version.  Needless to say I am hoping that the new version of the network controller driver will resolve this problem.  I really would just like the server to stay asleep for more than 30 minutes.  I will be happy the day that event viewer shows that the server entered sleep and didn't wake for several hours.  

Go to device manager then network adapters. In the power management select only allow a magic packet to wake the PC.

Link to comment
Share on other sites

elsmandino

In the library setup use the local path D:\Movies or whatever then use path substitution to map it D:\Movies to the network address. This worked for me in the past when the machine refused to sleep with real time monitoring. Meidia will appear almost instantly with the monitoring turned on. 

 

Superb - worked fantastically!  I have done exactly what you said and even with real-time folder monitoring, my Server now sleeps when not doing anything.

 

I have to be honest, I cannot really see why using path substition is actually any different from using the network location directly but as longs as it works, I am happy to live in ignorance.

 

Thanks very much for your help.

Link to comment
Share on other sites

AmericanCrisis

Go to device manager then network adapters. In the power management select only allow a magic packet to wake the PC.

 

This works fantastically if you don't have remote clients.  With the magic packet only box checked, the server sleeps perfectly, however, the server will not wake when my mom wants to watch a TV show at her house on her Roku (as an example).  My Android app for WOL works great locally though.

 

From what I have researched and come to understand, there is no easy work around.  It seems that the only solution is to have my router firmware configured to support WAN and then to access the router's web page remotely to subsequently have the router send a magic packet to the server.  I don't think that this would be a practical solution to explain to my remote clients who aren't very technically inclined.  

 

In the long run it's not really a big deal that the server won't stay asleep.  I know my CPU idles at about 10ish watts.  There is no dedicated video card sapping energy either and the only other thing that is in there is 3 WD Red hard drives.  I would like to eventually get more hard drives though so as time progresses "sleeping" will become more of a priority.  Hopefully by then the network controller will be less sensitive on wake ups (driver upgrades or an upgraded motherboard).

 

On a side note, my gaming computer motherboard has the Killer network adapter and doesn't seem to have this problem.  Maybe Realtek is the real culprit here.  I'll ensure my next motherboard doesn't use Realtek.  In fact my next motherboard will most likely have two options (Intel and Killer).  

Link to comment
Share on other sites

Deihmos

The problem with that setting is the PC will wake even when another computer is not accessing it. That has always been the case and I have never seen it work well. You might as well just leave the PC on.

Edited by Deihmos
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...