An Inconvenient Bug (or two)
So I’m sitting there coding the other day, and the phone rings. I pick up absentmindedly, because really, only Anna calls me. “Hello”, says the voice on the other end of the line, in an easy quasi-drawl “this is Al Gore”. My brow furrows, because I don’t believe it at first. “The Al Gore who invented the Internet?” I ask suspiciously. “One and the same”, he says.
“I called to ask for a favor”, he continues. “You see, I run Plex on my three monitors, and I noticed that when I set the display sleep timer, my monitors still wake up after a few seconds.”
I suddenly have a bad feeling. Barkley can sense it too, I think, because he opens one eye for a second, and then falls back asleep.
“So I ran the numbers”, Al Gore continues, “and, well, with all your users, this bug is going to result in a 3 inch rise in sea-levels over the next hundred years. Son, do you know what this means?”
“Well”, I say, somewhat uncomfortably, “I saw your film”. I leave out the part about feeling really sleepy about half-way through and waking up with drool on the couch. “I thought you were really good.”
“This is no joking matter”, he says all serious, “fix this bug, and save the planet and the people of Tuvalu in the process.”
Needless to say, I fixed the bug.
I’d love it if you could give it a try for me before I send it over. You can find the binary here (replace the one inside Plex.app/Contents/MacOS). It fixes two issues and adds a new feature.
- Display sleep bug fixed.
- Double sleep bug fixed.
- Ryan W kindly added support for MP4 subtitles (apparently Gore hates MKV and has all his media in MP4 format).
If it works well, I’ll spin another full release with the fixes.
Here’s Barkley, with a ball for each fix.

52 Comments so far
Leave a reply
looks like he got four balls…
three fixes? or am I the dumb as?
Hooray! Good job!
Barley counts the “Double sleep bug” as two.
I didn’t notice the forth ball
Nice one!! This issue has been around for so long… I’ll check it out when i get back home, but i have faith
nice story.
I know, give them a finger and they’ll take the hand (that’s a german saying – you have that in hawai?!?).
but could you also fix the shuffle-bug? It’s been there forever. And it’s such a basic operation. Is it really that hard to fix it?
Anyways, keep it up and cheers,
mike
Display sleep fixed -> tested on Macbook Pro and Mac pro.
Double sleep fixed -> so far it seems fixed as well.
Great news, thanks!
I’ve just tested MP4 subtitles. Used Subler to import a .srt subtitle file to a HD .M4V video.
Subtitles were detected and played back perfectly!
Now, the next step would be for Plex to scrape info from the iTunes-style tags in the M4V-files, including artwork. But I guess that’s a request that I’ll need to repeat once .9 is out…
Haven’t had a chance to test the sleep issues.
Thanks again.
I had/have the double sleep issue as wel. Now give me the next version of Plex
Great job Elan! Been wanting this one for a long time!!!!
I just installed the new Plex binary. I set Plex to use the “dim” screen save after 1 minute (via Preferences > System > Screen Saver). And I have the display set to sleep after 5 minutes (via Preferences > System > Energy Saver). Both settings appear to work as expected now. Previously, the screen saver would kick in, and then the display would never fully blank (causing me burn-in concerns with my plasma).
However, not everything is working fully on my setup. I have a Mac Mini hooked up via a DVI->HDMI cable to an A/V receiver, which is hooked up to my Pioneer plasma TV. I’m controlling the setup with my Harmony remote. If I use the remote to wake up Plex while the screen saver is on but the “sleep display” setting hasn’t kicked in yet, the screen un-dims and everything responds as expected. However, if Plex gets all the way to the display sleeping, when I try to bring it back to life, the screen goes from full black to dim, but I can’t get it to undim with the remote alone.
If I use screen sharing from my laptop to my Mac Mini, it fully wakes up after the first input from the laptop. But this isn’t working fully without that intervention.
Any ideas if I’m doing something wrong or if there is still a bug?
@cyrdog: Thanks for the testing and input, I’ll look into that later on today.
Now I’m seeing some other behavior. Let me keep testing, but I just saw an instance where the display went into screen saver and then into full sleep (the display, not the computer). But then it went back into dim (i guess screen saver). so it’s almost like the double sleep bug from before. I’ll see if I can pinpoint timing, when it happens, etc. Behavior seems inconsistent, though.
@cyrdog: Let me know what your timer settings are all set to as well
OS X Energy Saver Settings:
- Computer Sleep: Never
- Display Sleep: Never
- Put the hard drive(s) to sleep when possible: Checked
Plex Settings:
- Screen Saver: Dim after 1 minute
- Energy Saver – Sleep Display When Inactive For: 5 minutes
- Energy Saver – Sleep System When Inactive For: Off
I just tried everything again. Screen saver kicked in after 1 minute (dimmed). Display slept after 6 minutes (1 min + 5 min). Screen stayed blank as expected. When I went to wake it up, I got stuck in dim mode again.
Oddly enough this release fixes the “über slow AFP shares” bug that I have been experiencing with prior versions on my setup. So actually the ball count in the Barkley photo is spot on!
Looks like I can finally give XBMC a rest and switch back to Plex.
Wow, yes I would love to test this.
As soon as I remember at home I’ll swap out and test. This has been one of those really annoying bugs (to me) forever. Thanks for the fix!
Double sleep fixed on my Mac Mini!
Thank you!
Thanks Elan,
I’ll try this out later….awesome news!!
That double-sleep has been a real PITA
Confirmed dual sleep issue is resolved for me. Thanks a million!!
Mac Prefs:
Computer sleep: 20mins
Display Sleep: 10mins
Plex Energy Saver:
Screen Saver Mode: Dim
Start Screen Saver: 3mins
Sleep Display: 10mins
Sleep System: 5mins
Hmmm, for some reason my plex will neither sleep nor blank the screen now.
I have the slideshow screensaver. All energy savers are off in sys prefs and on at 20 mins in plex.
Could the slideshow be stopping sleep?
Seems ‘Wake for network access’ is stopping sleep, turned it off and sleep appears to be working now and mo double sleep. Now just got to figure out remote access!
Thanks Elan
Dear Elan:
Thanx a million bro. Display sleep works terrific.
Couldn’t find it, but did you add the top level Sleep Display option so that we can sleep the display from the main menu?
Kevin
Dude, the story was killer…lol
Me again!! Sorry!
Ok, sleep works great… Unless screensaver is slideshow when it never sleeps!?
Screensaver to 4 mins
Sleep to 5 mins
Screensaver appears and Mac never sleeps
Screensaver to 6 mins
Sleep 5 mins
Mac sleeps happily
Looks like it’s working here now too, thanks!
Hey guys,
sorry for OT but check out:
Video Decode Acceleration Framework Reference
This reference describes the Video Decode Acceleration framework available on Mac OS X 10.6.3 and later with Mac models equipped with the NVIDIA GeForce 9400M, GeForce 320M or GeForce GT 330M.
http://developer.apple.com/mac/library/technotes/tn2010/tn2267.html
Ok, well the sleep bug works now. My TV is finally being shut off like it should.
One big problem though. I have the screensaver set to dim at 3 mins and sleep after 5 mins.
When I come back from sleep, I can’t get it out of dim. Everything is dim. I’ve had this happen before, and usually exiting full screen and coming back in would fix it. And it only affected plex. If I switched apps, that app would be full bright.
Now it affects everything. All apps are dim. and the only way to remove the dim is to quit plex and restart it.
I suppose turning off the screensaver will fix it in the meantime. I’m going to switch to a slideshow and report back.
I’ll fix the dimming issue
Thanks for the fix Elan.
One small thing that I cant work out is now that I have updated the binary every time I start plex the firewall asks for permission. I guess gut changing the binary I have broke the “code signing” that the firewall checks. Is there a way to stop it asking for permission , apart from turning the firewall off ?
Thanks in advance
@Steve: Sorry, you are correct. Give me a day or two to fix the dimming problem and I’ll release a new full “package” so it’ll be signed again.
Did Al Gore really call?
Seems to be working on my late 2009 Mac Mini – Wuhu, no double sleep any more
Each time I launch the “new” Plex, it asks for incoming connections permission. This is new, and steals focus from the app
@Rybber, this is because the new binary broke the app signature. This week I’ll fix the last “dimming” issue and make a new full build.
Should have read the prev. post…
Anyway, when try to enter the App Store from the main menu, I’m taken to the Programs section. Selecting Programs gets me to programs section too, so now I can’t access the App Store. Don’t know if this is caused by the new binary though.
@Rybber: shouldn’t have anything to do with it. If nothing else, restart the Media Server (Preferences > System > Media Server).
this fixed my double sleep issue nice one buddy. G/F friendly factory has now increased 100%
@bertybassett: glad to hear, don’t forget to sent me a wedding invite as a result of the 2x friendly-factor increase.
@Elan: Has the dimming issue been fixed? If so, If I download the binary that you’ve released with the hardware acceleration feature, is this included? I’m never sure where exactly to download the latest build from.
@cyrdog: Not yet.
@elan On my iMac 27″ i7 I’m still seeing the screen saver, not going to sleep bug.
Double sleep fixed! Ive been waiting for this! Thanks +1K
Hi there,
If you got the chance to talk once more with Al Gore, tell him to contact Macromedia as well. Because with the trillions of flash ads or what so ever running while browsing, it consumes more cpu power than anything else.
I just downloaded Plex today. Loving it so far.
Unfortunately I’m having the same problem as Rybber. Both the Use your Applications and Go to the App Store menu items drop me in the applications folder.
I tried toggling the media server on and off to no avail. What else can I do?
@paul: Please head to the forums (if you haven’t already) and we’ll lend you a hand and see what’s going on!
Come on elan, a couple of days to fix it? geez.
Just kidding. I understand how these things go. Thanks for all you do in the first place.
@elan On both my new mini and 27″ iMac I’m having sleep issues.
Both machines usually goes to sleep after the time set in system preferences.
However if Plex have been launched and quit they will never sleep!
Only way to fix this, is to reboot.
Would be real nice with a fix….
Cram,
Try this Safari add-on, it works as advertised:
http://safariaddons.com/en-US/safari/addon/51
some how my app store is messedup,the add source does not have plex media player in it…and i have been trying to add the media server since without the server i am not able to see any of the videos or channels.Please let me know if anyone has a solution to my problem.
Great job! It you marketed this app, you would make a killing! I’ll donate…..don’t sell it!!
Didn’t solve the sleep issue for me and my mac mini. Now it wakes up on it’s own a couple minutes after it goes to sleep even if i put it to sleep manually using the harmony remote which it didn’t do before.
It DID fix it! Nice work. Much appreciated.