RC stop working after upgrade from 7.95.1 to 8

  • Hi,

    I've a Terratec USB Cinergy HTC Stick which stopped working when I upgraded my install from 7.95.1 to 8.0. I've already read other post related to Remote Control issue, but, I did not find a simple guide to solved my issue:

    ir-keytable seems to be OK:

    > Found /sys/class/rc/rc0/ (/dev/input/event14) with:
    > Driver em28xx, table rc-nec-terratec-cinergy-xs
    > Supported protocols: rc-5 nec rc-6
    > Enabled protocols: nec
    > Name: 1-4: em2884#0 IR
    > bus: 3, vendor/product: 0ccd:00b2, version: 0x0001
    > Repeat delay = 500 ms, repeat period = 125 ms


    evtest seems to be OK too:
    > evtest /dev/input/event14
    > Input driver version is 1.0.1
    > Input device ID: bus 0x3 vendor 0xccd product 0xb2 version 0x1
    > Input device name: "1-4: em2884#0 IR"
    > Supported events:
    > Event type 0 (EV_SYN)
    > Event type 1 (EV_KEY)
    > Event code 2 (KEY_1)
    > Event code 3 (KEY_2)
    > Event code 4 (KEY_3)
    > ...


    But when I press a button, I've no effect on kodi interface.

    What are the next steps I should check?

    Thanks,

    Vink

  • Hi,

    Even ir-keytable seems to work:

    <code>
    # ir-keytable -t
    Testing events. Please, press CTRL-C to abort.
    1487877371.650756: event type EV_MSC(0x04): scancode = 0x1402
    1487877371.650756: event type EV_KEY(0x01) key_down: KEY_1(0x0001)
    1487877371.650756: event type EV_SYN(0x00).
    1487877371.754081: event type EV_MSC(0x04): scancode = 0x1402
    1487877371.754081: event type EV_SYN(0x00).
    1487877371.857443: event type EV_MSC(0x04): scancode = 0x1402
    1487877371.857443: event type EV_SYN(0x00).
    1487877372.114018: event type EV_KEY(0x01) key_up: KEY_1(0x0001)
    1487877372.114018: event type EV_SYN(0x00).
    </code>

    How can I set libreelec to use ir-keytable?

    When I compare dmesg between the two version, one difference is the device name:

    -input: em28xx IR (em2884 #0) as /devices/pci0000:00/0000:00:14.0/usb1/1-4/rc/rc0/input18
    -rc rc0: em28xx IR (em2884 #0) as /devices/pci0000:00/0000:00:14.0/usb1/1-4/rc/rc0
    +input: 1-4: em2884#0 IR as /devices/pci0000:00/0000:00:14.0/usb1/1-4: em2884#0/rc/rc0/input18
    +rc rc0: 1-4: em2884#0 IR as /devices/pci0000:00/0000:00:14.0/usb1/1-4: em2884#0/rc/rc0

    May blank char create the issue?

    Regards,

    Vink

    Edited once, last by vink78 (February 23, 2017 at 8:55 PM).

  • Hi. I've upgraded to 8.0.1, issue is still there (remote control no more working):

    LibreELEC (official) Version: 8.0.1
    LibreELEC:~ # ps waux|grep lircd
    267 root 0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
    768 root 0:00 {kodi.sh} /bin/sh /usr/lib/kodi/kodi.sh --standalone -fs --lircdev /run/lirc/lircd
    773 root 0:08 /usr/lib/kodi/kodi.bin --standalone -fs --lircdev /run/lirc/lircd
    906 root 0:00 grep lircd
    LibreELEC:~ # ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event14) with:
    Driver em28xx, table rc-nec-terratec-cinergy-xs
    Supported protocols: rc-5 nec rc-6
    Enabled protocols: nec
    Name: 1-4: em2884#0 IR
    bus: 3, vendor/product: 0ccd:00b2, version: 0x0001
    Repeat delay = 500 ms, repeat period = 125 ms

    LibreELEC:~ # ls -la /dev/lirc*
    ls: /dev/lirc*: No such file or directory
    LibreELEC:~ # ls -la /storage/.cache/services/
    total 16
    drwxr-xr-x 2 root root 4096 Mar 26 18:20 .
    drwxr-xr-x 10 root root 4096 Feb 23 18:20 ..
    -rw-r--r-- 1 root root 0 Mar 26 18:20 avahi.conf
    -rw-r--r-- 1 root root 0 Mar 26 18:20 crond.conf
    -rw-r--r-- 1 root root 96 Mar 26 18:20 samba.conf
    -rw-r--r-- 1 root root 41 Mar 26 18:20 sshd.conf


    LibreELEC:~ # ls -la /storage/.config/
    total 72
    drwxr-xr-x 14 root root 4096 Mar 26 18:18 .
    drwxr-xr-x 28 root root 4096 Mar 26 18:01 ..
    -rw-r--r-- 1 root root 1940 Jan 23 22:17 97-xorg.rules
    drwxr-xr-x 2 root root 4096 Jun 2 2015 aacs
    -rw-r--r-- 1 root root 282 Jun 2 2015 hosts.conf
    drwxr-xr-x 2 root root 4096 Jun 2 2015 hwdb.d
    -rw-r--r-- 1 root root 0 Mar 26 18:18 lircd.conf
    drwxr-xr-x 2 root root 4096 Jun 2 2015 modprobe.d
    drwxr-xr-x 2 root root 4096 Jun 2 2015 modules-load.d
    drwx------ 2 root root 4096 Mar 26 18:20 pulse
    drwxr-xr-x 2 root root 4096 Nov 20 21:42 pulse-daemon.conf.d
    drwxr-xr-x 2 root root 4096 Feb 23 21:44 rc_keymaps
    -rw-r--r-- 1 root root 720 Mar 26 18:02 rc_maps.cfg.sample
    -rw-r--r-- 1 root root 3860 Jun 2 2015 samba.conf.sample
    drwxr-xr-x 2 root root 4096 Jun 2 2015 sysctl.d
    drwxr-xr-x 5 root root 4096 Feb 23 21:24 system.d
    drwxr-xr-x 2 root root 4096 Jun 2 2015 tmpfiles.d
    drwxr-xr-x 2 root root 4096 Feb 23 21:44 udev.rules.d
    drwxr-xr-x 2 root root 4096 Jun 2 2015 vpn-config

    systemctl -a -> NYWU
    dmesg -> DbVc
    journalctl -> cERJ
    lsmod -> HWgE

    Edited once, last by vink78 (March 26, 2017 at 5:25 PM).

  • Ok. Using comments done by HiassofT on another thread, I've done some progress:

    I've download a sample lircd.conf found here: lircd.conf.devinput (I only use the first remote definition).

    I've started lircd:
    /usr/sbin/lircd -H devinput --device=/dev/input/event14 --output=/run/lirc/lircd-lirc0 --pidfile=/run/lirc/lircd-lirc0.pid --release=_LIRCUP /storage/.config/lircd.conf.devinput

    Then, I run this script:
    /usr/sbin/lircd-uinput -R 250 -a --release=_LIRCUP /run/lirc/lircd-lirc0

    Now, keys seem to work :angel:

    Next step will be to write an autostart script

    Edited once, last by vink78 (March 26, 2017 at 8:06 PM).


  • I've a Terratec USB Cinergy HTC Stick which stopped working when I upgraded my install from 7.95.1 to 8.0. I've already read other post related to Remote Control issue, but, I did not find a simple guide to solved my issue:

    ir-keytable seems to be OK:

    > Found /sys/class/rc/rc0/ (/dev/input/event14) with:

    Could you please post the output of

    Code
    udevadm info -a -n /dev/input/event14


    First check the exact event number via ir-keytable, it might change, so you'll have to adjust the command above.

    so long,

    Hias


  • I've posted the output of udevadm here: GIGX

    Thanks! The output looks OK and the remote should have been picked up by eventlircd (or kodi). Very strange, not sure what's going on there.

    Could you try the following:

    Unplug the Terratec receiver, then power up your libreelec box. When it's up ssh in and run these commands:

    Code
    systemctl stop kodi
    systemctl stop eventlircd
    udevadm control -l debug
    /usr/sbin/eventlircd -vvv -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd

    Then plug in your Terratec receiver. After a few seconds eventlircd should have detected the IR receiver and output some info. If it succeeded it should look like this:

    Code
    eventlircd[801]: /etc/eventlircd.d/default.evmap: using 0 valid keyboard shortcut mappings
    eventlircd[801]: input device /dev/input/event3: events of unsupported event type EV_MSC will be discarded
    eventlircd[801]: input device /dev/input/event3: event code 0x04 of unsupported event type EV_MSC will be discarded
    eventlircd[801]: input device /dev/input/event3: events of unsupported event type EV_REP will be discarded
    eventlircd[801]: input device /dev/input/event3: grabbed

    Then stop eventlircd with CTRL-C and post the output you got on the terminal and the journal

    Code
    journalctl -a | paste

    so long,

    Hias

    Edited once, last by HiassofT (March 28, 2017 at 5:52 PM).

  • Ok. maybe libreelec detect the wrong device?

    Code
    LibreELEC:~ #  /usr/sbin/eventlircd -vvv -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
    eventlircd[966]: /etc/eventlircd.d/default.evmap: using 0 valid keyboard shortcut mappings
    eventlircd[966]: input device /dev/input/event2: grabbed

    This text was displayed before I plug my device. No more text was displayed after I plugged it.

    journalctl -> dZDA

    Edited once, last by vink78 (March 28, 2017 at 6:47 PM).


  • Ok. maybe libreelec detect the wrong device?

    Code
    LibreELEC:~ #  /usr/sbin/eventlircd -vvv -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
    eventlircd[966]: /etc/eventlircd.d/default.evmap: using 0 valid keyboard shortcut mappings
    eventlircd[966]: input device /dev/input/event2: grabbed

    This text was displayed before I plug my device. No more text was displayed after I plugged it.

    journalctl -> dZDA


    Saw in the log that you also had lircd running. Could you repeat the test with lircd/lircd-uinput disabled?

    The "/dev/input/event2: grabbed" output is normal, this is eventlircd handling your powerbutton. But in addition to that event14 should be listed there, too after you plugged in the receiver. Could be that lircd grabbed the input device before eventlircd, therefore the need to run the test without lircd in the background.

    so long,

    Hias

    Edited once, last by HiassofT (March 28, 2017 at 7:16 PM).


  • Saw in the log that you also had lircd running. Could you repeat the test with lircd/lircd-uinput disabled?

    It was my custom autostart script:

    Code
    /usr/sbin/lircd -H devinput --device=/dev/input/event14 --output=/run/lirc/lircd
    -lirc0 --pidfile=/run/lirc/lircd-lirc0.pid --release=_LIRCUP /storage/.config/li
    rcd.conf
    /usr/sbin/lircd-uinput -R 250 -a --release=_LIRCUP /run/lirc/lircd-lirc0 &

    I've killed these two process before starting eventlircd, and, before plugged in the USB stick:

    Code
    Mar 28 19:42:54 LibreELEC lircd-0.9.4c[749]: Info: closing '/dev/input/event14'
    Mar 28 19:43:36 LibreELEC eventlircd[966]: /etc/eventlircd.d/default.evmap: using 0 valid keyboard shortcut mappings
    Mar 28 19:43:55 LibreELEC kernel: usb 1-4: new high-speed USB device number 6 using xhci_hcd

    Edited once, last by vink78 (March 28, 2017 at 7:28 PM).


  • I've killed these two process before starting eventlircd, and, before plugged in the USB stick:

    Code
    Mar 28 19:42:54 LibreELEC lircd-0.9.4c[749]: Info: closing '/dev/input/event14'


    Ah, sorry, I've missed that before.

    Logs and config all look fine: the eventlircd udev rule is processed correctly by udevd (it calls wakeup_enable) but for some reason eventlircd doesn't want to pick up the input device.

    I ran an identical test on my RPi with a Hauppauge USB dongle and eventlircd picked up the input device just fine.

    Very odd, no idea what's going wrong here - maybe I missed something or maybe there's a bug hiding somewhere.

    So until we have a better fix just stick to the lircd devinput workaround, at least this seems to be working fine :)

    so long,

    Hias