Partially this problem appears due to the browser window open on PMS setting page. If one closes all the browser windows containing PMS config page comp goes to sleep just fine.
But that solves problem only partially.
Partially this problem appears due to the browser window open on PMS setting page. If one closes all the browser windows containing PMS config page comp goes to sleep just fine.
But that solves problem only partially.
I guess I could be starting with a bad assumption, my apologies if so.
In your original post, the stated problem is just that in the morning you expected it to be asleep and in fact, it was only sleeping about half the time.
In my mind the 50% of the time it was asleep would be a problem. I would have wanted it to be awake so it could serve media.
If I understand you correctly, you feel the opposite. You want it to be asleep every morning when you wake up. You are not worried about plex being functional 24/7, you just want it to sleep as soon as the system is idle for a reasonable amount of time. You believe that since you are not actively using it, it should be idle enough to go to sleep every day. if you could achieve this, your problem would be solved.
Is that correct?
The good news is that since it is asleep 50% of the time, that means that your OS and BIOS settings are configured in a way that sleep is functional. you can just concentrate on finding what is stopping it the other 50% of the time.
If so there are two things you can look at
How long windows expects the system to be idle before it puts itself to sleep,
what activities are happening on your system that Windows sees as “usage” and then either stop them from happening or schedule them for a period that you are OK if your system stays awake. plex has many tasks that could be interfering. I would start with changing the scheduled tasks window to the daytime hours. thumbnails especially can take a long time, potentially multiple days if you have a lot of media.
In my case the severs will go to sleep as expected when PMS is not running and will awake on command.
Starting PMS and it never sleeps.
Yes, you got my expectations quite right. I would like the desktop with PMS go to sleep according to policy set in Windows. EXCEPT cases when PMS is busy (for example if I watch a movie on my TV from this PMS).
I already made some investigation what PMS activites prevent sleep. And would like to share some conclusions.
I didn’t notice yet if length of idle period before going to sleep set in Windows policies affects going sleep state. Seems it doesn’t. Machine just either goes to sleep or not, no matter of the length of idle period. I checked 1 min, 2 min, 3 min and 10 min.
This PMS has no connected media libraries at all yet - while I’m investigating problem with sleep state. So it’s can’t be busy with thumbnailing activities. BUT! I checked few activities and dependencies that prevent sleep already. Will describe them below.
First of all. I DID check with powercfg /requests what prevents sleep. Yes, it’s PMS and PMS only. Windows is fresh-installed also.
I came across PMS preventing sleep in this cases:
a) PMS page is open in chrome browser tab on the same machine. Close the chrome tab - and machine goes to sleep fine. If you open it again - maching DOES NOT go to sleep. Seems browser page.
b) Activities of other PMS’ in LAN. To be more presice - on my iMac in the same LAN. When PMS on iMac i active it prevents the PC from sleep. Dont know why. Maybe PMS’ have some communications among them. BUT NOT ALWAYS! Didn’t find precise statistics yet when other PMS prevent sleep and when don’t. Needs MORE investigating.
Still I’m reallly pissed with this case because torrent client developers already developed a flawless sleep state prevent/allow system that worx flawless. What’s so complicated to make the same for PMS?
PS Gawd bless this forum interface! XD I closes a tab with this message when it was almost done but not sent! =) It restored it’s contents.
Yes, that’s the case. For some people it’s correct for PMS to prevent sleep and for some it’s not.
In my case system also sleeps fine if PMS is not running, but in case it’s running it prevents sleep in some cases. And I need it not to.
Another point is that PMS Version 1.15 and before would allow the servers to sleep…
Also in testing the server I’m using has no other users then admin.
I access it remotely so there are no active users directly connected. When I close out the connection they is no other connections other then what PMS creates.
So. I made some more investigations:
PMS running on iMac in the same network (192.168.1.x) PREVENTS PMS on PC from sleep.
Once you close PMS on iMac - PMS on PC goes to sleep just fine. (And if you close PMS on PC it also goes to sleep just fine.)
BUT! this happens NOT ALWAYS. Sometimes even with iMac PMS on PC goes to sleep just fine. So theres ANOTHER reason for it not to sleep sometimes!
Any ideas how PMS on iMac prevents PMS on neighbour PC from sleep?
“PMS page is open in chrome browser tab” is an active Plex Web Client connection, even if it is on the same PC. One of your stated goals was for PMS to stay awake when it is busy, so this is the desired outcome. This is a great example of the activity that you will need to find and stop/reschedule to allow your PMS to be idle “enough” to enter sleep mode.
There is a feature that PLEX has to facilitate UPNP and in general, announce itself, and find others (GDM). disable it on both the PC and the MAC, “enable local network discovery”
Also, PLEX DLNA seemingly has problems with CPU/RAM, so I would disable that as well.
Interesting that you found PMS to be the item that is preventing sleep in all cases, as I would have expected the chrome browser to be on there too. On the enterprise side, we sometimes get an alert that we have a server with CPU usage MUCH higher than normal, and on occasion, it turns out to be an admin simply left a web page open and disconnected instead of logged out.
good troubleshooting idea to not yet a bunch of media to your PMS while you work this problem. I do wonder if there is something in the background that might be related. Perhaps PLEX doesn’t think the setup is complete till you add a library and is looping something till it finds one. At the very least running plex with zero media is not something they spend much time troubleshooting. maybe add a couple of tiny ones?
Thing that concerns me most is that running PMS on iMac prevents PC PMS sleep NOT always. I will continue investigating the matter.
It’s not necisarily shocking
The interaction of background tasks and discovery processes that we are not published … its easy to imagine that some nights will have an X minutes idle period, and other nights will not. PLEX does all kinds of things itself, and in reaction to other systems. As an example, I have a ubiquiti WIFI controller that scans the network for UPNP devices and till I disabled that feature, it swamped my plex log with errors.
Let me steer you towards:
Gawd, man! !This is a precious diamond in the pile of dust! Thanx a lot! Search engine @ this forum SUCKS terribly! I wasted a lot of efort to try to figure out most part of this myself only due to the fact there’s no tag “Windows Sleep” or “PC sleep” or smth like that!
Well, nice try but all the mentioned above didn’t help. My PC goes to sleep with PMS running just fine.
UNTIL something happens. =) For example I have just started a PMS at my MacBook (in the same LAN) that was installed but I didnt run for ages. After that PC stopped going to sleep again. =))
The most amusing thing that it’s NOT a MacBook PMS that was preventing sleep - it was iMac’s! =)) (In the same LAN). I mean that PC didn’t go to sleep even when a MacBook thaet prevented it was OFF.
But PC started to sleep again (no manipulation done @ PC itself) after PMS @ iMac was restarted!
Did you get all the plot? iMac PMS started to prevent PC from sleep after MacBook PMS waked both machines! XD XD XD
As I know from “hardware malfunctions diagnostics” university course mutually exclusive sympthoms should be ignored during malfunction diagnostics. So all this reveals that most likely the problem is some packets being transfered to or from LAN to Plex. NOT Plex on PC itself.
Guys, I just think that’s where developers should interfere.
Keep in mind that PMS is a server so it can be busy even if it’s not streaming. A few things to look at.
Thank you for your reply! I must mention that I have just wasted two weeks to diagnose on my own what you have just told me! =)) (See above.)
Im carefully investigating PMS behaviour on fresh installed windows.
So. The most curious thing (see above) that its OTHER computers PMS that prevent PC PMS from sleeping. The mistake is statistically insignificant.
Last time PMS @ PC stoppped sleeping when I initiated iMac PMS. Solver by restarting iMac PMS and PC sleeped fine ever since. And the exactly same happened today whey I re-awakened long-unused PMS server @ MacBook.
And the fact that PMS doesn’t sleep when web page is open I figured out myself last week. =)
That’s a good advise! Will follow! Thank you! Still I would continue investigating what OTHER activity LAN PMS activity. It’s 100% that some activity preventing PC sleep is displayed during initialization of PMS servers on macOS machines in the same LAN. After that everything is alright again.
I wonder what a debug loggin would reveal but i dont know how to read this file
Made some investigations. Is 100% that it’s iMac PMS in the same LAN that makes PC PMS prevent sleep.
Any thoughts?
You have PMS running on two devices on the same LAN?
I have a Win 7 64 setup as a test system its identical to my PMS servers.
This system has PMS loaded but no users (other then admin) or libraries installed.
It’s running Version 1.17.0.1709…
Prior to Version 1.15 all servers would sleep like normal if there was no activity.
They will still sleep if; PMS is not running on it and none of the clients are loaded locally. also remote users don’t affect it.
just starting the Web client up to the PIN screen will startup the test server, no login is required.
Settings > Network
Uncheck “Enable local network discovery (GDM)”
This enables the media server to discover other servers and players on the local network.