[mythtv-users] Mythbuntu 12.04 and sleep

Michael Watson michael at thewatsonfamily.id.au
Fri Sep 14 01:40:22 UTC 2012


On 13/09/2012 2:56 PM, Joseph Fry wrote:
> > On Thu, Sep 13, 2012 at 1:52 PM, Joseph Fry <joe at thefrys.com 
> <mailto:joe at thefrys.com>> wrote:
>
>     >>
>     >> How are your 10.04 and 11.10 machines configured to sleep.  I
>     know that
>     >> mythtv will pause the idle timer on Xscreensaver, but
>     xscreensaver can't
>     >> make my machine actually go to sleep, just the display.
>     >
>     >
>     > Oops.  I assumed you meant blanking the display!  Sorry for the
>     confusion.
>
>     You have checked out the wiki article right?
>     http://www.mythtv.org/wiki/Putting_mythfrontend_to_sleep
>
>
> Many times.  However it doesn't cover sleeping automatically when the 
> system is idle.  My family is notorious for pausing a show and walking 
> away for hours.  I want the system to wait 5 minutes, display my 
> screensaver for 15 minutes, then go to sleep.  I can get the 
> screensaver working no problem.  I can manually suspend, both from a 
> menu option and from a button on my remote. And I can wake from 
> remote.  But I cannot get the system to suspend when left idle.
>
> I can get the system to suspend automatically, but it does it even 
> when I am watching something because mythtv does not deactivate the 
> xfce4-power-manager when watching something.
>
> The only thing I can think of is creating some sort of cron script 
> that checks the xscreensaver status every few minutes and when it has 
> been active for a certain amount of time it kicks off a dbus command 
> to suspend the system.
>
> I found a pretty good script here I may be able to adapt: 
> http://www.mentby.com/Group/mythtv-users/how-to-make-idle-frontend-exit.html but 
> it seems like suspending on idle should be far simpler to implement 
> than this.  Surely I'm not the only person doing this.
>

I had the same problem, that is why I wrote the python script you 
mention in the link.  My system is a bit more complicated, as my 
frontend's are also slave backends to assist in commercial flagging, 
metadata lookups whilst they are on.  The python script can be 
simplified if you are only running a frontend, but it will need to be 
run via cron periodically to check the xscreensaver status.  Let me 
know, and I am happy to strip it down for you for frontend use, but will 
run via crontab for frontend only as it is.

I did at one point create a "screensaver" stub that performed executed a 
real screen saver, waited for a defined period and shutdown the 
frontend, but I found this a bit of a kludge, and more difficult to setup.

MythWelcome can shutdown frontend, but you have to exit the frontend for 
it to work, as of 0.25 (I think), there is suppose to be frontend idle 
detection, but in my experience it did not work effectivly, shutting 
down the frontend immediatly after watching a recorded program or video, 
during music playback, and sometimes just allowing the system to stay 
running when it has not been used in hours, it also does not shutdown 
the frontend cleanly (when it does shutdown the machine), so any Music 
Playlists you have created/edited in that session are lost.



More information about the mythtv-users mailing list