[mythtv-users] MythFrontend only suspend mode options...

faginbagin mythtv at hbuus.com
Sat Jan 10 20:52:00 UTC 2015


On 1/10/2015 4:13 AM, Raymond Boettcher wrote:
> I just wanted to get an opinion on this topic from a few users in the mailing list to see what I can do about this.
> 
> So lets start....   I have read article after article about putting the backend to sleep after the frontend goes into idle mode.  From what I understand this is handled by the MythWecome program which launches Mythfrontend.  This worries me because I don't want to put the backend to sleep.  The backend hosts the internet as a router on the network, runs Asterisk PBX for the phone switch and a few other functions that are outside the control of MythTV.  I just want to put the frontend to sleep after a specified time of no activity.
> 
> The best method I've seen so far is to monitor 'xset q' for the status of the monitor.  if xset +dpms during X Startup before mythfrontend is loaded, then MythFrontend will see this and disable DPMS during times of playback of music, videos or video games.  However, I have found a few exceptions to the rule that concerns me a little.  #1> If you decide to play music and then jump out of the music player but allow background playback, Mythfrontend will re-enable DPMS while music is still playing.  If my script checks that the monitor has been "turned off" and decides to suspend the system, that would be bad.  Not to mention I don't really want the screen to blank while playing background music simply because it does show the next song as it comes on.  Also, my Flat Screen TV is finicky about there being "No Signal" due to DPMS being on.  After a certain amount of time the TV will automatically turn off.  Not Standby, if I make the computer comes back on the TV is still off.  I 
> have to press the TV On button on my controller to get the TV to live again.  Nice feature but it should have been implemented like the monitors handle it, and there's no reason it shouldn't, the computer is connected to the Flat Panel TV via its VGA connector.
> 
> I considered checking the monitor to see if it has been blanked and checking the CPU usage to see if its at 0 or near 0.  Even the Mp3 Player will create some CPU load which will prevent standby.  However, my attempts to dive into /proc/stat has been interesting, and granted I could probably figure out what all the numbers mean, I don't really see this as the best approach in handling this.
> 
> However, I did notice that the logs suggest this:
> 
> 2015-01-10 03:09:26.034317 N  Suspending idle timer
> 2015-01-10 03:09:42.539346 N  Resuming idle timer
> 
> But I assume this idle timer is for the backend suspend and didn't see any options for getting access to that idle timer or using that idle timer to suspend a FE Only machine at least from Settings in MythFrontend or mythtv-setup.
> 
> Also, my second problem is for machines that are in suspend for a long time.  I'm concerned that the NFS handles to the mounts for the video library, game library, etc will become stale.  Then once the machine comes out of standby those mountpoints will become dead, especially if the backend server gets rebooted while the client machine is in standby.  However, I am more than capable of writing a script that would kill mythfrontend, X11, and dismount those shares before entering suspend (maybe even via a runlevel).  And then spend 5 seconds putting it all back together after suspend is over...  The second option was a complete power down, however, I do like the fact that I can make linux come out of standby using the keyboard, or in my case a Universal Remote programmed with the keys from a Infrared Keyboard with Sensor. (This method sure makes it easy to exit Emulators, Navigate BIOS, Select the OS to boot from LILO or GRUB, etc that don't support LIRC using my TV 
> Controller...).
> 
> Anyhow, I just want to make a small write up about this and ask how everyone else is handling this.  Currently all my DVR Clients run 24/7 which makes maintenance a little messy.  Fans get clogged, hard drives fail after 3-4 years, 24/7 power consumption, etc.  All because these machines run 24/7 and get used maybe 4-6 hours per day depending on who is home.  There is no need, the FE Only machines do nothing while idle except consume power, create unneeded heat in the house and wear out internal parts.
> 
> Anyhow, your idea's and suggestions would be great.  I'm sorry about the long write up, I just wanted to cover all the bases and could all be easily solved with a simply "execute command if idle for x minutes." and that action will have no consequences or actions on the backend server...  Keeping in mind that background music is still not idle...
> 
> -RayRay-

I just turn off the frontend when it's not in use, just as I turn off the TV. I have enabled both reboot and shutdown options in the setup screens so I can shutdown with my remote. When I want to use the frontend, I walk up to the computer and press the power button to turn it on.

HTH,
Helen


More information about the mythtv-users mailing list