[mythtv-users] Calling all lirc gurus

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Dec 23 16:36:08 UTC 2018

On Sun, 23 Dec 2018 16:03:52 +0100, you wrote:

>On 23/12/18 05:51, Stephen Worthington wrote:
>> On Sun, 23 Dec 2018 03:15:41 +0000, you wrote:
>>> Hi All,
>>> 	I just upgraded my mythbuntu system from 16.04.5 to 18.04 and it was impressively smooth.
>>> 	However, I have two issues with my lirc setup, after reading a lot of misinformation about 
>>> 	removing lirc, I discovered that the lirc config files changed format radically and just needed
>>> 	some manual rewriting.
>>> 	I followed the instructions at lirc.org, as best I could, to update the appropriate files. 
>lirc.org is fine. However, have you found
>/usr/share/doc/lirc/README.Debian, the official migration docs?

No such file.

>>> 	BTW I'm running version 0.10.0[1207] of lirc (the standard one that came with 18.04).
>>> 	I now have a working remote (again) with these two annoyances:
>>> 		1) After booting up the first key pressed on the remote repeats endlessly.
>>> 		2) The KEY_SLEEP key on the remote is somehow causing the system to sleep.
>>> 	Problem 1) is cured, temporarily, by hitting any key on the keyboard and after that the remote works 
>>> 	perfectly aside from problem 2).
>>> 	Problem 2) In my 16.04.5 setup hitting KEY_SLEEP on my remote called the irexec 
>>> 	daemon which was configured to run a script using home-assistant. I don't 
>>> 	ever want the system to actually sleep. I want to use the remote's KEY_SLEEP key 
>>> 	to talk to irrexec. Any ideas what is causing the KEY_SLEEP to get past irexec?'
>The problem with using the devinput driver is that you are at the mercy
>of the kernel decoding and pre-processing. The KEY_SLEEP issue is almost
>certainly because of this, and since I'm a lirc guy I would say the same
>also for rhe first issue.

It can be useful to be able to use the kernel processing of keys.
Since you have KEY_SLEEP working, it is quite likely that you also
have the volume buttons on your remote also working when there is no
program using lirc.  Try shutting down mythfrontend and see if using
the volume buttons does anything.  On my laptop, when mythfrontend is
not running, I get the xfce volume change popup which makes it easy to
set the system volume.

I would love to work out just how to control the system use of keys

>If you used to use the default driver i. e. if you had a working
>lircd.conf file it might make sense to use the default driver instead.
>This way you should completely bypass the kernel decoding and could only
>blame lirc.
>> It sounds like you are using lirc by manually setting up the config
>> files, rather than using the Python config programs.  That does work,
>> but there are still a couple of problems you can run into.  I would
>> recommend that you run my script that fixes all the 18.04 lirc
>> problems I know about, including getting the Python config programs to
>> work:
>> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
>The lirc-config program could also be made functional by adding  missing
>symlinks, something like:
>    # libdir=/usr/lib/x86_64-linux-gnu/python3.6/site-packages
>    # cp /usr/share/lirc/python-pkg/config.py $libdir/lirc
>    # ln -s $libdir/lirc /usr/lib/python3/dist-packages/
>    # ln -s $libdir/lirc-setup /usr/lib/python3/dist-packages/

Maybe, but as I recall there was at least one .so file that was simply
not present.  Which is why I had to get my script to install and
compile the lirc source, to generate the missing file(s).  I do not
think it was needed for the daemons, just for the Python config

>> That may fix your problem where a key autorepeats - for me, that was
>> caused by extra lirc daemons being run by systemd (lircmd,
>Probably not...
>> lircd-uinput) 
>Might certainly be a problem, fix by:
>    # systemctl disable --now lircd-uinput.service
>BTW: these issues (non-functional lirc-config, default enable of
>lircd-uinput.service) are fixed in recent debian updates.

Good, but there is no sign of a Ubuntu version of the fixes yet.


More information about the mythtv-users mailing list