Introduction

This page is designed to show how to set up a MythTv installation (nominally on Jaunty) to successfully suspend and resume using the remote control with the mceusb2 receiver.

Verify Pre-requisites

This is the configuration that is known to work. You should be able to apply this to other setups...

If you have done this, then you should be able to trigger suspend on your machine (maybe using a dedicated power button or menu option), get it to resume (maybe using the keyboard) and find that the remote stops working.

Fix Lirc Installation

Out of the box, the mceusb2 receiver has a problem with suspend-resume, and if a client is connected to lircd (e.g. mythfrontend) then it will be pseudo-random whether the device is /dev/lirc0 or /dev/lirc1. However, this can be relatively simply patched by improving the resume functionality of the driver.

At the bottom of lirc_mceusb2.c, you need to modify the exported functions to include .reset_resume:

Once you have done this, you should be able to suspend and resume, and still have the remote working.

If you want to check this, start a terminal, then execute the command 'irw'. Pressing a button on the remote should result in output. Suspend the machine. When you resume, irw should still be running, and should give you output whenever you press a button on the remote.

Add MythTv Suspend Menu Option

We need to be able to trigger the suspend from within the MythTv frontend.

Add the following button to the *end* of the list:

(I know it says Power Off, but it is just a little white lie). And finally create/edit the file /usr/share/mythtv/myth-suspend.sh:

Restart MythTv and make sure that you can now suspend and resume using the remote control (by navigating and selecting the new menu option).

Trigger Suspend using the remote

Finally, we need to trigger the suspend by using the power button on the remote.

First, modify your startup applications to include irexec. Go to 'System' 'Preferences' 'Startup Applications' and add a new application. Name is 'IrExec', and Command is 'irexec -d'. (Note that this must be done within user context and not via a system level (e.g. rcX) script).

Add the following stanza:

Create the file ~/mythtv_suspend_keys (this is the list of keypresses required to trigger the shutdown):

Create the file ~/mythtv_suspend.sh:

Finally go in to MythTv setup ('General/Setup' 'Setup' 'General' and on about the second or third page make sure that mythfrontend opens a socket for external control).

Restart mythfrontend and verify that it works correctly.


CategoryVideo

MythTV/Install/WhatNext/SuspendResumeWithRemote (last edited 2011-04-09 01:54:09 by D9784B24)