Gentoo Wiki


(Primary author: rcbarnes. Having just registered, this section was authored as anon. Contact me for issues regarding this section. Remove notice when appropriate) Users: If you find errors or omissions in this section I'd like to know about them. Drop me a line if you are confused about any of this. clay dot barnes at gmail.

If you're not using udev (shame on you!), or changed your device name config, the path /dev/dmmidi (naturally) will not work for you. You should replace it with the path to the midi device that spits out garbage when you cat /dev/devname and press buttons on your remote (for me, although I do use UDEV and have not changed anything, it is /dev/snd/midiC0D1). Also note that with the EX model, you won't get any output until you initalize it with a command string. Since you have to know the path to send the string, you must either guess and check with all the midi devices, or send the initalization string to all the midi devices (rarely more than two or three).

First let's activate the IR port on the card. We need to pass the enable_ir=1 option to the alsa module. Add the following to the end of /etc/modprobe.d/alsa:

File: /etc/modprobe.d/alsa
options snd-emu10k1 enable_ir=1

Now you need to propagate your changes into {Filename|/etc/modprobe.conf}}, so (as root) run update-modules.

Reload your alsa modules (as root) with modprobe -rv snd_emu10k1 modprobe -v snd_emu10k1 to activate the changes

If you have the EX model, you have to enable the port by sending it the activation string (assuming default udev naming conventions): echo -e '\360\000\040\041\141\000\000\000\177\000\367' > /dev/dmmidi If that does not work try outputting the data to /dev/snd/midiC0D1 also the above line on some setups doesnt work and if it doesnt for you try echo -en "\xf0\x00\x20\x21\x61\x00\x00\x00\x7f\x00\xf7" > /dev/snd/midiC0D1

Rather than run that every time you start your computer, just add the following line after your last changes in /etc/modprobe.d/alsa:

File: /etc/modprobe.d/alsa
options snd-emu10k1 enable_ir=1
post-install snd-emu10k1 echo -e '\360\000\040\041\141\000\000\000\177\000\367' > /dev/dmmidi

Afterwards run update-modules.

because of the latest udev which will load modules while its loading rather then when alsa loads it, it will create a file instead of putting the data to the device, so you may want to put that line in /etc/conf.d/local.start.

Let's make sure you are actually getting your signals. cat /dev/dmmidi, and see if you get garbage when you press the buttons on your remote.

Lirc in portage is over a year old unless you unmask ~x86 for it:

File: /etc/portage/package.keywords
app-misc/lirc ~x86

Now add the following to your /etc/make.conf:

File: /etc/make.conf

As root run emerge lirc

Once that is done, drop these mappings into /etc/lircd.conf if you're using the RM-1000W remote (the latest version is available here):

File: /etc/lirc.conf
# contributed by Andrew de Quincey
# brand:                       rm1000w
# model no. of remote control:
# devices being controlled by this remote:

begin remote

  name  rm1000w
  bits           16
  eps            30
  aeps          100

  header          9000 4500
  one             563  1687
  zero            563  562
  pre_data_bits   16
  pre_data       0x8322
  gap          108000
  toggle_bit      0

  repeat          9000 2250
  frequency    38000
  duty_cycle   33

      begin codes
          1                        0x0000000000008B74
          2                        0x0000000000008F70
          3                        0x000000000000906F
          4                        0x0000000000008A75
          5                        0x000000000000847B
          6                        0x0000000000007887
          7                        0x0000000000008976
          8                        0x000000000000837C
          9                        0x0000000000007788
          0                        0x000000000000807F
          stop                     0x000000000000857A
          play                     0x0000000000007986
          pause                    0x0000000000007986
          slow                     0x0000000000007D82
          step                     0x0000000000007E81
          prev                     0x0000000000007F80
          next                     0x0000000000007A85
          mute                     0x0000000000006E91
          vol-                     0x000000000000639C
          vol+                     0x000000000000629D
          eax                      0x0000000000008C73
          options                  0x000000000000827D
          display                  0x0000000000007689
          return                   0x0000000000008E71
          start                    0x0000000000008877
          close                    0x0000000000007C83
          up                       0x0000000000007B84
          down                     0x0000000000008D72
          left                     0x0000000000008778
          right                    0x000000000000758A
          ok                       0x000000000000817E
          power                    0x000000000000619e
          cmss                     0x000000000000718e
          record                   0x000000000000738c
      end codes

end remote

Now it's time to see if you've got everything right up to here. Run this command lircd -H livedrive_midi -d /dev/dmmidi -n as root. Press some buttons, and see if they show up on the console.

Now, all you have to do is edit /etc/conf.d/lircd to contain your device. The example here has the udev name

File: /etc/conf.d/lircd
# Options to pass to the lircd process
LIRCD_OPTS="-d /dev/dmmidi"

Now let's test the device by creating a dummy client:

File: ~/.lircrc
button = right
prog = foo
config = something

Now restart /etc/init.d/lircd with sudo /etc/init.d/lircd restart.

And the moment of truth: ircat foo and press the right button (the [>>] button in the circle at the bottom of the remote). You should get 'something' echoed on the screen. Congratulations, you have lirc working!

Tne next step is to get some real clients and actions going. Let's turn on the daemons for every boot. As root, rc-update add lircd default, and also rc-update add lircmd default if you want to use the remote as a mouse. You also want irexec and irxevent to run, too. Just stick them (doen't forget the -d flag for irexec, and a trailing & for irxevent) in some script that starts automatically, like .xinitrc.

Retrieved from ""

Last modified: Tue, 19 Aug 2008 22:31:00 +0000 Hits: 571