Fedora

Fedora 10

The ati_remote module is installed and runs as default, but do not blacklist it. If you did blacklist it or rename it by mistake, then undo it and run the command depmod -a to reactivate the ati_remote module and then reboot.

You have to map some keys (e.g a button for the escape function) in order to use the ati_remote module. Do that via the key settings in mythfrontend.

Fedora Core 5 and 6

1. Make sure "ati_remote" is blacklisted.

2. Plug in the USB reciever

3. Type in:

# lsmod

Or maybe better:

# lsmod | grep ati

4. You should see a module called "lirc_atiusb" this actually the module for the ATI USB Wonder remote

openSUSE 10.2

1. Make sure "ati_remote" is blacklisted.

Disable it by adding "blacklist ati_remote" to /etc/modprobe.d/blacklist

2. If you have already plugged in the usb receiver, physically remove it and use "rmmod ati_remote" to remove the module.
3. check that "lirc-kmp-default" is installed: rpm -qa | grep -i lirc
This contains the required "lirc_atiusb" module. If it is not installed, install it with

"lirc_atiusb" is the module for the ATI USB Wonder remote
6. Add these lines to your /etc/modprobe.conf:

alias char-major-61 lirc_atiusb
alias lirc_dev lirc_atiusb

7. Copy the contents of the example lircd.conf config file below to /etc/lircd.conf or go ahead and create your own lircd.conf file using irrecord. irrecord takes a while to run through, but it sure is nice to have the remote work in the end.

cd /etc
irrecord ./lircd.conf

8. Save the example lircrc file below to /home/mythtv/.mythtv/lircrc -change the owner mythtv (assuming you're running mythTV as 'mythtv') and the group to 'users'

chown mythtv:users /home/mythtv/.mythtv/lircrc

9. Start the lircd daemon

lircd

10. Verify it is running. This should return a line with "lircd" in it besides the 'grep' line

ps -ef | grep lircd

11. Run "irw" and press any button on your remote. If the mappings are correct, you should see output for each button you press. If nothing is showing up, make sure you named the file "/etc/lircd.conf" and not "/etc/lirc.conf". I have done this a few times. If that is correct, you may need to use "irrecord config_file.conf" to record your own ir mappings.

When using irrecord and naming the buttons, be sure to use the same naming schemes as those in the "begin codes" section of the lircrc file (see example below). This will allow you to copy/paste the example lircrc given below it in the next step. The example lirc.conf given has the buttons listed in the same order as the are placed on the remote. It is very important that the "button" names in the lircrc match those specified in the lirc.conf.

Mythbuntu 8.10

Please note that this will only provide basic functionality and that additional configuration will probably be desired.

1. Blacklist ati_remote by adding the line "blacklist ati_remote in /etc/modprobe.d/blacklist.
The installed remote driver treats it as a wireless keyboard and mouse. You do not want this.
2. Unplug the IR receiver.
3. Plug in the USB receiver back in
4. Type in "lsmod | grep -i ati". The output should look something like this:

5. Copy the contents of the example lircd.conf config file below to /etc/lirc/lircd.conf
6. Copy the contents of the example hardware.conf config file below to /etc/lirc/hardware.conf
7. Save the example lircrc file below to /home/[user]/.lirc/mythtv
8. Restart lirc from a terminal window with the following command:

/etc/init.d/lirc restart

9. Verify it is running. This should return a line with "lircd" in it besides the 'grep' line

ps -ef | grep lircd

10. Run "irw" from a terminal and press any button on your remote. If the mappings are correct, you should see output for each button you press. If nothing is showing up, make sure you named the file "/etc/lircd.conf" and not "/etc/lirc.conf". I have done this a few times. If that is correct, you may need to use "irrecord config_file.conf" to record your own ir mappings.

If irw does not run, reinstall the lirc package. This happened to me on an out of the box mythbuntu install. Then return to step 5.

11. Restart the machine.

Author's Note: In order to edit the required configuration files, you will need the appropriate permissions and a text editor. For me, this was accomplished by running Thunar file manager with root permissions. Do this by typing sudo thunar in a terminal window. Also note that certain files/directories shown above are hidden by default and the "View Hidden Files" option must be enabled. It is also recommended to backup your original lircd.conf and lircrc files before modifying them.

Mythbuntu 10.10 without lirc

In order to control the mouse with the mouse-buttons on the remote (outside of MythTV of course, because there is no mouse in MythTV), one should use the ati_remote driver. This has additional benefits, namely that there is no delay in using the same button again, so you can scroll very fast. This driver sees the remote as a keyboard. This driver loaded automatically on my box, but I removed lirc first. I don't know if that is neccesary. If you can use your mouse-move buttons, you know the module ati_remote is loaded. The only problem this driver has, is that some buttons do not work: channel up and down, TV, DVD, and the OK button. This is because these keys have a keycode higher than 255 and thus X cannot read them (see http://bugs.freedesktop.org/show_bug.cgi?id=11227).

Results of remapping

This remapping maps ChannelUp to PageUp, ChannelDown to PageDown, OK button to Enter, and TV and DVD to the so called keys PROG1 and PROG2 and results in the following:

Button

Keycode

power

124

tv

156

dvd

157

web

158

media_library

164

drag

184

vol-up

123

vol-down

122

mute

121

chan-up

112

chan-down

117

dvd-root_menu

147

launch_setup

104

timer

160

max_window

140

rewind

176

play

208

fastforward

167

record

175

stop

136

pause

127

Another remap using Xmodmap

If you are done with the remapping, there is one more thing to do. The buttons do not yet give the right keys that MythTV understands. There are two solutions: 1. Xmodmap and 2. configuring your keys in MythTV. I chose the Xmodmap way so I wouldn't have to think about key mapping in MythTV.

The Xmodmap file remaps the keys of your remote to other keys, so for instance the buttun KEY_MUTE gets mapped to the key F9 and it does that by looking at a file in this location: ~/.Xmodmap

To understand this file, compare the keycodes from the table with this file.

Done! Your computer will even power down when you press the right button.

MythDora 12.23

MythDora configures the ati_remote kernel module by default (just like Fedora). However, this module is not quite as ideal to use as lirc (IMO) for this particular purpose.

1. Make sure lirc is installed by RPM (we'll want to use its init script for convenience) -- note -- any RPM upgrade of lirc may clobber this install -- I recommend you don't or you may have to do this all over again.

# yum -y install lirc

2. Blacklist and rmmod ati_remote, lirc_dev, lirc_atiusb by editing the file /etc/modprobe.d/blacklist.conf and adding the following lines to the bottom of it:

/etc/modprobe.d/blacklist.conf

blacklist ati_remote
blacklist lirc_dev
blacklist lirc_atiusb

3. Unload the kernel modules (Only the ati_remote should be loaded, but the others won't hurt):

# Note: in addition to these parameters, you need to have working -*- sh -*-
# configuration file for lircd (and lircmd if enabled).
# Options to lircd(8). Typically, this will be empty, as which driver to use
# should be specified using the LIRC_DRIVER variable below.
LIRCD_OPTIONS=""
# The infrared receiver (and/or transmitter) driver to be used by lircd(8),
# similar to passing "-H driver" to lircd(8).
# Run "/usr/sbin/lircd -H help" to get a listing of supported drivers.
LIRC_DRIVER="atilibusb"
# Which lirc device will be used by lircd(8).
# This is the same as passing "-d device" to lircd.
# An empty value will use the default /dev/lirc0 device.
LIRC_DEVICE=""
# If "yes", the init script will try to start lircmd(8) too.
ENABLE_LIRCMD="no"
# Options to lircmd(8).
LIRCMD_OPTIONS=""

Example of a hardware.conf

hardware.conf

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="ATI/NVidia X10 RF (kernel)"
# Arguments which will be used when launching lircd
LIRCD_ARGS=""
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false
#Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER=""
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE=""
MODULES=""
# Default configuration files for your hardware if any
#LIRCD_CONF="atiusb/lircd.conf.atilibusb"
#LIRCMD_CONF=""
LIRCD_CONF="lircd.conf"