IR receiver doesnt work on ubuntu, works in kodi

  • hello everyone! so I have a problem trying to hook up my ubuntu (either 18.04 or 21.04) to work with ir receivers. however with kodi it works out of the box.

    so my question would be, what could be the difference between kodi and ubuntu settings that it works out of the box with one and not at all with the other? i've been reading all kinds of tutorials and wiki pages trying to make it work but no success. my ir receiver is a homebrew serial port one, here's what I was doing on my ubuntu machine:

    - installed lirc

    - used the command "setserial /dev/ttyS0 uart none"

    - after this "modprobe serial_ir"

    - set up /etc/lirc/lirc_options.conf

    (driver=default, device=auto, also added setserial and modprobe under [modinit])

    - restart lirc/reboot

    - trying to read output of mode2 and ir-keytable too

    output of ir-keytable

    Found /sys/class/rc/rc0/ with:

    Name: Serial IR type home-brew

    Driver: serial_ir

    Default keymap: rc-rc6-mce

    Input device: /dev/input/event11

    LIRC device: /dev/lirc0

    Attached BPF protocols: Operation not supported

    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

    output of dmesg | grep serial

    [ 134.379298] serial_ir serial_ir.0: auto-detected active high receiver

    [ 134.499346] rc rc0: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0

    [ 134.499511] rc rc0: lirc_dev: driver serial_ir registered at minor = 0, raw IR receiver, raw IR transmitter

    [ 134.499613] input: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0/input14


    however, the most interesting part is that i tried another pc, and it seems to work with what i was doing (setserial, modprobe, mode2), but on this one not. this pc only accepts ir signals with kodi. dont remember now exactly but checked kodi's /etc/lirc/lirc_options.conf file and it was either identical or I tried to copy over from kodi. what could be different between kodi lirc vs ubuntu lirc settings? I am completely clueless now. for sure the serial port, remote and ir receiver work separately.