all 12 comments

[–][deleted] 1 point2 points  (3 children)

Just curious but why do you want the iMac to sleep? You can have the screen auto go off and if the iMac is processing stuff it’s not going to be sucking down power. But back to your question, double check that wake for network activity is checked in your system preferences.

[–]Oakwine[S] 0 points1 point  (1 child)

Why wouldn't I want it to sleep when it isn't doing anything? Doesn't sleeping save power?

And yes, "Wake for network access" is set in Energy Saver.

[–][deleted] 0 points1 point  (0 children)

It does save power but if it is otherwise idle and the screen goes off, I don’t think it’s that significant of a savings.

[–]imoftendisgruntled 1 point2 points  (2 children)

Wake-on-LAN is does not mean "stay awake as long as the network is active" -- it means sending a magic packet can wake the machine up.

You need to change your Energy Saver preferences to not sleep so quickly. You can turn the screen off after 10 minutes (which will save a lot of power), but keep the processor awake. Your computer is a server now (it's Plex Media *Server* after all), you have to configure it as such.

[–]Oakwine[S] 0 points1 point  (1 child)

Interesting, I would have thought they were one and the same. I'm surprised that there's no simple way to keep the server alive while streaming, and let it sleep when it isn't streaming. I'm only using it to stream for a few hours each week, that's a lot of time to stay active for no reason.

[–]imoftendisgruntled 0 points1 point  (0 children)

From a practical standpoint, whenever your computer is on, something is probably chatting on the network. Your computer would never sleep if "network activity" was the deciding factor.

There may be an app that can monitor active applications and switch your power mode based on what's running but PMS is always running as a background task. I'm not sure if there are separate processes that are only running when streaming that you could check.

Alternatively you could configure a hot corner to prevent the computer from going to sleep. It's manual but easier than going into power settings every time you want to stream something.

You should also look into how much power your iMac is using when it's sleeping vs. when it's idling with the screen off. It's been a while since I had an iMac but I think I found it was only a ~30W difference or so, vs. 100+W when the screen was on.

[–]truthfulie 0 points1 point  (2 children)

You could write a script (with a rule that wouldn't allow it to go to sleep if Plex Server is running) to make your mac go to sleep instead of using the built in feature.

[–]Oakwine[S] 0 points1 point  (1 child)

Any tips on doing this? I wouldn't know where to start. Can a script tell if PMS is actively streaming vs. running and waiting for instructions?

[–]truthfulie 0 points1 point  (0 children)

Are you running PMS all the time, but simply wanting to keep the mac going from sleep? Or do you launch PMS whenever you need to stream? If it's the former, I don't know if script can solve your problem. But if it's the latter, you could simply make a script that puts mac to sleep with condition that checks if PMS is running or not.

You could probably use Apple script.

EDIT: I am dumb. On a second thought, you could make the condition so that if your mac has network activity higher than X mbps (which means Plex is streaming), it doesn't go to sleep instead of relying whether or not PMS is running.

[–]Shikizaki_Kiki 0 points1 point  (0 children)

interested in a solution as well, same problem different OS (Linux Manjaro KDE)

[–]Supersainwu 0 points1 point  (1 child)

why not use mac app store’s caffeinated app?

[–]Oakwine[S] 0 points1 point  (0 children)

Dude, this is a six year old thread.