systemd, lircd, mceusb, xbmc and Arch Linux

systemd, lircd, mceusb, xbmc and Arch Linux

NOTICE!!! This guide may be outdated, please check if your distro has a suitable lircd.service already.

After migrating my Arch based media center to systemd, my IR mceusb remote stopped working with lircd.

I needed to do the following steps in order to make it function again.

  1. Copy /usr/lib/systemd/system/lirc.service to /etc/systemd/system/lirc.service (service files in /etc/systemd/system always takes precedence to files located in /usr/lib/systemd/system).
  2. Edit /etc/systemd/system/lirc.service accordingly:
    Description=Linux Infrared Remote Control
    ExecStartPre=/usr/bin/ln -sf /dev/lirc0 /dev/lirc
    ExecStartPre=/usr/bin/ln -sf /run/lirc/lircd /dev/lircd
    ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/

    diff /etc/systemd/system/lirc.service /usr/lib/systemd/system/lirc.service
    < EnvironmentFile=/etc/conf.d/lircd.conf
    < ExecStartPre=/usr/bin/ln -sf /dev/lirc0 /dev/lirc
    The creation of the symlink to /dev/lirc eliminates lircd errors like this:
    could not get file information for /dev/lirc
    default_init(): No such file or directory

    There may be more “correct” ways of fixing this, but creating the symlink satifies lircd.
  3. Now adjust variables in /etc/conf.d/lircd.conf:
    Get the mceusb conf here: and copy it to /etc/lirc/lircd.conf
  4. Disable lircd conflicting kernel modules by creating a blacklist file /etc/modprobe.d/blacklist_mce.conf containing:
    # Disabling kernel modules for mce
    install ir_rc6_decoder /bin/false
    install rc_rc6_mce /bin/false
    install ir_rc5_decoder /bin/false
    Reboot or remove these modules using modprobe -r.
  5. Reenable lirc.service:
    systemctl reenable lirc.service
    systemctl start lirc.service
    systemctl status lirc.service