[mythtv-users] lirc_serial move to serial_ir nightmare in kernel 4.12

Tom Dexter digitalaudiorock at gmail.com
Tue Aug 22 23:13:09 UTC 2017


On Tue, Aug 22, 2017 at 5:43 PM, Alec Leamas <leamas.alec at gmail.com> wrote:
>
>
> On 22/08/17 22:30, Tom Dexter wrote:
>
>
>> Still no /dev/lirc0 getting created. Awful.
>
> This is a kernel issue, and you might need to get in touch with the kernel
> devs or (sometimes easier) downstream distro kernel maintainers. As I said,
> this is above may $0 paygrade...
>
>
>> Here's what I get when starting lircd:
>>
>> /etc/init.d/lircd start
>>   * Starting lircd ...
>>   * Setting lirc protocol active for rc0
>>
>> That last line is echoing to this:
>>
>> cat /sys/class/rc/rc0/protocols
>> rc-5 nec rc-6 jvc sony rc-5-sz sanyo sharp mce_kbd xmp [lirc]
>>
>> Is that how thats intended to look? I think you said that it should
>> only have lirc?
>
>
> yup, looks fine if you plan to use the /dev/lirc0 device and the default
> driver.
>
> Basically this looks like a kernel bug to me: It has a rc0 /sys device, runs
> the lirc protocol and still does not present a /dev/lirc0 link. I assume you
> have checked dmesg for any clue.
>
> FWIW, a working lirc0 also creates a /sys/class/rc/rc0/lirc0  link.
>
> Cheers!
>
> --alec

OK...with this stuff configured as modules (except rc_core) and with
serial_ir loaded at boot with modprobe, I do in fact get a /dev/lirc0
device. However once again irw (and mythtv) don't work. Here's
everything and it just plain looks right:

lsmod
Module                  Size  Used by
ir_lirc_codec          16384  0
lirc_dev               16384  1 ir_lirc_codec
serial_ir              16384  0
nvidia              11517952  0
nvidia_drm             16384  0

ll /dev/lirc0
crw------- 1 root root 250, 0 Aug 22 18:18 /dev/lirc0

cat /sys/class/rc/rc0/protocols
rc-5 nec rc-6 jvc sony rc-5-sz sanyo sharp mce_kbd xmp [lirc]

ll /sys/class/rc/rc0/lirc0
total 0
-r--r--r-- 1 root root 4096 Aug 22 18:26 dev
lrwxrwxrwx 1 root root    0 Aug 22 18:26 device -> ../../rc0
drwxr-xr-x 2 root root    0 Aug 22 18:26 power
lrwxrwxrwx 1 root root    0 Aug 22 18:26 subsystem ->
../../../../../../class/lirc
-rw-r--r-- 1 root root 4096 Aug 22 18:18 uevent

grep -P 'serial_ir|lirc' /var/log/messages

Aug 22 18:18:18 mythfront kernel: serial_ir serial_ir.0: auto-detected
active low receiver
Aug 22 18:18:18 mythfront kernel: rc rc0: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0
Aug 22 18:18:18 mythfront kernel: lirc_dev: IR Remote Control driver
registered, major 250
Aug 22 18:18:18 mythfront kernel: rc rc0: lirc_dev: driver
ir-lirc-codec (serial_ir) registered at minor = 0
Aug 22 18:18:18 mythfront kernel: input: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0/input8
Aug 22 18:18:16 mythfront lircd-0.9.4a[1041]: Notice: accepted new
client on /var/run/lirc/lircd
Aug 22 18:18:16 mythfront lircd-0.9.4a[1041]: Info: [lirc] protocol is enabled

dmesg | grep -P 'serial_ir|lirc'
[   11.251156] serial_ir serial_ir.0: auto-detected active low receiver
[   11.251218] rc rc0: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0
[   11.263334] lirc_dev: IR Remote Control driver registered, major 250
[   11.271387] rc rc0: lirc_dev: driver ir-lirc-codec (serial_ir)
registered at minor = 0
[   11.284232] input: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0/input8

cat /sys/class/rc/rc0/protocols
rc-5 nec rc-6 jvc sony rc-5-sz sanyo sharp mce_kbd xmp [lirc]

Once again, mode2 using /dev/lirc0 and the default driver absolutely
works, but irw gets nothing.

This by the way puts me *exactly* where I was when I started this
whole thread...that is when I had serial_ir, lirc_dev, and
ir_lirc_codec compiled into the kernel. I'm fairly sure that was also
reporting the correct [lirc] in /sys/class/rc/rc0/protocols as well,
and behaved exactly like this. mode2 is getting pulses etc, but for
whatever reason, the data coming back is very different from what I
got from lirc_serial.

Also note: I tried the remote config that I generated with irrecord
(the one I attached in an email to the lirc list) and that doesn't
work either. I also noticed that that one seems wildly different from
the original Philips TIVO34 config that should work, even to the
extent that the stock TIVO34 config has "bits 16" where the one I
attempted to generate picked up "bits 32". That seems highly suspect.

Tom


More information about the mythtv-users mailing list