Idle Screen

From MythTV Official Wiki
Jump to: navigation, search

Important.png Note: This page refers to the Idle Mode and Idle Screen available in 0.28 and later


Idle Screen
The idle mode and idle screen is a replacement for MythWelcome available in earlier versions of MythTV. The main advantage over MythWelcome is it is built into the frontend so no need to exit the frontend to allow the master backend to shutdown. Its main purpose is to allow the system to shutdown after a period of inactivity to save power. Normally the master backend will never shutdown while a frontend is attached but if enabled the new idle feature of the frontend will enter an idle mode after a period of inactivity to allow the BE to shutdown if it is also idle.

You enable the idle mode and idle screen by setting the 'Idle time before entering standby mode (minutes)' setting to a value greater than 0 (it's on the 'Shutdown/Reboot' page of the 'General' frontend settings). So if you set it to 30 the frontend will go into idle mode if there is no activity from the keyboard, remote or mouse for 30 minutes. The idle mode will be suspended while playing a recording, video file, music track etc so the frontend will never enter idle mode while playing something. A value of 0 for the setting will disable the idle mode altogether. When the FE goes idle an idle screen will be displayed allowing the user to know the FE is now idle and depending on the theme being used it can show a list of current recordings, a list of upcoming recordings, a list of conflicting recordings and other status information.

You would normally setup the idle mode in conjunction with the backend idle mode which allows the master backend to shutdown the system when idle and wakeup again to record something.

The behaviour and setup is slightly different for the three main setups

  • combined frontend with a master backend on the same system
  • standalone frontend
  • combined frontend with a slave backend.

Refer to the instructions below for your particular setup.

Combined Frontend and Master Backend

This section details how to setup the idle mode on a combined frontend and master backend.

  • Set the 'Idle time before entering standby mode (minutes)' setting to the number of minutes you want the frontend to wait before going idle.
  • (optional) Change the 'Customize exit menu options' setting to not allow shutdown/reboot. Normally you want the backend to decide when to shutdown so you want to remove any options to shutdown or reboot from the System menu.
  • Setup the backend to shutdown when idle. All settings in mythtv-setup under '1. General' on the 'Shutdown/Wakeup Options' pages. Values in brackets are recommended settings.
    • Block shutdown before client connected - you normally don't want the backend to shutdown before a frontend has connected (checked)
    • Idle shutdown timeout (secs)' - the number of seconds you want the backend to wait before shutting down when it is idle (120).
    • Maximum wait for recordings (mins) - The backend wont shutdown if it is this number of minutes from a recording starting. No point shutting down to only wake up again a few minutes later. (15).
    • Start before recording (secs) - This is the number of seconds before a recording the backend will wakeup to allow time for the backend to come up before starting recording. (120)
    • Wakeup time format - this the format of the time string passed to the 'Command to set wakeup'. Normally this should be time_t if using the script. (time_t).
    • Command to set wakeup time - This is a script that will tell the bios when to next wakeup. (sudo /usr/bin/ $time)
    • Server halt command - This is the command the backend will use to shutdown the system (sudo /sbin/shutdown -P now)
    • Pre-shutdown-check command - This is the command the backend will run to check it is safe to shutdown. This can be used to prevent the backend shutting down if it is busy commflagging, transcoding, grabbing EPG data, running user jobs or has been locked by running mythshutdown --lock for example (mythshutdown --check)
  • (optional) If you want the Idle Screen to work more like the old MythWelcome you should change the keybindings in the 'Main Menu' context
    • Change the Exit action to something like Alt+Esc. This will allow you to exit the frontend if you need to (also possible by pressing the 'Menu' key and selecting 'Exit Application').
    • Remove the EXITPROMPT action. This will prevent your users from exiting the frontend unless they use the Exit action.
    • Change the STANDBYMODE action to Esc. This will allow you to press Esc at the top of the main menu to go straight into the Idle Screen.

Frontend Only


Combined Frontend and Slave Backend



The frontend never goes into idle mode

You must have set 'Idle time before entering standby mode (minutes)' setting to a value greater than 0 before the frontend will go into idle mode.

The frontend goes into idle mode but I don't see the idle screen

There is a 'feature' of the idle screen where if the frontend idle time is > 0 but the backend idle time is 0 the fronend will go into idle mode but you will never see the idle screen. You just need to make sure the backends idle time setting 'Idle shutdown timeout (secs)' is also set to a value > 0.

The idle screen says the backend is idle and the count down to shutdown is shown but when it reaches 0 the countdown starts again.

This is usually caused by the 'Command to set wakeup time' or the 'Server halt command' failing for some reason. Check the command is correct. You may need to add the full path to the command. Check the user who runs the backend has permission to run them - they usually require root privileges so may require sudo to be setup correctly before they will run properly. You should check to make sure the user running mythbackend is able to run sudo without prompting for a password. Consult the documentation for sudo on how to set this up in the sudoers file, in particular the NOPASSWD tag. For example, you could add the following line to your /etc/sudoers by running "sudo visudo" and pasting the line at the end of the file.

%mythtv ALL = NOPASSWD: /sbin/shutdown, /usr/bin/