Lirc not working

Hi,

After updating to 42.2 I can’t, among other things, get Lirc to work. 0.9.3a from OSS repo segfaults. 0.9.4c from VDR repo just spams journalctl with this:

Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*

In 42.1 I used an IR remote from Dvbsky, connected to an ir-receiver, connected to a DVB card. I can’t find any notice anywhere that the remote or the receiver had been recognized. Ia also have an USB bluetooth adapter and a PS3 BT remote, which I succesfully used in 13.something. That gets recognized and put into /dev/input/event17, it works as a limited keyboard with enter, arrows and numbers, other buttons do nothing. The thing I need a remote, and thereby Lirc, for, is VDR.

I do have available lircd.conf files for both remotes, but apparently just putting them in /etc/lirc is not enough any more. Have searched the net, found nothing for 42.2, or nothing else that worked.

Is there some tutorial somewhere on getting Lirc working in 42.2?

Thank you kindly for any help.

Let me do an update.

Tried modprobing everything in /lib/modules/4.4.27-2-default/kernel/drivers/media/rc/ and /keymaps/ under that. Module rc-loopback creates /sys/class/rc/rc0 and /dev/input/event17 and some of the other modules created event18, neither of them gives anything with cat. PS3 remote is at event19, and cat shows it reacting to button presses. No life signs anywhere from the IR remote.

# lircd --nodaemon
lircd-0.9.4c[25896]: Info: lircd:  Opening log, level: Info
lircd-0.9.4c[25896]: Notice: Running as user lirc
lircd-0.9.4c[25896]: Info: Using remote: ps3.
lircd-0.9.4c[25896]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
lircd-0.9.4c[25896]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.9.4c[25896]: Info: initializing 'auto'
lircd-0.9.4c[25896]: Info: Using device: /dev/input/event17
# lircd -D10 --nodaemon
lircd-0.9.4c[26171]: Trace2: lircd:  Opening log, level: Trace2
lircd-0.9.4c[26171]: Notice: Running as user lirc
lircd-0.9.4c[26171]: Debug: Groups: [478]: 16 490 54 478
lircd-0.9.4c[26171]: Trace: started server socket
lircd-0.9.4c[26171]: Trace1: parsing '/etc/lirc/lircd.conf'
lircd-0.9.4c[26171]: Trace2: Tokens: "begin" "remote" "(null)"
lircd-0.9.4c[26171]: Trace: parsing remote
lircd-0.9.4c[26171]: Trace1: creating first remote
lircd-0.9.4c[26171]: Trace2: Tokens: "name" "ps3" "(null)"
lircd-0.9.4c[26171]: Info: Using remote: ps3.
lircd-0.9.4c[26171]: Trace2: Tokens: "bits" "32" "(null)"
lircd-0.9.4c[26171]: Trace2: Tokens: "eps" "30" "(null)"
lircd-0.9.4c[26171]: Trace2: Tokens: "aeps" "100" "(null)"
lircd-0.9.4c[26171]: Trace2: Tokens: "one" "0" "0"
lircd-0.9.4c[26171]: Trace2: Tokens: "zero" "0" "0"
lircd-0.9.4c[26171]: Trace2: Tokens: "gap" "102974" "(null)"
lircd-0.9.4c[26171]: Trace2: Tokens: "toggle_bit_mask" "0x8001019C" "(null)"
lircd-0.9.4c[26171]: Trace2: Tokens: "begin" "codes" "(null)"
lircd-0.9.4c[26171]: Trace1:     begin codes
lircd-0.9.4c[26171]: Trace2: Tokens: "1" "0x80010002" "(null)"
lircd-0.9.4c[26171]: Trace2:       1                    0x0000000080010002
...
(more codes)
...
lircd-0.9.4c[26171]: Trace1:     end codes
lircd-0.9.4c[26171]: Trace2: Tokens: "end" "remote" "(null)"
lircd-0.9.4c[26171]: Trace1: end remote
lircd-0.9.4c[26171]: Trace2: clearing transmit buffer
lircd-0.9.4c[26171]: Trace: first signal is a space!
lircd-0.9.4c[26171]: Trace: first signal is a space!
lircd-0.9.4c[26171]: Trace: first signal is a space!
...
(hundreds of repeats of that line)
...
lircd-0.9.4c[26171]: Trace: first signal is a space!
lircd-0.9.4c[26171]: Trace: first signal is a space!
lircd-0.9.4c[26171]: Trace: first signal is a space!
lircd-0.9.4c[26171]: Trace: nothing to send
lircd-0.9.4c[26171]: Trace: lengths: 102974 102974 102974 102974
lircd-0.9.4c[26171]: Trace: config file read
lircd-0.9.4c[26171]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
lircd-0.9.4c[26171]: Trace: registering local client
lircd-0.9.4c[26171]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.9.4c[26171]: Info: initializing 'auto'
lircd-0.9.4c[26171]: Info: Using device: /dev/input/event17

So, lircd.conf with definitions for the PS3 remote works well enough to tell its name and the codes, which have worked previously. But I have not figured out how to tell lirc which device to use. Don’t know how it gets event17, grep -ir event17 /etc/ gives no hits.

Figured out I can specify device on command line. Still no working remote.

If devinput.lircd.conf is not present there’s an error for that, no working remote then either.

# lircd -d /dev/event19 --nodaemon
lircd-0.9.4c[26480]: Info: lircd:  Opening log, level: Info
lircd-0.9.4c[26480]: Notice: Running as user lirc
lircd-0.9.4c[26480]: Info: Using remote: devinput-64.
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: KEY_FASTREVERSE
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_MISC
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_MOUSE
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_SOUTH
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TOOL_PEN
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TRIGGER
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TRIGGER_HAPPY1
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_WHEEL
lircd-0.9.4c[26480]: Info: Using remote: devinput-32.
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: KEY_FASTREVERSE
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_MISC
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_MOUSE
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_SOUTH
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TOOL_PEN
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TRIGGER
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TRIGGER_HAPPY1
lircd-0.9.4c[26480]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_WHEEL
lircd-0.9.4c[26480]: Info: Using remote: ps3.
lircd-0.9.4c[26480]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
lircd-0.9.4c[26480]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.9.4c[26480]: Info: initializing '/dev/event19'
lircd-0.9.4c[26480]: Info: Using device: /dev/event19
lircd-0.9.4c[26480]: Error: unable to open '/dev/event19'
lircd-0.9.4c[26480]: Warning: Failed to initialize hardware
lircd-0.9.4c[26480]: Error: unable to open '/dev/event19'
lircd-0.9.4c[26480]: Error: unable to open '/dev/event19'
...
# ls -l /dev/input/event19
crw-rw---- 1 root input 13, 83 Nov 24 20:36 /dev/input/event19

User lirc is member of group input, so it should not be a permissions issue?

Well, obviously there’s a /input/ missing from the message above.

Got the PS3 remote working. Device is specified in /etc/lirc/lirc_options.conf, don’t know how the auto that was there by default works, and will have to alter the file every time device order changes. My old ps3.conf did not work, default devinput.conf did not work (even after removing the duplicate 32bit part), and devinput.conf made with lirc-make-devinput did not work. Not a problem between lirc and vdr, as lirc with debugging enabled showed no valid keypresses. So, I made another conf with irrecord, though it warns that it should not be necessary to use it with devinput. The conf it created is only 8bit, compared to 32bit in my old ps3.conf, so some buttons become doubles and can’t have to be edited from the file. But that conf works. Of course, one also needs to check that button names in vdr’s remote.conf (or the conf of whatever software they’re using) match those in lirc.

Wonder how long it’ll take me to figure out the IR remote. It would be better, as the PS3 one (perhaps any BT remote) does not do repeat keypresses, and with the PS3 remote one either needs to turn off BT when not used, or replace (charge) batteries weekly.

Tuning Linux is hard these days. On one hand, there’s all kinds of complexities. On the other, it works prolonged periods (even through some distro version upgrades) without need for tuning, so one forgets how it’s done.

Hi nimeton

Had the same issue, solved by changing the device and driver entries in /etc/lirc/lirc_options.conf. On my distribution (debian) I can avoid the device order issue by specifying the device as specified in /dev/serial/by-id directory. Not sure re Suse, likely to have something similar. I also specified the device (usb_uirt_raw) in my case. Hope that helps.

Regards
sidhu1f

Sorry, I forgot this thread.

I got the ir-remote working by adding a module option
options cx23885 enable_885_ir=1
I don’t remember having done that before, so I suppose the option has been added or its default changed between the kernel in 42.1 and 42.2.

Device order hasn’t been an issue now as it does not change like it did with the bluetooth (with dongle in and out), but should that become an issue, there seems to be an entry for the ir receiver in /dev/input/by-path