INTERACT FORUM

Please login or register.

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

Author Topic: Preventing Sleep  (Read 3088 times)

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Preventing Sleep
« on: June 21, 2021, 06:22:28 pm »

I noticed a handful of topics on the MC27 board about this.  I noticed several times over the last week that MC28 is keeping my Mac awake.  The screensaver will turn on, but it never goes to sleep.  In activity monitor, it shows MC28 as Preventing Sleep: Yes.  In the last 27 build, there was a line item about this.  Is this reverted in 28?  Thanks!

This is a BETA build of JRiver Media Center 27.  Please post bugs here.  Please start a new thread for anything requiring discussion.  Non-bug posts will be deleted.

27.0.87 (5/20/2021)

1. Fixed: Sleep issue cause by trying to work around a bug in Big Sur which has been fixed in 11.4. The work-around prevented screen sleep when playing audio files.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #1 on: June 22, 2021, 01:23:42 pm »

Activity monitor doesn't seem to be accurate about this.
On my M1 is shows several processed supposedly preventing sleep but it sleeps anyway.

This was tested to be working on both Intel and Silicon.
The sleep control on Intel Mac is way more comprehensive than on Silicon.
You can only control whether or not the computer goes to sleep after the display sleeps on Silicon, not when and I have no idea how they determine when.
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #2 on: June 24, 2021, 09:42:40 am »

I can try to do some more testing.  MC was the only item showing this Activity Monitor, and I noticed because I typically never see my screensaver.  The mac just goes to sleep instead.  In this instance, I came into my office and the screensaver was running.  I closed MC then manually put the mac to sleep.

Other times, I've unplugged the mac, gone to a different room, then noticed that my battery had been draining while unplugged (and closed).  When I look in Activity Monitor, the only Yes has been on MC.
Logged

dfortney

  • Galactic Citizen
  • ****
  • Posts: 310
Re: Preventing Sleep
« Reply #3 on: July 06, 2021, 07:37:07 pm »

Sounds like this requires a serious and concerted research spike with help from the Apple Geniuses to truly understand how sleep is supposed to work on the Mac and how to use it correctly.  As a developer can't you get some internal resources to help understand and flush this out?  Managing sleep properly needs to be very well understood to have a stable well performing media player.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #4 on: July 08, 2021, 09:09:51 am »

I can try to do some more testing.  MC was the only item showing this Activity Monitor, and I noticed because I typically never see my screensaver.  The mac just goes to sleep instead.  In this instance, I came into my office and the screensaver was running.  I closed MC then manually put the mac to sleep.

Other times, I've unplugged the mac, gone to a different room, then noticed that my battery had been draining while unplugged (and closed).  When I look in Activity Monitor, the only Yes has been on MC.
Have you tried the current build?
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #5 on: July 09, 2021, 09:26:04 am »

Have you tried the current build?

I installed .34 a few days ago and have been monitoring it.  Since doing that I have not seen my screensaver on at all.  I'll walk away from my desk (with it plugged in), and come back 10 minutes later to see the screen asleep.  Last night I did an unplugged test, I checked Activity Monitor and MC was the only item that said Preventing Sleep: Yes.  I put the computer to sleep at about 9 PM with the battery at 60%.  This morning at 7AM, I opened it up and the battery was at 45%.  I'm not ready to blame that all on MC, so I'll redo this with MC closed later today.  I'm used to closing my laptop lid and having the battery drain maybe 0-1% overnight, not 15%.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #6 on: July 09, 2021, 09:52:42 am »

Check MC's system info when you do this.
MC's just idling on my system doing nothing and when I check, after the mode change times out (1 minute after starting), preventing sleep goes to no.

Mac Mini M1 for this screenshot. I tried Catalina on my MBP too and it was the same.
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #7 on: July 09, 2021, 10:17:28 am »

Interesting.  So I had this up for at least 5 minutes looking at it and Preventing Sleep was at Yes (background tasks was saying nothing was running).  I closed and reopened MC and did the same thing, like you said, after about a minute it flipped to No.

I am running Big Sur, not Catalina, FYI.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #8 on: July 09, 2021, 10:25:01 am »

Interesting.  So I had this up for at least 5 minutes looking at it and Preventing Sleep was at Yes (background tasks was saying nothing was running).  I closed and reopened MC and did the same thing, like you said, after about a minute it flipped to No.

I am running Big Sur, not Catalina, FYI.
How about MC's Power state entry in System Info?

I tried on both Catalina and Big Sur.

I wonder if perhaps there is a auto-import running in the background. I don't think that runs when the machine is sleeping.
When you first start MC and every couple of hours if you have auto-import folders setup, it will run an auto-import. Like I said though, I don't think it happens in sleep mode.
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #9 on: July 09, 2021, 10:30:32 am »

How about MC's Power state entry in System Info?

I tried on both Catalina and Big Sur.

I wonder if perhaps there is a auto-import running in the background. I don't think that runs when the machine is sleeping.
When you first start MC and every couple of hours if you have auto-import folders setup, it will run an auto-import. Like I said though, I don't think it happens in sleep mode.

I'll have to recreate it, I didn't take a screenshot because it had my public IP in the server name, so I renamed my server and restarted MC to try to get a screenshot and that's when I noticed that it flipped to No.  Yesterday at some point I did start playback on the wrong zone, and I then diverted it (forgetting that wasn't working on mac).  I wonder if that had something to do with it.  I'll do that again momentarily.  I did notice the program run time was >24 hours before I restarted it, so that event would have been during the current session.

I'm running my mac as a client of my Windows 10 server, so there should be no auto-import triggers running.
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #10 on: July 09, 2021, 10:40:23 am »

Yesterday at some point I did start playback on the wrong zone, and I then diverted it (forgetting that wasn't working on mac).

I think this might be the cause of my issue.  I just diverted from a local zone (built in speakers) to my linux version plugged into my speakers.  The song that was playing pauses for a second, then resumes playing out of the mac's built in speakers.  The playback in MC shows no progress however (it looks paused).  As the song progressed, I saw the power state change to something like Playback (no sleep) [expired] to what it says now: "No entries that affect the system power state."  But the Preventing Sleep is stuck at Yes, even after the song has finished and waiting 3 or 4 minutes.

I've tried the diversion feature a few times, but I rarely, if ever, actually restart my mac.  I usually just close the lid.  So it's quite possible that I tried it on Monday and had the same MC session running until Wednesday or something like that.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #11 on: July 09, 2021, 10:46:58 am »

I think this might be the cause of my issue.  I just diverted from a local zone (built in speakers) to my linux version plugged into my speakers.  The song that was playing pauses for a second, then resumes playing out of the mac's built in speakers.  The playback in MC shows no progress however (it looks paused).  As the song progressed, I saw the power state change to something like Playback (no sleep) [expired] to what it says now: "No entries that affect the system power state."  But the Preventing Sleep is stuck at Yes, even after the song has finished and waiting 3 or 4 minutes.

I've tried the diversion feature a few times, but I rarely, if ever, actually restart my mac.  I usually just close the lid.  So it's quite possible that I tried it on Monday and had the same MC session running until Wednesday or something like that.
Diversion from the player zone to a DLNA zone on my Id works fine for me (24 bit alac files).
Are you doing any conversions?
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #12 on: July 09, 2021, 11:02:24 am »

Diversion from the player zone to a DLNA zone on my Id works fine for me (24 bit alac files).
Are you doing any conversions?

No. 
Media Network > Audio Conversion is set to "Don't convert audio" on the mac, the windows 10 server and the linux diverted to zone.

EDIT: In case it matters, the Linux zone is a Pi 3b, running 27.0.84.  But I have run into the same issue when playing with diversion from two local mac zones (from headphones to speakers).
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #13 on: July 09, 2021, 11:53:10 am »

No. 
Media Network > Audio Conversion is set to "Don't convert audio" on the mac, the windows 10 server and the linux diverted to zone.

EDIT: In case it matters, the Linux zone is a Pi 3b, running 27.0.84.  But I have run into the same issue when playing with diversion from two local mac zones (from headphones to speakers).
I wonder what's going on. My setup is almost the same as yours, I'm just using an idPi for the diversion target.
What file types?
Logged

hoyt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 867
Re: Preventing Sleep
« Reply #14 on: July 09, 2021, 12:27:20 pm »

I wonder what's going on. My setup is almost the same as yours, I'm just using an idPi for the diversion target.
What file types?

FLACs.  24/96 or 16/44.1.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Preventing Sleep
« Reply #15 on: July 09, 2021, 05:43:22 pm »

FLACs.  24/96 or 16/44.1.
Mine are almost all ALAC.
I'll try some FLAC but it doesn't seem like that should make a difference.
Logged
Pages: [1]   Go Up