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

Tom Dexter digitalaudiorock at gmail.com
Mon Aug 21 23:46:58 UTC 2017


This one just has me at my wits end. I'm running on Gentoo and am
trying to update my kernel from 4.9.34 to 4.12.5. I'm running
lircd-0.9.4a and had the lirc_serial stuff compiled directly into the
kernel (no modules) and have the serial SERIAL_8250 stuff disabled (as
required). This all works 100% with lirc_serial in 4.9.34.

So apparently since then, lirc_serial was moved out of the staging
drivers and rename to serial_ir (??):

https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/1702927
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fa5dc29c1fcc9151c3bcfd9e291a2899ae15f61d

Just to really confuse things, the kernel config is in fact named IR_SERIAL:

IR_SERIAL
   Location:
     -> Device Drivers
       -> Multimedia support (MEDIA_SUPPORT [=y])
         -> Remote Controller devices (RC_DEVICES [=y])
Label: Homebrew Serial Port Receiver

So I enabled that and disabled the option for the transmitter, as I
don't need it.

The first time I tried this, I got no /dev/lirc0 device at all. I was
able to correct that by enabling the "IR to LIRC bridge" under the
Remote controller decoders:

IR_LIRC_CODEC
   Location:
     -> Device Drivers
       -> Multimedia support (MEDIA_SUPPORT [=y])
         -> Remote controller decoders (RC_DECODERS [=y])
       -> LIRC interface driver (LIRC [=y])
Label: Enable IR to LIRC bridge

That at least corrected that issue and I'm now getting a /dev/lirc0
device. What's perplexing is why, if this was just a move and rename,
did I NOT require that before? This may be related to the mess below
regarding the kernel rc0 crap.

So now here's where I'm at: I CAN in fact get raw output with "cat
/dev/lirc0" when hitting remote buttons, however irw gets nothing at
all. Here's what the lircd startup looks like:

/etc/init.d/lircd start
 * Starting lircd ...
 * Setting lirc protocol active for rc0

....with this in the message log:
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: lircd:  Opening
log, level: Info
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: Initial device: /dev/lirc0
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: [lirc] protocol is enabled
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: Initial device: /dev/lirc0
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: [lirc] protocol is enabled
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: lircd:  Opening
log, level: Info
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Warning: Running as root
Aug 21 18:47:03 mythfront lircd-0.9.4a[1526]: Info: Using remote: TIVO34.
Aug 21 18:47:03 mythfront lircd-0.9.4a[1527]: Notice: lircd(default)
ready, using /var/run/lirc/lircd

That all looks perfectly normal. Here are log messages regarding serial_ir:
grep serial_ir /var/log/messages
Aug 21 18:56:49 mythfront kernel: serial_ir serial_ir.0: auto-detected
active low receiver
Aug 21 18:56:49 mythfront kernel: rc rc0: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0
Aug 21 18:56:49 mythfront kernel: rc rc0: lirc_dev: driver
ir-lirc-codec (serial_ir) registered at minor = 0
Aug 21 18:56:49 mythfront kernel: input: Serial IR type home-brew as
/devices/platform/serial_ir.0/rc/rc0/input1

I think this confusing mess is related: The init script is generating
the message "Setting lirc protocol active for rc0" based on the
existence of /sys/class/rc/rc0/protocols which is clearly related to
the /devices/platform/serial_ir.0/rc/rc0 referenced above.

However with the old kernel and lirc_serial, none of that exists at
all, and I don't get those messages at all. The lirc_serial device
appears to be under /sys/devices/platform/lirc_serial.0/lirc/lirc0,
/sys/class/rc is empty, and there appears to be a
/sys/class/lirc/lirc0 directory with nothing resembling that protocol
entry at all.

So clearly there's something radically different about this serial_ir
driver...or it sure looks that way.

Any insight would be appreciated. Just horrible.

Tom


More information about the mythtv-users mailing list