ir_keytable show correct keys but Myth doesn't recognise them

For discussion of topics specific to MythTV on linux
Post Reply
backseat
Newcomer
Posts: 6
Joined: Sat Nov 02, 2019 12:53 pm
Great Britain

ir_keytable show correct keys but Myth doesn't recognise them

Post by backseat »

Myth isn't recognising some remote control buttons. For example, I've mapped the "play" button to KEY_P, but that doesn't start/stop playback.

I've connected a keyboard to my Myth box and I also have ir-keytable --test running in a shell session. From the "Watch recordings" page, if I press the remote control right arrow, the first recording on the right hand column is highlighted as I'd expect. The shell session shows the following, again as I'd expect:

Code: Select all

2248.787328: lirc protocol(rc6_mce): scancode = 0x800f0421
2248.787378: event type EV_MSC(0x04): scancode = 0x800f0421
2248.787378: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a)
2248.787378: event type EV_SYN(0x00).
2248.918918: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a)
2248.918918: event type EV_SYN(0x00).
If I press the play button on the remote, mapped to KEY_P, nothing happens, but the shell session shows the key is generated:

Code: Select all

2529.929953: lirc protocol(rc6_mce): scancode = 0x800f0416
2529.930004: event type EV_MSC(0x04): scancode = 0x800f0416
2529.930004: event type EV_KEY(0x01) key_down: KEY_P(0x0019)
2529.930004: event type EV_SYN(0x00).
2530.035942: lirc protocol(rc6_mce): scancode = 0x800f0416
2530.035980: event type EV_MSC(0x04): scancode = 0x800f0416
2530.035980: event type EV_SYN(0x00).
2530.166914: event type EV_KEY(0x01) key_up: KEY_P(0x0019)
2530.166914: event type EV_SYN(0x00).
Pressing p on the attached keyboard does play the recording.

In summary: the correct key events seem to be generated but not recognised by Myth.

I'd welcome any suggestions as to where to look to resolve this.

Versions, etc:

Code: Select all

# ir-keytable 
Found /sys/class/rc/rc0/ (/dev/input/event7) with:
	Name: ITE8713 CIR transceiver
	Driver: ite-cir, table: rc-rc6-mce
	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 
	Enabled kernel protocols: lirc rc-6 
	bus: 25, vendor/product: 1283:0000, version: 0x0000
	Repeat delay = 500 ms, repeat period = 125 ms
Myth 31.0
Debian 10.7
Kernel 4.19.0-13-amd64
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by wesnewell »

BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
backseat
Newcomer
Posts: 6
Joined: Sat Nov 02, 2019 12:53 pm
Great Britain

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by backseat »

Thanks wesnewell, but I'm pretty sure that isn't the problem (I'm running a V4 kernel, not V5).

However, I have found that restarting dbus fixes the problem:

Code: Select all

systemctl restart dbus
This is consistent: it never works before restarting dbus and it always works after. I wonder if systemd is for some reason starting dbus too early.
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by wesnewell »

Look at build date. Some V4 kernels may be bad too if they were compiled after 9/5/20.

[DIR] v4.4.236/ 2020-09-12 11:23 -
[DIR] v4.4.237/ 2020-09-23 08:16 -
[DIR] v4.4.238/ 2020-10-01 11:02 -
[DIR] v4.4.239/ 2020-10-14 09:23 -
[DIR] v4.4.240/ 2020-10-17 11:08 -
[DIR] v4.4.241/ 2020-10-29 10:08 -
[DIR] v4.4.242/ 2020-11-10 11:20 -
[DIR] v4.4.243/ 2020-11-11 01:51 -
[DIR] v4.4.244/ 2020-11-18 19:03 -
[DIR] v4.4.245/ 2020-11-22 17:40 -
[DIR] v4.4.246/ 2020-11-24 13:03 -
[DIR] v4.4.247/ 2020-12-02 10:01 -
[DIR] v4.4.248/ 2020-12-17 16:11
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
backseat
Newcomer
Posts: 6
Joined: Sat Nov 02, 2019 12:53 pm
Great Britain

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by backseat »

I'm not sure whether the 4.4 series are affected or not; however, I've logged a bug against dbus with Debian: https://bugs.debian.org/cgi-bin/bugrepo ... bug=977958
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by wesnewell »

I'm not sure either, but the problem will resolved with a patch to rc-main.c source code.
https://patchwork.linuxtv.org/project/l ... @mess.org/
And here's a link to the patched ubuntu kernel.
https://people.canonical.com/~khfeng/lp1901089/
You can expect the next mainline kernel to also be fixed.
this may be an entirely different problem that you are experiencing.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: ir_keytable show correct keys but Myth doesn't recognise them

Post by wesnewell »

Quick followup. 5.11-RC6 01-31-2021 has the patch and it works. Hopefully all kernels compiled after that date will also work.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
Post Reply