LibreElec + Cinergy DVB-S2 Dual Tuner + Terratec Remote generates double key events

  • My Cinergy s2 card has an issue with double key events. I basically located the root cause but I don't know how to config what to avoid the double key event issue.

    Problem: The card generates two similar ir devices, the only different is rc0 / rc1 resp. the device eventx / event y. ir-keytable sows the following:

    I have successfully loaded a keytable and modified the rc_maps.cfg. But irw and kodi generate double key events if I press a button once on the remote:

    I found out, that the keytable is loaded automatically for both devices rc0 and rc1, but I have just one remote. The output from ir-keytable -r -s rc0 is identical to ir-keytable -r -s rc1. if I clear the keytable for rc1 (ir-keytable -c -s rc1), everythings works fine.

    Code
    LibreELEC:/usr/lib/udev/rules.d # ir-keytable -c -s rc1
    Old keytable cleared
    LibreELEC:/usr/lib/udev/rules.d # irw
    160 0 KEY_OK devinput
    67 0 KEY_UP devinput
    6c 0 KEY_DOWN devinput
    69 0 KEY_LEFT devinput
    6a 0 KEY_RIGHT devinput

    Currently I have no idea how to disable either rc1 oder load the keytable only for rc0.

    Any help is appreciated.

    Thanks

  • I've changed the title for you to make it more "interesting" for other users.

    1) We know it's LE - that's why you're here,

    2) Cinergy DVB-S2 Dual Tuner shouldn't be relevant.

    However, a good explanation of the issue.

    Have you searched for "double key press" ?

  • I've changed the title for you to make it more "interesting" for other users.

    1) We know it's LE - that's why you're here,

    2) Cinergy DVB-S2 Dual Tuner shouldn't be relevant.

    I beg to differ, Cinergy DVB-S2 Dual Tuner could be very relevant - could you change the title back?

    This is nothing I've seen before, as 2 IR devices are created and as they are identical the same configuration will be applied to both devices - and both will decode the signals thus giving double button presses.

    Unless the device really should have 2 IR receivers (which would be very strange) I suspect this could be a driver bug and should be reported upstream.

    finsher which LE version are you using, and which platform? Are you using the CrazyCat / TBS drivers or the standard kernel drivers?

    The easiest workaround is to add "ir-keytable -s rc1 -c" to .config/autostart.sh for now.

    so long,

    Hias

  • Thanks for changing this title back. As Hias wrote, that is espically related to this kind of dual tuner card. There was a similar issue, mentioned in the German vdr forum. I don't know if I am allowed to past other forum links, here is it: vdr-forum Link. Unfortunaltely this does not help me.

    Back to your question: it is an Intel Atom 525 based mini PC with the Zotac IONITX S-E mainboard. The system is LE 8.2.5

    I am using the standard kernel driver, lirc is disabled in Kodi. The card has one remote receiver plug for only one remote. This card is identical to the TeVii 480/482. Here is a picture of this card: 11004xl-1.jpg


    I will try adding "ir-keytable -s rc1 -c" to .config/autostart.sh as a workaround, but I am supporting as good as I can to fix this issue.

  • Could you test with the latest LE alpha release (currently 8.90.009)?

    By default it uses the official DVB drivers from the Linux kernel. With the driver addon chooser you can switch to 2 alternative sets of DVB drivers: latest drivers from linux kernel is a backport of (currently only a bit) newer official kernel drivers and TBS / CrazyCat add some out-of-tree drivers and patches that are not included in the official Linux kernel. LE 8.2 always used the CrazyCat drivers.

    It would be interesting to know which set of drivers is required for your card and if the IR problem shows up with all of them or only on some specific ones.

    Please also grab dmesg output when testing with the various DVB drivers and post them here (just run "dmesg | paste" and post the URL).

    so long,

    Hias

  • I'll prepare a test with LE 8.90.009 as soon as I can. I have to swap the HDD, since I don't want to tinker with my current system. I'll let you know the results.

  • I did a live test with LE 8.90.009. The rusult from ir-keytable right after the system start:

    Code
    LibreELEC (official): 8.90.009 (Generic.x86_64)
    LibreELEC:~ # ir-keytable
    /sys/class/rc/: No such file or directory
    No devices found
    LibreELEC:~ #

    dmesg | paste result: http://ix.io/1w0l

    To choose other drivers (i.e newer kernel drivers) I have to reboot. I am not sure if it make sense to reboot a live system for a driver change, since the selection might not be stored...?

    lsusb shows at least the card is there:

    Edited once, last by finsher (December 14, 2018 at 9:23 PM).

  • Thanks a lot for the logs!

    As suspected the card isn't supported by the official linux kernel drivers but uses the out-of-tree CrazyCat drivers.This is good to know since we now know whom to bother with this issue.

    I haven't used Live/Run mode myself yet but I thought it would store user/configuration data on the USB stick. So selecting a different DVB driver set might work. Could you give that a try?

    so long,

    Hias

  • Interesting, I haven't done any driver swap in LE 8.2.5...

    The CrazyCat driver package did not install in life boot. I did a clean install on a new hard disk and swapped the driver to CrazyCat. The result is now:

    dmesg | paste can be found here: http://ix.io/1w9x

    The remote is running out of the box, means no special keytable is necessary, but with the same result. One key press will show two key presses.

    Code
    LibreELEC:~ # irw
    67 0 KEY_UP devinput
    67 0 KEY_UP devinput
    6c 0 KEY_DOWN devinput
    6c 0 KEY_DOWN devinput
    69 0 KEY_LEFT devinput
    69 0 KEY_LEFT devinput
    6c 0 KEY_DOWN devinput
    6c 0 KEY_DOWN devinput

    I compared the results between ir-keytable -r -s rc0 and ir-keytable -r -s rc1, both are equal. Clearing the keytable with ir-keytable -c -s rc1 shows the same effect as in 8.2.5: One press, one result.

    Code
    LibreELEC:~ # irw
    67 0 KEY_UP devinput
    6c 0 KEY_DOWN devinput
    69 0 KEY_LEFT devinput
    6a 0 KEY_RIGHT devinput
    160 0 KEY_OK devinput

    I have seen, that the lirc driver is loaded. I am not able to disable lirc, since the menu item in Kodi is not available anymore.

  • Thanks a lot for testing and the logs, everything's fine (except that the CrazyCat driver registers IR devices for both of the 2 receivers).

    The lirc device is fine, you usually get it with IR receivers (the Lirc option in LE 8.2 settings controlled the lircd userspace daemon, this is something different).

    crazycat I think this could be fixed by registering an rc-core device only for one of the 153b:1181 / 153b:1182 USB devices. Looks like the IR receiver is connected to both of the devices on the dual tuner card so enabling IR on both of them results in doubled IR events. Can you have a look at that?

  • crazycat I think this could be fixed by registering an rc-core device only for one of the 153b:1181 / 153b:1182 USB devices. Looks like the IR receiver is connected to both of the devices on the dual tuner card so enabling IR on both of them results in doubled IR events. Can you have a look at that?

    so IR sensor connected to both Cypress FX2 ?