[mythtv-users] StreamZap/LIRC stopped working

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Jun 7 10:49:11 UTC 2022


On Sun, 5 Jun 2022 17:21:26 -0400, you wrote:

>On 2022-06-04 1:25 a.m., Stephen Worthington wrote:
>> On Fri, 3 Jun 2022 23:30:33 -0400, you wrote:
>>
>>> Hello all,
>>>
>>> I know this issue isn't directly related to MythTV but I'm hoping
>>> someone on the list with the same hardware and OS could help me
>>> troubleshoot this issue.
>>>
>>> I've been using a StreamZap remote and USB IR receiver to control MythTV
>>> via LIRC for years. It hasn't really given me any problems. A recent
>>> Fedora 35 update broke things. LIRC is not registering any key presses
>>> even though I can see the red indicator on the IR receiver blink every
>>> time I press a button on the remote. I can't pinpoint the exact update
>>> that broke things because it took me a while to notice the remote wasn't
>>> working.
>>>
>>> Right now I'm running Fedora 35 (5.17.11-200.fc35.x86_64) with
>>> lirc-core-0.10.0-32.fc35.x86_64 on my combined MythTV FE/BE.
>>>
>>> If I stop lircd and run mode2, I can see all the key presses. If I start
>>> lircd and run irw, I see nothing. No errors are logged - everything
>>> appears to be running properly.
>>>
>>> I've uninstalled and reinstalled LIRC. It's a pretty simply set up:
>>>
>>> - lsusb shows: Bus 001 Device 006: ID 0e9c:0000 Streamzap, Inc.
>>> Streamzap Remote Control
>>> - streamzap and rc_streamzap modules are loaded load
>>> - /etc/lirc/lirc_options.conf is stock except for two changes:
>>>     driver = default
>>>     device = /dev/lirc0
>>> - /etc/lirc/lircd.conf.d/streamzap.lircd.conf was created using the
>>> config found here:
>>> https://github.com/graysky2/streamzap/blob/master/00-Streamzap_PC_Remote.conf
>>>
>>> mode2:
>>> Using driver default on device /dev/lirc0
>>> Trying device: /dev/lirc0
>>> Using device: /dev/lirc0
>>> Warning: Running as root.
>>> (codes displayed with each key press)
>>>
>>> systemctl start lircd (starts successfully with no errors)
>>>
>>> irw:
>>> (nothing!)
>>>
>>> I've gone over /etc/lirc/lircd.conf.d/streamzap.lircd.conf with a fine
>>> tooth comb and there's nothing wrong with it. It's worked for me for
>>> years and it's the same as others that I've found with a bit of Googling.
>>>
>>> I installed a fresh copy of Fedora 36 on a different machine and moved
>>> the USB IR receiver over. I configured it exactly as above - same
>>> outcome, mode2 looks normal but nothing out of irw,
>>>
>>> I then moved the USB IR receiver over to a Raspberry Pi (Linux
>>> RaspberryPi 5.15.32-v7+), installed LIRC, and applied the same
>>> configuration as above and it worked. So I know the USB IR receiver and
>>> remote control are fine.
>>>
>>> Has anyone seen this behaviour with StreamZap+LIRC on Fedora? Any hints
>>> on how to fix or even troubleshoot this one?
>>>
>>> Thanks
>>>
>>> Gary
>> How old was the version of lirc that was working?  There was a major
>> change in how lirc works, where a lot of the drivers were moved to the
>> kernel.  The first page Google found for "streamzap lirc":
>>
>> https://github.com/graysky2/streamzap
>>
>> says that you should be using the devinput driver, which is the kernel
>> driver for a lot of lirc devices.  If that is what has happened, then
>> you need to completely reconfigure lirc to use the devinput driver.
>> First, run ir-keytable and see if it sees your remote, and then try
>> ir-keytable -t to see if it sees all the keys on your remote (not just
>> the arrow keys and maybe volume and power keys).  Do not use the power
>> key as it is likely to shut down the PC.  If that works, then it is
>> almost certain that you need to be using a devinput configuration.
>> _______________________________________________
>>
>
>Hi Stephen,
>
>I spent some time this weekend doing further research and playing with 
>the devinput driver. No luck. devinput was giving me the same troubles 
>(more even) as the default driver.
>
>Your comment on ir-keytable got me thinking and after a little bit of 
>Googling I was able to dump LIRC altogether. It was much easier than I 
>thought and now everything is working again. I don't use multiple 
>remotes or an IR blaster so I'm not really missing out on LIRC 
>functionality.
>
>dnf erase lirc
>rm -r /etc/lirc/
>rm ~mythtv/.mythtv/lircrc
>
>I also had an InputClass section in /etc/X11/xorg.conf.d/10-mythtv.conf 
>to "Ignore Streamzap IR". This was needed to avoid double button presses 
>being registered (I think). Removed that section as well.
>
>dnf install v4l-utils
>cp /lib/udev/rc_keymaps/streamzap.toml /etc/rc_keymaps
>vi /etc/rc_keymaps/streamzap.toml
>[match the MythTV key bindings using my old lircrc file as a reference]
>reboot
>ir-keytable --read
>[don't need this step - just to confirm the new keymap was loaded]
>
>My remote control is now working again with MythTV again and without 
>relying on LIRC. Looks LIRC hasn't been updated since 2017 so I suspect 
>that these types of weird issues will crop up more frequently as kernel 
>changes break old code.
>
>Thanks for your help!
>Gary

Using ir-keytable directly is certainly easier than configuring lirc,
as long as you are not wanting to use the IR remote with more than one
program, and you do not want to be able to control the autorepeating.
I use my remote with MythTV, mplayer, irexec and my own epgdiff
program, so that would not work for me.  I also customise the
autorepeating.

For future reference, I have now installed lirc and MythTV v31 on a
VirtualBox Fedora 36 and configured lirc to work with my USB PCTV Nano
Stick tuner.  Its IR receiver uses the devinput driver and works with
RC5 and RC6 remotes.  I configured it for RC5 and my Hauppauge remote
and it all worked as expected.  The Fedora lirc package does not have
any of the problems that the Ubuntu one does - it works properly as
installed, although it does not have the lirc-setup Python GUI config
program that normally comes with lirc.  But that does not really
matter as you can easily configure /etc/lirc_options.conf manually,
and in fact the default settings just worked for me.

Configuring lirc is fairly easy for me now as I just copy the
configuration from a working system.  Getting a working configuration
for a remote takes a fair bit of tedious work making sure each
keystroke does the right thing at each step of the configuration
(ir-keystroke -t, irw, ircat, MythTV keybindings), but once done new
versions of lirc or distro upgrades need only minor tweaks (if any).

Your problem with doubled keystrokes is normally caused by having
lircd-uinput running without being configured properly.  That causes
there to be two different paths for IR inputs to be sent along, so you
get two copies of the same input.  I have never heard of using the
"Ignore" option in xorg.conf as a workaround, but it must block one
input stream.  In Ubuntu lircd-uinput is enabled by default and causes
this problem for everyone until it is disabled, but the Fedora 36 lirc
defaults it to disabled.

You can also get doubled IR keystrokes from having lirc not running or
not configured properly and ir-keytable not configured - X programs
can then get keystrokes via the normal keyboard input path, and also
via X.


More information about the mythtv-users mailing list