jellyfin / jellyfin-server-macos

The menu bar app and package for Jellyfin Server on macOS.
https://jellyfin.org
Mozilla Public License 2.0
58 stars 15 forks source link

MacOS/AppleTV-MrMC playback stops after computer goes to sleep or to lock screen #45

Open bringmecoffeeortea opened 4 years ago

bringmecoffeeortea commented 4 years ago

I'm finding playback halts after about an hour, and I think this may be because my Energy Saver preferences have the computer set to sleep at an hour (though tbh I find that feature of MacOS kinda wonky, I don't think my computer ever actually sleeps). I have to go to the computer and wake the screen and type my password to then resume uninterrupted playback. Also in Energy Saver Display sleep is set for 30 minutes, "Put hard disks to sleep when possible" is enabled and "Wake for network access" is enabled. If this is a MRMC issue then don't worry about it I'm happy to wait for a Jellyfin AppleTV app.

System (please complete the following information):

To Reproduce

  1. Start a show
  2. Watch for an hour
  3. Show stops / pauses

Expected behavior No pausing I think the computer should know it's being used and continue to send the stream.

stale[bot] commented 3 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

anthonylavado commented 3 years ago

Oh whoops. Let me take care of that.

stophecom commented 2 years ago

I ran into the same issue. As a workaround you could just prevent the Mac from going to sleep: Set Energy Saver Timeout to never.

Side note. In my case I wanted to use a MacBook Pro as a server and noticed that it would always go to sleep when closing the lid. In such case you might want to use this app Amphetamine that prevents the laptop from sleeping when folded.

Still, I'd be happy for better solution where the app kept running in the background.

Any news on this? 😄

anthonylavado commented 2 years ago

Hey, thanks for reminding me on this actually. I want to say there was some research I did to know whether or not this was possible, and it wasn't easy. I'll move this to the correct repo for the .app wrapper.

I think the last time I researched it, Plex had a solution where someone wrote a script to keep the server awake whenever playback was detected in the server log file. Not elegant, but we may have to do something similar. The main issue I see is that our clients won't wake your Mac from sleep (I don't think Plex does either), but we can try to keep it awake while streaming is happening.

stophecom commented 2 years ago

Thanks.

clients won't wake your Mac from sleep

Agree. I now just prevent Mac from sleeping altogether, which is good enough for me. I actually found the following script that doesn't require installing additional apps, like I mentioned previously.

https://gist.github.com/pwnsdx/2ae98341e7e5e64d32b734b871614915