[mythtv-users] lircd unreliable after Ubuntu upgrade 16.04 > 18.04

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Mar 17 09:06:03 UTC 2019


On Fri, 15 Mar 2019 19:15:04 -0700, you wrote:

>Hi Stephen
>
>Thanks for the additional advice.
>
>I checked the things you suggested.
>
>- My mythfrontend was configured to look for its lircd socket in
>/var/run/lirc/lircd, so it was finding that with no problem. I added
>your systemd service descriptor though, just in case.
>- My lircrc for myth maps the buttons to the remote name as defined in
>lircd.conf.d. In my case, I have:
>
>begin remote
>  name  Tivo_S2
>
>So my lircrc buttons all are for "remote = Tivo_S2".
>
>I tried changing a few of those to "default" to correlate to
>lirc_options.conf as you suggested. Those buttons stopped working
>altogether until I changed them back.
>
>Here's a thing I did notice however: If I run irw while interacting
>with MythTV, I see that irw sees about 90% of the button presses (not
>perfect, but much better), even while mythrontend is only responding
>to about 60%. In fact there are many times when myth doesn't respond
>at all, but irw clearly saw the button presses. I feel like there's
>some issue with mythfrontend. I checked settings in the frontend
>configuration and didn't see anything significant.
>
>Does this give any ideas?
>
>Thanks,
>Zach

I think we need to trace things through right from the beginning - the
hardware.  You are using an old Tivo remote, but you have not said
what infrared receiver hardware you are using.  Is it a USB or PCI
device?  Mine is a USB device:

root at mypvr:~# lsusb | grep -i infr
Bus 005 Device 002: ID 0609:031d SMK Manufacturing, Inc. eHome
Infrared Receiver

root at mypvr:~# ll /dev/input/by-id/
total 0
drwxr-xr-x 2 root root 120 Mar 14 01:37 ./
drwxr-xr-x 4 root root 480 Mar 14 01:37 ../
lrwxrwxrwx 1 root root   9 Mar 14 01:37
usb-Logitech_USB_Receiver-event-kbd -> ../event2
lrwxrwxrwx 1 root root   9 Mar 14 01:37
usb-Logitech_USB_Receiver-if01-event-mouse -> ../event3
lrwxrwxrwx 1 root root   9 Mar 14 01:37
usb-Logitech_USB_Receiver-if01-mouse -> ../mouse0
lrwxrwxrwx 1 root root  10 Mar 14 01:37
usb-SMK_eHome_Infrared_Transceiver_SM005h4M-event-if00 -> ../event12

root at mypvr:~# ll /dev/input/by-path/
total 0
drwxr-xr-x 2 root root 140 Mar 14 01:37 ./
drwxr-xr-x 4 root root 480 Mar 14 01:37 ../
lrwxrwxrwx 1 root root   9 Mar 14 01:37
pci-0000:00:12.0-usb-0:2:1.0-event-kbd -> ../event2
lrwxrwxrwx 1 root root   9 Mar 14 01:37
pci-0000:00:12.0-usb-0:2:1.1-event-mouse -> ../event3
lrwxrwxrwx 1 root root   9 Mar 14 01:37
pci-0000:00:12.0-usb-0:2:1.1-mouse -> ../mouse0
lrwxrwxrwx 1 root root  10 Mar 14 01:37
pci-0000:00:13.0-usb-0:5:1.0-event -> ../event12
lrwxrwxrwx 1 root root  10 Mar 14 01:37 platform-eeepc-wmi-event ->
../event13

root at mypvr:~# ll /dev/lirc*
crw-rw---- 1 root video 241, 0 Mar 14 01:37 /dev/lirc0
lrwxrwxrwx 1 root root      15 Mar 14 01:38 /dev/lircd ->
/run/lirc/lircd=
lrwxrwxrwx 1 root root      13 Mar 14 01:37 /dev/lirc-mce ->
input/event12

I have a udev rule that creates the /dev/lirc-mce device, but I am not
using that device in my lirc_options.conf at the moment as there is
now only one IR remote receiver and it also shows up as /dev/lirc0.
Which I think happens because of the kernel, and the device is made
available to the "video" group in this rule:

root at mypvr:/lib/udev# grep -ir lirc *
rules.d/80-debian-compat.rules:KERNEL=="lirc[0-9]*", GROUP="video"

Now my IR receiver is handled by the kernel IR code, so if I stop
mythfrontend (and any other programs that use lirc, such as irexec),
and then stop lircd:

sudo stop lircd

Then ir-keytable shows it as an IR receiver device, using the kernel
mceusb device and using rc6 encoding:

root at mypvr:~# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event12) with:
	Name: Media Center Ed. eHome Infrared Remote Transceiver
(0609:031d)
	Driver: mceusb, table: rc-rc6-mce
	lirc device: /dev/lirc0
	Supported protocols: other lirc rc-5 rc-5-sz jvc sony nec
sanyo mce_kbd rc-6 sharp xmp 
	Enabled protocols: lirc rc-6 
	bus: 3, vendor/product: 0609:031d, version: 0x0000
	Repeat delay = 500 ms, repeat period = 125 ms

And I can press every key on my remote and get a scancode displayed by
ir-keytable -t:

root at mypvr:~# ir-keytable -t
Testing events. Please, press CTRL-C to abort.
331876.252285: lirc protocol(rc6_mce): scancode = 0x800f0401
331876.252306: event type EV_MSC(0x04): scancode = 0x800f0401
331876.252306: event type EV_KEY(0x01) key_down: KEY_1(0x0002)
331876.252306: event type EV_SYN(0x00).
1331876.359268: lirc protocol(rc6_mce): scancode = 0x800f0401
331876.359294: event type EV_MSC(0x04): scancode = 0x800f0401
331876.359294: event type EV_SYN(0x00).
331876.488021: event type EV_KEY(0x01) key_up: KEY_1(0x0002)
331876.488021: event type EV_SYN(0x00).
331876.969385: lirc protocol(rc6_mce): scancode = 0x800f0402 toggle=1
331876.969408: event type EV_MSC(0x04): scancode = 0x800f0402
331876.969408: event type EV_KEY(0x01) key_down: KEY_2(0x0003)
331876.969408: event type EV_SYN(0x00).
2331877.076235: lirc protocol(rc6_mce): scancode = 0x800f0402 toggle=1
331877.076246: event type EV_MSC(0x04): scancode = 0x800f0402
331877.076246: event type EV_SYN(0x00).
331877.208024: event type EV_KEY(0x01) key_up: KEY_2(0x0003)
331877.208024: event type EV_SYN(0x00).
331877.760309: lirc protocol(rc6_mce): scancode = 0x800f0403
331877.760332: event type EV_MSC(0x04): scancode = 0x800f0403
331877.760332: event type EV_KEY(0x01) key_down: KEY_3(0x0004)
331877.760332: event type EV_SYN(0x00).
3331877.866216: lirc protocol(rc6_mce): scancode = 0x800f0403
331877.866236: event type EV_MSC(0x04): scancode = 0x800f0403
331877.866236: event type EV_SYN(0x00).
331877.996022: event type EV_KEY(0x01) key_up: KEY_3(0x0004)
331877.996022: event type EV_SYN(0x00).
331882.641123: lirc protocol(rc6_mce): scancode = 0x800f040f toggle=1
331882.641162: event type EV_MSC(0x04): scancode = 0x800f040f
331882.641162: event type EV_KEY(0x01) key_down: KEY_MENU(0x008b)
331882.641162: event type EV_SYN(0x00).
331882.747042: lirc protocol(rc6_mce): scancode = 0x800f040f toggle=1
331882.747060: event type EV_MSC(0x04): scancode = 0x800f040f
331882.747060: event type EV_SYN(0x00).
331882.876049: event type EV_KEY(0x01) key_up: KEY_MENU(0x008b)
331882.876049: event type EV_SYN(0x00).
331883.807005: lirc protocol(rc6_mce): scancode = 0x800f0424
331883.807030: event type EV_MSC(0x04): scancode = 0x800f0424
331883.807030: event type EV_KEY(0x01) key_down: KEY_DVD(0x0185)
331883.807030: event type EV_SYN(0x00).
331883.914077: lirc protocol(rc6_mce): scancode = 0x800f0424
331883.914102: event type EV_MSC(0x04): scancode = 0x800f0424
331883.914102: event type EV_SYN(0x00).
331884.044099: event type EV_KEY(0x01) key_up: KEY_DVD(0x0185)
331884.044099: event type EV_SYN(0x00).
331887.589880: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1
331887.589900: event type EV_MSC(0x04): scancode = 0x800f0426
331887.589900: event type EV_KEY(0x01) key_down: KEY_EPG(0x016d)
331887.589900: event type EV_SYN(0x00).
331887.695853: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1
331887.695870: event type EV_MSC(0x04): scancode = 0x800f0426
331887.695870: event type EV_SYN(0x00).
331887.824018: event type EV_KEY(0x01) key_up: KEY_EPG(0x016d)
331887.824018: event type EV_SYN(0x00).
331888.407841: lirc protocol(rc6_mce): scancode = 0x800f0425
331888.407865: event type EV_MSC(0x04): scancode = 0x800f0425
331888.407865: event type EV_KEY(0x01) key_down: KEY_TUNER(0x0182)
331888.407865: event type EV_SYN(0x00).
331888.514829: lirc protocol(rc6_mce): scancode = 0x800f0425
331888.514843: event type EV_MSC(0x04): scancode = 0x800f0425
331888.514843: event type EV_SYN(0x00).
331888.644024: event type EV_KEY(0x01) key_up: KEY_TUNER(0x0182)
331888.644024: event type EV_SYN(0x00).
^C

So, does that happen with your remote?  If your remote is actually
using the "default" driver, as specified in your lirc_options, then I
believe that it should not be showing up in ir-keytable.  If it is
showing up in ir-keytable, then it is likely you should be using the
devinput driver.

Also, you posted your remote definition file:

begin remote

  name  Tivo_S2
  bits           32
  flags SPACE_ENC|CONST_LENGTH
  eps            20
  aeps          200

  header       9000  4500
  one           562  1687
  zero          562   562
  ptrail        562
  repeat       9000  2250
  gap          108000
  min_repeat      1
  toggle_bit      0

  frequency    38000

      begin codes
          TIVO                     0x00000000A10CE00F
          TV_POWER                 0x00000000A10C0807
          TV_INPUT                 0x00000000A10C2C03
          WINDOW                   0x00000000A10C220D
          LIVE_TV                  0x00000000A10C8807
          INFO                     0x00000000A10CC807
          GUIDE                    0x00000000A10C6C03
          UP                       0x00000000A10C2807
          LEFT                     0x00000000A10CE807
          RIGHT                    0x00000000A10CA807
          DOWN                     0x00000000A10C6807

But what file name is that in, and where is it referenced in the IR
setup files?  The driver line in your lirc_options.conf file says
"driver = default", which should mean that there is a
/etc/lirc/lircd.conf.d/default.lircd.conf file, in the same way I have
a devinput.lircd.conf file:

root at mypvr:/etc/lirc/lircd.conf.d# ll
total 48
drwxr-xr-x 2 root root  4096 Oct  6 03:51 ./
drwxr-xr-x 3 root root  4096 Oct  6 05:46 ../
-rw-r--r-- 1 root root 35015 Oct  6 05:26 devinput.lircd.conf
-rw-r--r-- 1 root root   615 Aug 13  2017 README.conf.d

and that should be where your Tivo_S2 definition is.


More information about the mythtv-users mailing list