lirc changes in 9.2

  • Hi. I updated to Kodi 9.2, from 7.x. Yes, indeed, it's been a few years since I updated Kodi and LIbreelec. It seems Lirc has changed, and my remote is not working any more. I found one item, /flash/config.txt has to load a different driver, gpio-rpi. I made that change, rebooted, but no luck.

    My setup is a RPI2, IR receiver plugged into the GPIO pin 18. I've set up the Lircd.conf, keymaps, etc to map IR button presses from a TIVO remote to commands I send to a Kodi Plugin Service. That code can talk to the other devices, BlueRay, Tivo, AppleTV4k, Pioneer AVR, TV etc. It turns the AVR on/off when it sees the TV itself turned on or off.

    But with the update, none of the button presses make it through.

    Trying to troubleshoot, with info and suggestions from the WIKI on Infrared Remotes, and on a few threads here:

    Running "ps axl | grep lirc" shows 3 processes running-- eventlircd, lircd, and lircd-uinput

    Code
    LibreELEC:~ # ps axl | grep lirc
      260 root      0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
      446 root      0:01 /usr/sbin/lircd --nodaemon /storage/.config/lircd.conf
      447 root      0:00 /usr/sbin/lircd-uinput --add-release-events
      664 root      0:00 grep lirc
    LibreELEC:~ # 

    Checking on those command line args, I see that the file /etc/eventlircd.d does not exist. Hmmmm a clue! The socket /run/lirc/lircd seems to exist.

    Running "ir-keytable" shows errors: /sys/class/rc/: No such file or directory, and No devices found

    Running "mode2" shows errors: Using driver default on device /dev/lirc0 Cannot initiate device /dev/lirc0.

    Running "irw" just hangs.

    Interesting--- looking in /dev, indeed there is nothing named lirc0 or lirc*.

    Running "dmesg | grep lirc", I see 2 lines:

    Code
    [    9.521584] input: lircd-uinput as /devices/virtual/input/input4
    [    9.757850] input: eventlircd as /devices/virtual/input/input5

    Running "tail /flash/config.txt" shows I'm loading the Overlay: dtoverlay=gpio-rpi I made that change today, from lirc to gpio, rediscovering how to make /flash read+write.

    Checking the file /storage/.config/lircd.conf, it is the same file as before the upgrade.

    Checking /storage/.kodi/userdata/Lircmap.xml, it is also the same as before the upgrade.

    Checking the files in /storage/.kodi/userdata/keymaps, and remotes.xml is still there too.

    Running "tail -f /Storage/.kodi/temp/kodi.log" with Debug turned on normally shows every IR button press, and what it's mapped to. This gives nothing.

    I'm attaching the kodi.log and the output of dmesg. In that you can see my two service scripts, "script.service.power-sync" (Works fine, uses CEC), and script.service.translate_keys.

    I'm guessing LibreElec has moved from "lirc" to "ir_keytables", and I'm missing the thing that says "use the old LIRC".

    Hoping someone has the one last configuration file change and it all comes back to life!

    Thanks in advance.

  • Yes, LibreELEC switched to ir-keytable but lirc is still there for now if you really want/need to use it. See the wiki for more details Infra-Red Remotes - LibreELEC.wiki

    Your dmesg doesn't show any sign of the gpio-ir driver being loaded, so check config.txt if you have any typos in there.

    dtoverlay=gpio-ir, is all you need then you should get the following lines in dmesg (note that I use GPIO 5, so your lines may look a bit different)

    Code
    xbmc:~ # dmesg | grep gpio_ir
    [    4.257079] rc rc0: gpio_ir_recv as /devices/platform/ir-receiver@5/rc/rc0
    [    4.257233] rc rc0: lirc_dev: driver gpio_ir_recv registered at minor = 0, raw IR receiver, no transmitter
    [    4.257353] input: gpio_ir_recv as /devices/platform/ir-receiver@5/rc/rc0/input1

    so long,

    Hias

  • Thanks Hias. I found the error. One of the threads here had a mention of changing lirc-rpi to gpio-rpi, but else where it says gpio-ir. I made that change in config.txt and the remote works again! Thanks!

    -- Cayford