INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: WOL and Prevent Sleep  (Read 1293 times)

whoareyou

  • Galactic Citizen
  • ****
  • Posts: 439
WOL and Prevent Sleep
« on: May 21, 2023, 09:19:47 am »

WOL works fine when MC client connects to MC server on Windows, but what is supposed to happen after the server is awake and is actively serving a client? 

Is MC server process supposed to prevent sleep on behalf of that active client?  For me, server (per the active power plan) goes to sleep resulting in client being disconnected.

No problems if using server directly, as MC requests OS to prevent sleep.

So, is this the expected behavior?

Thanks



Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 849
Re: WOL and Prevent Sleep
« Reply #1 on: May 21, 2023, 09:52:20 am »

Is MC server process supposed to prevent sleep on behalf of that active client?  For me, server (per the active power plan) goes to sleep resulting in client being disconnected.
The MC server is not supposed to go to sleep while serving an MC client!  For at least the last year or so this worked as expected.

But recently, unfortunately, I encounter the issue when playing audio tracks remotely, similar to what you describe.  In my case, after WiFi WOL the server plays to a DLNA renderer (via BubbleUPnP), controlled by an Android player app (JRemote2 or MO 4Media).  Then the MC server computer goes to sleep before MC completes its playlist (typically after playing only a single track), long before the Windows active power plan is set to put the monitor or computer to sleep.

MC Help > System Info... > Power > "No entries that affect the system power state"

Server:  Win 11 Pro 22H2 Build 22621.1702 (64-bit) | MC 31.0.12
Logged

whoareyou

  • Galactic Citizen
  • ****
  • Posts: 439
Re: WOL and Prevent Sleep
« Reply #2 on: May 21, 2023, 11:48:45 am »

The MC server is not supposed to go to sleep while serving an MC client!  For at least the last year or so this worked as expected.

But recently, unfortunately, I encounter the issue when playing audio tracks remotely, similar to what you describe.  In my case, after WiFi WOL the server plays to a DLNA renderer (via BubbleUPnP), controlled by an Android player app (JRemote2 or MO 4Media).  Then the MC server computer goes to sleep before MC completes its playlist (typically after playing only a single track), long before the Windows active power plan is set to put the monitor or computer to sleep.

MC Help > System Info... > Power > "No entries that affect the system power state"

Server:  Win 11 Pro 22H2 Build 22621.1702 (64-bit) | MC 31.0.12

My configurations are straightforward clients accessing windows 11 server via MC key and for me it's never worked as you described, across multiple MC versions and various machine builds and windows OS. 

You believe server should stay awake (and you are on Beta team?).   So, you believe this to be a bug?




 
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 849
Re: WOL and Prevent Sleep
« Reply #3 on: May 21, 2023, 12:41:09 pm »

I have seen the problem come and go a few times over the past few years, including with simple clients (and there are many old forum posts about it).  However things have behaved normally for quite a while on my system, until very recently (last few weeks) when the server sometimes went to sleep after just one or two tracks, as described.

I have not nailed down a causal sequence.  Being intermittent in my case today, it is hard to trouble shoot.  Could be a MC bug, a recent change in Windows, or even depend on how long the server PC has been asleep before WOL (affected by Windows transition between different sleep states?).

Have you checked MC System Info > Power?

Does problem ever occur before Windows active power plan is supposed to put server to sleep, or only after the Windows time out?

Exactly which MC version are you running today?

Re Beta team:  I have no special view of MC's inner workings, just relaying my experience as an end user and general expectations.




Logged

whoareyou

  • Galactic Citizen
  • ****
  • Posts: 439
Re: WOL and Prevent Sleep
« Reply #4 on: May 21, 2023, 01:51:12 pm »

I have seen the problem come and go a few times over the past few years, including with simple clients (and there are many old forum posts about it).  However things have behaved normally for quite a while on my system, until very recently (last few weeks) when the server sometimes went to sleep after just one or two tracks, as described.
Yes, I too have seen those posts, and over many different versions of MC, but after reading many of these I've been left confused as to what the expected behavior is supposed to be.

I have not nailed down a causal sequence.  Being intermittent in my case today, it is hard to trouble shoot.  Could be a MC bug, a recent change in Windows, or even depend on how long the server PC has been asleep before WOL (affected by Windows transition between different sleep states?).
Yes, these are very difficult to diagnose.  For me, it never worked so it is not a windows change. 
But, when running directly from the server PC is obviously kept awake by MC and powercfg /requests shows the activity.  I don't remember ever seeing the powercfg request when client is being served data (I'll have to double check).

Have you checked MC System Info > Power?
No.  Didn't realize that even existed until you mentioned it and I've only checked via windows powercfg command.  I'll take a look at that and see if it provides anything additional.

Does problem ever occur before Windows active power plan is supposed to put server to sleep, or only after the Windows time out?
Always seems to correlate with power plan's configured sleep setting.

Exactly which MC version are you running today?
31.0.10

Re Beta team:  I have no special view of MC's inner workings, just relaying my experience as an end user and general expectations.
Thanks.  Was never really sure what the "Beta team" signature meant, but I thought it provided you with means to communicate with developers. 

I would really like to know what the expected behavior is in this situation.

Only one more piece of info is that I just leave the application open and don't start media server with OS start. 
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 849
Re: WOL and Prevent Sleep
« Reply #5 on: May 21, 2023, 02:07:18 pm »

Only one more piece of info is that I just leave the application open and don't start media server with OS start.
Any reason why you don't start media server with OS start?  I believe it is essential that media server at least be running in the background to get reliable MC connection after WOL.  In any case, I always start it automatically.  Then Windows Task Manager always shows Media Center Service running in the background, as well as the Media Center xx process running in either foreground or background.  Windows Services lists the former as Media Center xx Service.  Media Center Server also shows up as a "Media Server" icon in the Taskbar Notification Area.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72544
  • Where did I put my teeth?
Re: WOL and Prevent Sleep
« Reply #6 on: May 21, 2023, 02:16:11 pm »

Yes, run Media Server on startup.

No, WOL doesn't depend on MC.  It wakes the computer, using the network.

Wake on Lan can be tricky.  The wiki has a topic on it.
Logged

whoareyou

  • Galactic Citizen
  • ****
  • Posts: 439
Re: WOL and Prevent Sleep
« Reply #7 on: May 21, 2023, 02:37:28 pm »

Thanks for replies.

Not WOL issue as MC wakes PC as expected.
The issue is one of keeping the computer running when a client is connected and being served files i.e audio.

I'll try starting media server with OS, and see if that makes a difference as far as keeping MC server awake (pretty sure I've done this in past).

As far as "why don't I run media server" with OS startup?  On this machine, I always have media center UI running all the time, and I thought media server is same basic core just without UI.

Does Media Server do something different to keep a server PC awake when serving files? 
Thanks
Logged
Pages: [1]   Go Up