Bug 1412860 - lirc no longer works after update from Fedora 23 to Fedora 25 [NEEDINFO]
Summary: lirc no longer works after update from Fedora 23 to Fedora 25
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-13 00:47 UTC by Erik Sejr
Modified: 2019-01-09 12:54 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-04-28 17:04:01 UTC
Type: Bug
Embargoed:
jforbes: needinfo?


Attachments (Terms of Use)

Description Erik Sejr 2017-01-13 00:47:51 UTC
Description of problem:
I recently updated to Fedora 25 from 23 since 23 went end-of-life. This was a clean install, not an upgrade. I restored my LIRC configuration precisely as it was on Fedora 23, but lirc no longer worked for either transmitting or receiving.

I have two devices - a USB mceusb receiver and an IguanaIR transceiver (used for transmitting). Both don't work and both appear to fail in the same way.

Version-Release number of selected component (if applicable):
Currently running Fedora 25 Kernel 4.8.16-300.fc25.x86_64

How reproducible:
Always


Steps to Reproduce:
1. Check the drivers for both devices load properly:
[    7.234806] lirc_dev: IR Remote Control driver registered, major 242
[    7.250440] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
[    7.323134] rc rc1: lirc_dev: driver ir-lirc-codec (iguanair) registered at minor = 1

2. Run lircd in the foreground, attach it to the mceusb receiver (/dev/lirc0)
/usr/sbin/lircd -d /dev/lirc0 --pidfile=/run/lirc/lircd0.pid -o /var/run/lirc/lircd0 --nodaemon /etc/lirc/lircd.conf.mceusb
lircd-0.9.4c[2070]: Info: lircd:  Opening log, level: Info
lircd-0.9.4c[2070]: Notice: Running as user lirc
lircd-0.9.4c[2070]: Info: Using remote: mceusb.
lircd-0.9.4c[2070]: Info: Using remote: mceusb_hauppauge.
lircd-0.9.4c[2070]: Info: Using remote: vista_mce.
lircd-0.9.4c[2070]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd0

3. Attach a client
lircd-0.9.4c[2070]: Info: initializing '/dev/lirc0'
lircd-0.9.4c[2070]: Info: Using device: /dev/lirc0
lircd-0.9.4c[2070]: Warning: can't get exclusive access to events coming from `/dev/lirc0' interface

4. Press some buttons on the remote:
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'
lircd-0.9.4c[2070]: Error: error reading '/dev/lirc0'

Another Option - Use mode2, try to read the lirc device in raw mode:
For the MCEUSB hardware:

mode2 --raw --device /dev/lirc0
Using raw access on device /dev/lirc0
Problems: this device is not a LIRC kernel device (it does not
support LIRC_GET_REC_MODE ioctl). This is not necessarily a
problem, but mode2 will not work.  If you are using the --raw
option you might try using without it and select a driver
instead. Otherwise, try using lircd + irw to view the decoded
data - this might very well work even if mode2 doesn't.

For the IguanaIR hardware:
mode2 --raw --device /dev/lirc1
Using raw access on device /dev/lirc1
Problems: this device is not a LIRC kernel device (it does not
support LIRC_GET_REC_MODE ioctl). This is not necessarily a
problem, but mode2 will not work.  If you are using the --raw
option you might try using without it and select a driver
instead. Otherwise, try using lircd + irw to view the decoded
data - this might very well work even if mode2 doesn't.

Actual results:
1. No output from IRW reading devices
2. mode2 indicates /dev/lirc* devices are not LIRC devices
3. irsend, when used with the iquanaIR device indicates the hardware is not capable of sending

Expected results:
1. IRW will return key codes using the same hardware/remote and config file as used and was working in fedora 23
2. irsend will transmit with the IguanaIR transceiver

Additional info:

Comment 1 Erik Sejr 2017-01-13 09:51:30 UTC
Some additional info:
The issue may be limited to ioctl() calls on the block device. The lircd "Warning: can't get exclusive access to events coming from `/dev/lirc0' interface" message is a result of a failed EVIOCGRAB ioctl() call on the block device. The mode2 error is a result of a failed LIRC_GET_REC_MODE ioctl() call on the block device.

When using cat or hexdump raw data can be obtained when a button on the remote is pressed:

hexdump /dev/lirc0
0000000 83b2 0001 0096 0100 ffff 00ff 83b2 0001

But the reads seem to be too short or incomplete in some cases (much less data then expected).

Comment 2 Erik Sejr 2017-01-14 00:09:33 UTC
Built 4.4.0 vanilla kernel from source:
# uname -a
Linux xxx.domain.com 4.4.0Lirc+ #1 SMP Fri Jan 13 10:43:53 EST 2017 x86_64 x86_

Retested:
# mode2 --raw -d /dev/lirc0
Using raw access on device /dev/lirc0
Using device: /dev/input/event0
Warning: Running as root.

# mode2 --raw -d /dev/lirc1
Using raw access on device /dev/lirc1
Using device: /dev/input/event0
Warning: Running as root.

# /usr/sbin/lircd -d /dev/lirc0 --pidfile=/run/lirc/lircd0.pid -o /var/run/lirc/lircd0 --nodaemon /etc/lirc/lircd.conf.mceusb
lircd-0.9.4c[2007]: Info: lircd:  Opening log, level: Info
lircd-0.9.4c[2007]: Notice: Running as user lirc
lircd-0.9.4c[2007]: Info: Using remote: mceusb.
lircd-0.9.4c[2007]: Info: Using remote: mceusb_hauppauge.
lircd-0.9.4c[2007]: Info: Using remote: vista_mce.
lircd-0.9.4c[2007]: Notice: lircd(default) ready, using /var/run/lirc/lircd0

# irw /var/run/lirc/lircd0
000000037ff07bde 00 KEY_RIGHT mceusb
000000037ff07bde 00 KEY_RIGHT mceusb
000000037ff07bdf 00 KEY_LEFT mceusb
000000037ff07bdf 00 KEY_LEFT mceusb
000000037ff07be0 00 KEY_DOWN mceusb
000000037ff07be0 00 KEY_DOWN mceusb
000000037ff07be1 00 KEY_UP mceusb
000000037ff07be1 00 KEY_UP mceusb
000000037ff07be1 00 KEY_UP mceusb
000000037ff07bdf 00 KEY_LEFT mceusb
000000037ff07bde 00 KEY_RIGHT mceusb

Please note that I did have to make one minor config change to get this to work - changing the driver from "devinput" to "default" in lirc_options.conf

I will try to build vanilla kernels up to 4.9 to see when it fails.

Comment 3 Erik Sejr 2017-01-14 03:34:29 UTC
After testing a number of Kernels, this issue with mode2 and the LIRC_GET_REC_MODE ioctl seems to have been introduced in 4.8+. 4.7 and below do not exhibit this problem, 4.8 and 4.9 do. I did not test 4.10.

Under any of the kernels starting at 4.4 (including the Fedora one), lirc only works with the "default" driver. The devinput driver always fails with the above error.

Comment 4 Justin M. Forbes 2017-04-11 14:46:54 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.

Fedora 25 has now been rebased to 4.10.9-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.

If you experience different issues, please open a new bug report for those.

Comment 5 Justin M. Forbes 2017-04-28 17:04:01 UTC
*********** MASS BUG UPDATE **************
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 2 weeks. If you are still experiencing this issue, please reopen and attach the 
relevant data from the latest kernel you are running and any data that might have been requested previously.


Note You need to log in before you can comment on or make changes to this bug.