[mythtv-users] suspend

Thomas Boehm mythtv-users at lists.boehmi.net
Wed Jul 23 19:49:38 UTC 2014


On 20/07/14 03:45, Kevin Johnson wrote:
> Is there a way to easily enable suspend with mythtv?
> 
> I hate to make the comparison, but I have 3 different computers running
> mythtv and xbmc.  With xbmc, I have the option to suspend with the
> remote.  This option works on all 3 computers.  I do not see this option
> with myth.  Is this easily enabled?

I do it on my frontends like this. I removed gnome-screensaver and
installed xscreensaver. When the user logs in, he starts xscreensaver
and this little perl script

----------------------
#!/usr/bin/perl

my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (<IN>) {
        if (m/^(BLANK|LOCK)/) {
                if (!$blanked) {
                        system "sudo pm-suspend";
                        $blanked = 1;
                }
        } elsif (m/^UNBLANK/) {
                system "sound-on";
                $blanked = 0;
        }
}
---------------------

Then set the screensaver idle time and the system suspends after that
time when there is no activity. No fiddling with buttons on your remote
control needed and you can't forget to suspend. When you're watching
something on the frontend, it pokes the screensaver every minute.

With xbmc it gets a bit more complicated though as it doesn't poke the
screensaver as far as I know. So you could terminate xscreensaver when
you start xbmc and start it again when you quit.

HTH
Thomas


More information about the mythtv-users mailing list