The remote buttons again - OK, Back not working
#1
Exclamation 
Hi! I've an old rc6 remote that worked fine earlier. Sometime in the last year after kernel or kodi v19 updates, it stopped working. I'm trying to debug it in the last few days.

I'm debugging this on Ubuntu 20.04 with Kodi 2:19.1+git20210509.0555-85e05228b4-0~focal. Here is what I've found till now:

kernel is detecting the remote's controller
Code:
$ sudo ir-keytable
Found /sys/class/rc/rc0/ with:
    Name: Media Center Ed. eHome Infrared Remote Transceiver (147a:e03e)
    Driver: mceusb
    Default keymap: rc-rc6-mce
    Input device: /dev/input/event14
    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: 3, vendor/product: 147a:e03e, version: 0x1101
    Repeat delay = 500 ms, repeat period = 125 ms

All keys are detected by ir-keytable:
Code:
$ sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
3586.974424: lirc protocol(rc6_mce): scancode = 0x800f041e
3586.974446: event type EV_MSC(0x04): scancode = 0x800f041e
3586.974446: event type EV_KEY(0x01) key_down: KEY_UP(0x0067)
3586.974446: event type EV_SYN(0x00).
^[[A3587.109395: event type EV_KEY(0x01) key_up: KEY_UP(0x0067)
3587.109395: event type EV_SYN(0x00).
3589.388486: lirc protocol(rc6_mce): scancode = 0x800f0422
3589.388502: event type EV_MSC(0x04): scancode = 0x800f0422
3589.388502: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
3589.388502: event type EV_SYN(0x00).
3589.495345: lirc protocol(rc6_mce): scancode = 0x800f0422
3589.495359: event type EV_MSC(0x04): scancode = 0x800f0422
3589.495359: event type EV_SYN(0x00).
3589.629454: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
3589.629454: event type EV_SYN(0x00).
3592.735181: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
3592.735204: event type EV_MSC(0x04): scancode = 0x800f0423
3592.735204: event type EV_KEY(0x01) key_down: KEY_EXIT(0x00ae)
3592.735204: event type EV_SYN(0x00).
3592.842128: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
3592.842138: event type EV_MSC(0x04): scancode = 0x800f0423
3592.842138: event type EV_SYN(0x00).
3592.977588: event type EV_KEY(0x01) key_up: KEY_EXIT(0x00ae)
3592.977588: event type EV_SYN(0x00).

With Kodi debug logs, I found that the back key is detected and I'm able to map it with keymap-editor.
Code:
2021-09-04 10:28:12.546 T:59131   DEBUG <general>: Keyboard: scancode: 0xb6, sym: 0x269025110, unicode: 0x0000, modifier: 0x0
2021-09-04 10:28:12.546 T:59131   DEBUG <general>: GetActionCode: Trying Hardy keycode for 0xf200

However, the OK key is not even detected by Kodi. When pressed, there are no logs (like above) in Kodi debug log. The key is lost somewhere between the kernel and Kodi.

The OK, Back buttons are so critical to navigate in Kodi. How do I debug this further?
Reply
#2
Trying to debug/fix this when I find time. Here is what I found so far:
  • the simplest fix for OK, Back is this remap. I was using this earlier but it appears that some recent kernel has stopped reading /etc/rc_keymaps/ at boot.
Code:

0x800f0422 KEY_ENTER
0x800f0423 KEY_BACKSPACE
  • I was doing this remap using ir-keytable -k on a terminal - X does not detect it until X is restarted. This can be checked with xev.
  • Once X detects these keys, Kodi will detect it too
  • the challenge is to run the required ir-keytable commands at boot before X starts. For this, a simpler version of this custom systemd service seems to be working for now.
Reply

Logout Mark Read Team Forum Stats Members Help
The remote buttons again - OK, Back not working0