An Inconvenient Bug (or two) - Plex Blog

An Inconvenient Bug (or two)

| 19 Apr 2010 | by 52 Comments

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 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.

IMG_8936 (1).jpg
Share this

52 Comments so far

  1. Anders April 19th, 2010 11:48 pm

    looks like he got four balls…

    three fixes? or am I the dumb as?

  2. MrAcid April 19th, 2010 11:49 pm

    Hooray! Good job!

  3. Add April 20th, 2010 12:23 am

    Barley counts the “Double sleep bug” as two.

  4. elan April 20th, 2010 12:27 am

    I didn’t notice the forth ball :)

  5. JellyUK April 20th, 2010 1:14 am

    Nice one!! This issue has been around for so long… I’ll check it out when i get back home, but i have faith :P

  6. mike April 20th, 2010 3:25 am

    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,

  7. wally007 April 20th, 2010 3:27 am

    Display sleep fixed -> tested on Macbook Pro and Mac pro.
    Double sleep fixed -> so far it seems fixed as well.

  8. Hafnium April 20th, 2010 3:28 am

    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.

  9. xain09 April 20th, 2010 5:15 am

    I had/have the double sleep issue as wel. Now give me the next version of Plex ;)

  10. maxrogers April 20th, 2010 6:13 am

    Great job Elan! Been wanting this one for a long time!!!!

  11. cyrdog April 20th, 2010 9:07 am

    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?

  12. elan April 20th, 2010 9:10 am

    @cyrdog: Thanks for the testing and input, I’ll look into that later on today.

  13. cyrdog April 20th, 2010 9:17 am

    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.

  14. elan April 20th, 2010 9:22 am

    @cyrdog: Let me know what your timer settings are all set to as well :)

  15. cyrdog April 20th, 2010 9:50 am

    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.

  16. Flo April 20th, 2010 9:50 am

    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.

  17. Jason April 20th, 2010 9:53 am

    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!

  18. paf April 20th, 2010 9:55 am

    Double sleep fixed on my Mac Mini!
    Thank you!

  19. Petejo April 20th, 2010 12:27 pm

    Thanks Elan,
    I’ll try this out later….awesome news!!
    That double-sleep has been a real PITA

  20. imike April 20th, 2010 3:30 pm

    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

  21. Petejo April 20th, 2010 8:39 pm

    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?

  22. Petejo April 20th, 2010 9:03 pm

    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

  23. Kevin Perry April 20th, 2010 10:20 pm

    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?


  24. Kevin Perry April 20th, 2010 10:20 pm

    Dude, the story was killer…lol

  25. Petejo April 20th, 2010 10:21 pm

    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

  26. DCstewieG April 21st, 2010 5:47 pm

    Looks like it’s working here now too, thanks!

  27. GPU Acceleration April 22nd, 2010 7:32 am

    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.

  28. Jason April 22nd, 2010 3:05 pm

    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.

  29. elan April 22nd, 2010 3:07 pm

    I’ll fix the dimming issue :-)

  30. Steve April 22nd, 2010 8:41 pm

    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

  31. elan April 22nd, 2010 10:10 pm

    @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.

  32. powertowerpro April 25th, 2010 5:25 pm

    Did Al Gore really call?

  33. Rybber April 26th, 2010 9:41 am

    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 :(

  34. elan April 26th, 2010 9:43 am

    @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.

  35. Rybber April 27th, 2010 12:06 am

    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.

  36. elan April 27th, 2010 12:08 am

    @Rybber: shouldn’t have anything to do with it. If nothing else, restart the Media Server (Preferences > System > Media Server).

  37. bertybassett April 27th, 2010 11:34 am

    this fixed my double sleep issue nice one buddy. G/F friendly factory has now increased 100%

  38. elan April 27th, 2010 11:36 am

    @bertybassett: glad to hear, don’t forget to sent me a wedding invite as a result of the 2x friendly-factor increase.

  39. cyrdog May 5th, 2010 3:20 am

    @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.

  40. elan May 5th, 2010 10:13 am

    @cyrdog: Not yet.

  41. theTraveler May 10th, 2010 8:18 pm

    @elan On my iMac 27″ i7 I’m still seeing the screen saver, not going to sleep bug.

  42. program86 May 12th, 2010 11:36 am

    Double sleep fixed! Ive been waiting for this! Thanks +1K

  43. Cram May 17th, 2010 7:45 pm

    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.

  44. paul June 14th, 2010 2:44 am

    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?

  45. elan June 14th, 2010 10:51 am

    @paul: Please head to the forums (if you haven’t already) and we’ll lend you a hand and see what’s going on!

  46. Jason June 22nd, 2010 6:55 pm

    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.

  47. flemming July 9th, 2010 10:55 pm

    @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….

  48. K July 25th, 2010 5:00 pm

    Try this Safari add-on, it works as advertised:

  49. silviyo July 26th, 2010 7:34 am

    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.

  50. Harry September 2nd, 2010 1:28 am

    Great job! It you marketed this app, you would make a killing! I’ll donate…..don’t sell it!! :) :) :)

  51. Daniel November 30th, 2010 9:35 pm

    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.

  52. Daniel December 1st, 2010 3:38 pm

    It DID fix it! Nice work. Much appreciated.

Leave a reply