[SOLVED] Lirc issues under Ubuntu 18.04

Moderators: odroid, mdrjr

[SOLVED] Lirc issues under Ubuntu 18.04

Unread postby mad_ady » Wed Jun 13, 2018 7:53 pm

I've noticed I have problems with my IR blaster after upgrading to 18.04. It was working fine last time I tested it with 16.04, but now lirc spits a bunch of errors (I preserved the old config).
I'm running kernel 4.14.43+, with lirc_odroid built as a module:
Code: Select all
adrianp@aldebaran:~$ zcat /proc/config.gz | grep -i lirc_odroid
CONFIG_LIRC_ODROID=m


I can load it just fine with these settings:
Code: Select all
adrianp@aldebaran:~$ cat /etc/modprobe.d/lirc.conf
options lirc_odroid gpio_out_pin=24 softcarrier=1 invert=0
adrianp@aldebaran:~$ dmesg | tail
...
[13409.507617] lirc_dev: IR Remote Control driver registered, major 242
[13409.516977] lirc_odroid: module is from the staging directory, the quality is unknown, you have been warned.
[13409.526915] lirc_odroid lirc_odroid.0: lirc_dev: driver lirc_odroid registered at minor = 0
[13409.533969] lirc_odroid: driver registered!
adrianp@aldebaran:~$ ls -l /dev/lirc*
crw-rw---- 1 root video 242, 0 Jun 13 13:01 /dev/lirc0


When restarting lircd, I get these messages in journalctl:
Code: Select all
Jun 13 13:37:02 aldebaran lircd[12408]: lircd-0.10.0[12408]: Notice: caught signal
Jun 13 13:37:02 aldebaran systemd[1]: Stopping Flexible IR remote input/output application support...
Jun 13 13:37:02 aldebaran lircd-0.10.0[12408]: Notice: caught signal
Jun 13 13:37:02 aldebaran systemd[1]: Stopped Flexible IR remote input/output application support.
Jun 13 13:37:02 aldebaran systemd[1]: Started Flexible IR remote input/output application support.
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: lircd:  Opening log, level: Info
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Version: lircd 0.10.0
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: System info: Linux aldebaran 4.14.43+ #2 SMP PREEMPT Thu May 24 09:50:44 UTC 2018 armv7l armv7l armv7l GNU/Linux
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: Initial device: auto
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: Initial device: auto
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: lircd:  Opening log, level: Info
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Notice: Using systemd fd
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Warning: Running as root
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: driver: devinput
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: Using remote: lg.conf.
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: output: /var/run/lirc/lircd
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: nodaemon: 1
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: plugindir: /usr/lib/arm-linux-gnueabihf/lirc/plugins
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: logfile: syslog
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: immediate-init: 0
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: permission: 666
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: driver-options:
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: pidfile: /var/run/lirc/lircd.pid
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: listen: 0
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: Using remote: lgirplus.conf.
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: connect: (null)
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: userelease: 0
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: effective_user: (null)
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: release_suffix: _EVUP
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: allow_simulate: 0
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: repeat_max: 600
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: configfile: /etc/lirc/lircd.conf
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Options: dynamic_codes: (null)
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Current driver: devinput
Jun 13 13:37:02 aldebaran lircd[12841]: lircd-0.10.0[12841]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Driver API version: 4
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Driver  version: 0.10.0
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Driver  info: See file:///usr/share/doc/lirc/plugindocs/devinput.html
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: lircd:  Opening log, level: Info
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: Using systemd fd
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Warning: Running as root
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: Using remote: lg.conf.
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Info: Using remote: lgirplus.conf.
Jun 13 13:37:02 aldebaran lircd-0.10.0[12841]: Notice: lircd(devinput) ready, using /var/run/lirc/lircd


When I try to use irsend, I get loads of errors:
Code: Select all
adrianp@aldebaran:~$ sudo irsend SEND_ONCE lgirplus.conf power-off

hardware does not support sending
Error running command: Input/output error

/// from syslog:

Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Notice: accepted new client on /var/run/lirc/lircd
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: initializing 'auto'
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Cannot run glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*: No such file or directory
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Notice: No input device available for devinput driver. Consider stopping lircd.socket or reconfigure lirc
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Warning: Failed to initialize hardware
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Error: error processing command: SEND_ONCE lgirplus.conf power-off
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Error: hardware does not support sending
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Notice: accepted new client on /var/run/lirc/lircd
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: removed client
Jun 13 13:44:48 aldebaran lircd[12841]: lircd-0.10.0[12841]: Info: closing 'auto'
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Info: initializing 'auto'
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Cannot run glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*: No such file or directory
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Notice: No input device available for devinput driver. Consider stopping lircd.socket or reconfigure lirc
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Warning: Failed to initialize hardware
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Error: error processing command: SEND_ONCE lgirplus.conf power-off
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Error: hardware does not support sending
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Error: Cannot glob /sys/class/rc/rc0/input[0-9]*/event[0-9]*
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Info: removed client
Jun 13 13:44:48 aldebaran lircd-0.10.0[12841]: Info: closing 'auto'



/sys/class/rc is empty:
Code: Select all
adrianp@aldebaran:~$ ls -l  /sys/class/rc/
total 0


I'm using the same hardware.conf as the wiki:
Code: Select all
adrianp@aldebaran:~$ grep -v '#' /etc/lirc/hardware.conf | grep -v '^$'
REMOTE="None"
REMOTE_MODULES=""
REMOTE_DRIVER=""
REMOTE_DEVICE=""
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""
TRANSMITTER="odroid blaster"
TRANSMITTER_MODULES="lirc_odroid lirc_dev"
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE="/dev/lirc0"
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
START_LIRCD="true"
LOAD_MODULES="true"
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""


Has anyone managed to try out the IR blaster config under 18.04?

Edit: It seems there is a know problem with lirc about the messages being flooded in syslog: https://bugs.launchpad.net/ubuntu/+sour ... ug/1768291
User avatar
mad_ady
 
Posts: 3794
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Lirc issues under Ubuntu 18.04

Unread postby mad_ady » Wed Jun 13, 2018 8:26 pm

I think I fixed it, but I need to test it when I get home to confirm. It seems there have been some changes in lirc configuration that differ from 16.04.
I made the following changes:
1. Moved /etc/lirc/lircd.conf to /etc/lirc/lircd.conf.d/lgirplus.conf
2. Renamed /etc/lirc/lircd.conf.dist to /etc/lirc/lircd.conf (it includes config located in /etc/lirc/lircd.conf.d/*.conf).
3. Modified the following in /etc/lirc/lirc_options:
Code: Select all
driver          = default
device          = /dev/lirc0


Now, I restarted lircd and tried injection:
Code: Select all
Jun 13 14:20:04 aldebaran lircd[1515]: lircd-0.10.0[1515]: Notice: accepted new client on /var/run/lirc/lircd
Jun 13 14:20:04 aldebaran lircd[1515]: lircd-0.10.0[1515]: Info: Cannot configure the rc device for /dev/lirc0
Jun 13 14:20:04 aldebaran lircd-0.10.0[1515]: Notice: accepted new client on /var/run/lirc/lircd
Jun 13 14:20:04 aldebaran lircd-0.10.0[1515]: Info: Cannot configure the rc device for /dev/lirc0
Jun 13 14:20:04 aldebaran lircd[1515]: lircd-0.10.0[1515]: Info: removed client
Jun 13 14:20:04 aldebaran lircd-0.10.0[1515]: Info: removed client

dmesg:
[18121.837890] lirc_odroid - SET_SEND_CARRIER 38000
[18121.841339] in init_timing_params, freq=38000 pulse=13, space=13
[18121.847398] lirc_odroid - SET_SEND_DUTY_CYCLE 50
[18121.851793] in init_timing_params, freq=38000 pulse=13, space=13



So, it seems to have worked. :) I will confirm tomorrow whether it works or not.
User avatar
mad_ady
 
Posts: 3794
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Lirc issues under Ubuntu 18.04

Unread postby mad_ady » Thu Jun 14, 2018 4:34 am

I can confirm that lirc works. @odroid: can you make the necessary chamges in the wiki for 18.04?
User avatar
mad_ady
 
Posts: 3794
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2


Return to Ubuntu

Who is online

Users browsing this forum: Google [Bot] and 3 guests