ir-keytable broken

  • After upgrade to nightly-20231216-63347fc (RPi4.aarch64) my IR remote stopped working.

    I am using gpio_ir_recv and found the custom mapping does not work anymore.

    Found /sys/class/rc/rc0/ with:
    Name: gpio_ir_recv
    Driver: gpio_ir_recv
    Default keymap: rc-rc6-mce
    Input device: /dev/input/event1
    LIRC device: /dev/lirc1
    Attached BPF protocols:
    Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
    Enabled kernel protocols: lirc rc-6
    bus: 25, vendor/product: 0001:0001, version: 0x0100
    Repeat delay: 500 ms, repeat period: 125 ms


    # ir-keytable -a /storage/.config/rc_maps.cfg -s rc0
    Segmentation fault (core dumped)

  • As the issue persisted in nightly-20231219-865d980 (RPi4.aarch64) as well, I had to analyze it & find the reason.

    It looks in kernel 6.6.7 the old mapping file format is not supported anymore. I think it should not fail with Segmentation fault but...

    It was necessary to reenable kernel IR protocols (for instance ir-keytable -p lirc -p rc-5 -p jvc -p sony -p nec -p sanyo -p mce_kbd -p rc-6 -p sharp) and convert the mapping file to .toml format. Then it works again.

  • This was a bug in the latest v4l-utils/ir-keytable version, I found and fixed it

    v4l-utils: add patch to fix crash in ir-keytable by HiassofT · Pull Request #8438 · LibreELEC/LibreELEC.tv
    Recent keytable changes missed to properly initialize a buffer pointer so it used random memory when reading keymaps in legacy format and crashed: LibreELEC:~…
    github.com

    The next LE12 nightly should work fine again with keymaps in the old (non-toml) format

    so long,

    Hias