I just installed LibreElec 8.2.4 on an Intel NUC 2820. I previously had Kodi on top of Fedora on this same box, but when the SSD died I decided to try LibreElec as it boots a lot faster. In order to get spouse approval, this new config needs to look pretty much the same as the old one.
Everything was humming along until I got to the IR Remote config. We have been using a the stock SHARP remote control that came with the TV for years which I manually configured with LIRC on Fedora....worked great. Now I am trying to reproduce that same working remote on LibreElec
I found that setting the ir-keytable protocol to "sharp" and manually creating the /storage/.config/rc_keymaps/sharp_remote and updating /storage/.config/rc_maps.cfg to point to my new keymap was fairly easy and straight forward to get the keys to map like I had them before.
But I am not suffering from the dreaded double keypress which will be a deal breaker with the spouse.
I have been debugging it and it appears that the double presses are coming out of the Kernel input module. From what I understand the path of a keypress from remote to Kodi is something like:
1. Keypress is received at builtin Intel NUC Optical receiver (ITE8713 CIR transceiver). Note that the remote control continually repeats the button as long as it is pressed. Every press of a button results in multiple repeats of the button
2. The Kernel Module "ite-cir" receives the signal and demodulates it.
3. The demodulated signal then goes to Kernel Module "ir_sharp_decoder" which looks for the bits and spaces and eventually calls rc_keydown() with a scancode.
4. rc_keydown() in the rc_core Kernel module calls ir_do_keydown() which calls input_event() which handles /dev/input and eventually lands in the keyboard driver.
5. the keyboard driver and the rc_core module do a little dance to translate the scancode into a keycode.
6. The autorepeat stuff apparently is handled in the keyboard/input kernel module. Eventually something is emitted to all processes via the /dev/input/event10 character device (event10 is my rc input device)
7. eventlircd opens that /dev/input/event10 device to receive the events from the Kernel. I also note that Xorg process has this device opened as well although I am not sure how or if Kodi interacts with Xorg in LibreElec.
8. If my understanding is correct, eventlircd process takes the event and puts it into the LIRC socket /run/lirc/lircd
9. Kodi listens to the lirc socket to receive the inputs.
When I run "ir-keytable -t" (after shutting down Kodi and eventlircd) I see that it too opens /dev/input/event10 and reports what it sees.
In my case, I see double keypresses in ir-keytable -t no matter what I set for the DELAY or PERIOD. (-D and -P options to ir-keytable).
At this point I am stumped. I looked through the Kernel modules trying to determine where DELAY and PERIOD come into play but didn't find what I was looking for. I see that eventlircd also has a -R option to enable "repeat filtering" but this is said to be defaulted to "true". Unfortunately the "verbose" options of eventlircd don't work like the -t option to ir-keytable...I can't see what events eventlircd is sending to the lircd socket.
I haven't looked at the sourcecode to eventlircd yet, but I suppose that is the next step. If anybody has advice I would love to hear it.
I know that a lot of people saw the double keypresses because lircd process was also enabled. In 8.2.4 this is not enabled and I don't see any lircd process.