SAA7134 Remote Control on Ubuntu

by levien on wo 05 december 2007 // Posted in misc // under

On current Ubuntu versions (Edgy Eft and higher), the remote control on SAA7134 based TV-cards is automatically recognised by the kernel, and added as an event-device to /dev/input. This means that LIRC itself is not needed anymore, which is great because it's not very easy to configure. The inputlirc daemon can be used instead to autodetect the device, handle the events and present them to any LIRC-compatible programs. My TV-card is a cheap Medion MD2819 I bought a few years ago at Aldi (although the card is actually manufactured by Avermedia). However, these instructions should work for all remote control devices (SAA713x-based or otherwise) that are recognised by the kernel as an input device. Check your dmesg output to be sure. Also, you may need a different lircrc file for devices that are not SAA7134-based.

  1. Install the inputlirc deamon, and the LIRC utilities:

    sudo apt-get install inputlirc lirc
    
  2. Add the line

    /etc/init.d/inputlirc start
    

    to your /etc/rc.local file (e.g. using gksudo gedit), before the line that says "exit 0"

  3. Add the command

    irexec -d
    

    to your startup session (using the GNOME desktop menu: System->Preferences->Sessions).

  4. Create a LIRC configuration file at /etc/lircrc or \~/.lircrc, for example this one.

  5. You can use the command

    irw
    

    to see if the remote control works.

On my Ubuntu 7.04 system I left out steps 2 and 3, and it still seems to work.

References:

  • http://magarto.com/blog/archivo/2007/06/27/howto-usar-apple-remote-de-los-macbooks-en-ubuntu-entre-otros-para-multiples-aplicaciones-sin-necesidad-de-lirc/
  • http://ubuntuforums.org/archive/index.php/t-484538.html
  • http://www.linuxtv.org/v4lwiki/index.php/Generic_SAA7134_Card_Installation#Remote_setup