[mythtv-users] lircd unreliable after Ubuntu upgrade 16.04 > 18.04
Will Dormann
wdormann at gmail.com
Thu Dec 24 20:17:12 UTC 2020
On 3/13/19 10:27 PM, Stephen Worthington wrote:
> Alternatively, if you want to fix all the problems I found in 18.04's
> lirc package, you can download and run the script I wrote:
>
> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
>
> It fixes lirc-setup, the above problems and probably a few more I have
> forgotten about. It needs to be run with sudo or as root.
Reviving an old thread here...
Having some spare time, I decided to take the plunge to upgrade my
MythTV box running the soon-to-be-unsupported Ubuntu 16.04.
The upgrade appeared to go without error.
And the above script did indeed get lirc installed OK.
The problem I noticed is that after the upgrade, lirc didn't work.
There was no /dev/lirc0 device.
After noticing a new /etc/lirc/lirc_options.conf file, I was able to get
/dev/lirc0 to appear by changing the following lines:
[modinit]
code = /bin/setserial /dev/ttyS0 uart none
code1 = /sbin/modprobe serial_ir
But still no response to the remote, or even irw.
But cat /dev/lirc0 *did* show data with each keypress on the remote, so
that was promising.
After a bit of searching, I realized that there is a script with
more-modern lirc called lirc-old2new. But it errored out on me:
$ sudo /usr/share/lirc/lirc-old2new
Traceback (most recent call last):
File "/usr/share/lirc/lirc-old2new", line 247, in <module>
main()
File "/usr/share/lirc/lirc-old2new", line 234, in main
options_conf = get_lircd_options(hardware_conf, etcdir)
File "/usr/share/lirc/lirc-old2new", line 134, in get_lircd_options
and hardware_cf['modules']:
KeyError: 'modules'
Apparently this script was looking for a MODULES= line in my
hardware.conf file, which mine didn't have. Adding it to my file
allowed lirc-old2new to complete. It created a
lircd.conf.d/lirc-old.conf file with my remote settings. But sadly now
there's not even a /dev/lirc0 device anymore. Good thing I saved a copy
of my partially-working lirc_options.conf file from my step above.
In the end, lirc now works! But it wasn't trivial.
1) Apparently in going from Ubuntu 16.04 -> 18.04 doesn't even result in
a working lirc at all. Stephen's script above takes care of this quite
nicely.
2) Once you do get a working lirc, the upgrade doesn't actually
configure it the way it was set up before. Nobody wants to set up lirc
from scratch again if it was already working before. I was able to do
this using what I described above.
I'm sharing this information in case somebody else is wondering about
lirc after an OS upgrade. FWIW, here's my lirc_options.conf file in
its entirety:
-----
# These are the default options to lircd, if installed as
# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
# manpages for info on the different options.
#
# Some tools including mode2 and irw uses values such as
# driver, device, plugindir and loglevel as fallback values
# in not defined elsewhere.
[lircd]
nodaemon = False
driver = default
device = auto
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
#effective-user =
#listen = [address:]port
#connect = host[:port]
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...
[lircmd]
uinput = False
nodaemon = False
[modinit]
code = /bin/setserial /dev/ttyS0 uart none
code1 = /sbin/modprobe serial_ir
# code2 = ...
# [lircd-uinput]
# add-release-events = False
# release-timeout = 200
# release-suffix = _EVUP
-----
-WD
More information about the mythtv-users
mailing list