Remote woes after updating to 9.2.1

  • Hi folks,

    I'm using Zotac zbox ID80 as my media center (Intel Atom + Nvidia GT520M) which has been working flawlessly for years. I've upgraded from LE 7.x to 9.2.1 and I'm having issues with the remote control. The main reason for the update was that we got a WeTek Hub as the player in another room and I'd like them to share the same video library.

    At first the upgrade borked the remote control so that only about every second keypress was registered, then I've decided to just do a clean install, which is where I'm at right now.

    The remote is the Zotac MCE remote that came with the box, IR receiver as well. It shows up as:

    Bus 003 Device 003: ID 0471:20cc Philips (or NXP)

    After the clean install the remote works, but most of the buttons don't! I've installed the keymap editor plugin and tried to set them up but even then the buttons don't do anything. For example fast forward, reverse, skip, next chapter, pause... none of them work. The only button that seems to work when playing video is stop. :(

    I've tried setting up rc_maps.cfg since I've seen zotac in /usr/lib/udev/rc_keymaps/ but when I try "ir-keytable -a /storage/.config/rc_maps.cfg" I just get:

    /sys/class/rc/: No such file or directory

    No devices found

    However:

    LibreELEC:~ # ir-keytable -d /dev/input/event5

    Name: PHILIPS MCE USB IR Receiver- Spi

    bus: 3, vendor/product: 0471:20cc, version: 0x0100

    So the device is there, but ir-keytables doesn't see it. Am I missing a driver and how to install it?

    Can someone help me get to the bottom of this, or point me in the right direction? It's been years since I've been messing with LE settings.

    Thanks!

    Edited 2 times, last by Crotach (March 20, 2020 at 4:38 PM).

  • This is so frustrating. I have several remotes lying around, each with their own receiver, so I've tried them all at this stage and none of them work, or rather they all behave in exactly the same way as the zotac remote. The arrow keys and ok button work, as well as stop button. Nothing else. Can't pause, can't fast forward, reverse, etc.

    I've tried Minix A2 and another remote that I don't even know what it's called :) I thought Minix would work out of the box, but no.

  • Your USB receiver (0471:20CC is a Philips spinel plus) is hardwired to the remote it cane with and can't be configured via ir-keytable (or lirc).

    So just use keymapping in Kodi, there's not much else you can configure.

    If that doesn't work we need a debug log that shows you pressing working and non-working buttons.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    so long,

    Hias

  • Hi,

    I've used the built-in log uploader and it produced this URL: http://ix.io/2eOT

    And once again via SSH:

    LibreELEC:~ # paste /storage/.kodi/temp/kodi.log

    http://ix.io/2eOU

    LibreELEC:~ # dmesg | paste

    http://ix.io/2eOV

    I've mapped some keys to the remote (fast forward, reverse, pause, next and previous) to test, played a video and tried to control the playback. I don't know if the keypresses are anywhere in the logs, I guess not, but the problem is there. None of the keys work except stop.

    I'm using the keymap editor addon for this.

    In the logs I see tons of lircd errors but I don't know what they mean or how to fix them.

    I've tried several remotes at this stage:

    1) Zotac ID80 remote (from the box)

    2) Minix A2 Lite

    3) Rii Mini i25

    4) Rii i8

    Any help would be much appreciated! :)

  • This was not a debug log so unfortunately pretty useless.

    I'd suggest you do a different test, to check if the IR receiver sends proper input events (that's the lowest level we can look at).

    First install the "System Tools" addon from the LibreELEC repository (it's in the "Programs" section).

    Then ssh in and stop both kodi and eventlircd:

    Code
    systemctl stop kodi
    systemctl stop eventlircd

    Now run evtest which should print a number of input devices together with their description. You probably have 3 from your Spinel Plus IR receiver, start with the "Keyboard" one, and test the other ones later.

    Then press a "working" button, you should get some output on the screen like this:

    Code
    Event: time 1584797019.747427, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
    Event: time 1584797019.747427, type 1 (EV_KEY), code 103 (KEY_UP), value 1
    Event: time 1584797019.747427, -------------- SYN_REPORT ------------

    After that press a non-working button, you might also see some screen output - please post it plus the info which button you pressed.

    If you didn't get any screen output on a button press then it may be that it's delivered via one of the other input devices, so check them, too with evtest.

    so long,

    Hias

  • Thanks for your help mate. I've downgraded to LE 9.0.2 (clean install again) and it seems to work fine with the Minix A2 remote, so I've left it at that.

    I copied the keyboard.xml and mouse.xml from another thread specifically for the Minix and I'll leave it at that, the box works and I'm afraid to upgrade now :)

  • Hi all,

    I've got the same problem here. It's the remote included with a Zotac ID81 & included external USB IR receiver. Was working fine under OpenElec 7.0.1. Upgraded to a fresh & clean install of LibreElec 9.2.2, and most of the "special" buttons (e.g. Windows button, Teletext button) don't work.

    From dmesg:

    Code
    [    2.987188] usb 2-1.4: new low-speed USB device number 6 using ehci-pci
    [    3.109769] input: PHILIPS MCE USB IR Receiver- Spinel plus Keyboard as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:0471:20CC.0004/input/input9
    [    3.164205] input: PHILIPS MCE USB IR Receiver- Spinel plus System Control as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:0471:20CC.0004/input/input10
    [    3.164305] input: PHILIPS MCE USB IR Receiver- Spinel plus Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:0471:20CC.0004/input/input11
    [    3.164440] hid-generic 0003:0471:20CC.0004: input,hiddev97,hidraw3: USB HID v1.00 Keyboard [PHILIPS MCE USB IR Receiver- Spinel plus] on usb-0000:00:1d.0-1.4/input0

    Further details:


    As far as I can tell, the LibreElec kernel might be using the wrong driver? Should this be mceusb, instead of hid-generic?

    I've tried manually unbinding & binding to mceusb:

    Code
    # modprobe mceusb
    # echo -n "2-1.4:1.0" > /sys/bus/usb/drivers/usbhid/unbind
    # echo -n "2-1.4:1.0" > /sys/bus/usb/drivers/mceusb/unbind 
    sh: write error: No such device 

    I noticed there was a patch in OpenElec, which was removed in LibreElec in 2018?

    Any assistance appreciated...

    Cheers,

    Peter

  • Thanks for the detailed test info!

    The patch you linked never made it upstream and as it was constantly breaking with kernel updates we had to drop it.

    The "topseed" HID driver seems to be rather similar to the old one (using the same 0xffbc vendor page and almost identical keycodes) so you could try binding this driver to your IR receiver. mceusb is a completely different thing and won't work at all.

    An alternative would be to use the zotac driver in lirc, see this older thread for more info [xbmcbuntu] [SOLVED] some buttons not working PHILIPS MCE USB IR Receiver-Spinel plus

    The lirc zotac driver is already shipped with LibreELEC so you can skip all the compilation stuff in that thread. But there are a couple of things to be aware of:

    You may need to add "usbhid.quirks=0x0471:0x20CC:0x10" to the end of kernel command line (in /flash/syslinux.cfg or /flash/extlinux.conf on X86) to get the /dev/usb/hiddevX device).

    As mentioned in the thread the udev rule has to be modified for newer kernels, in LibreELEC creating a /storage/.config/udev.rules.d/99-zotac.rules file with the following content should work (this will give you a /dev/remote symlink as the hiddevX number may change)

    Code
    SUBSYSTEM=="usbmisc" , ACTION=="add", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="20cc", SYMLINK+="remote"

    Then, to use the zotac lirc driver you have top copy /etc/lirc/lirc_options.conf to /storage/.config/lirc_options.conf, edid it and change driver from "default" to "zotac" and device from "/dev/lirc0" to "/dev/remote"

    Finally copy the lircd.conf file from that thread to /storage/.config/lircd.conf and reboot.

    If you get double buttonpresses from the previous working buttons just comment out these button/keycode lines in the lircd.conf file and only leave those with 0xFFBC... codes in there.

    so long,

    Hias

  • Hello,

    I do have the same thing. when upgrading to everything higher than 9.0.2 ( incl. Betas) some Remote Buttons (Hama MCE and X10) are not working anymore.

    Kaymap editor is useless the buttons are getting not recognized anymore. I don't know what was changed from that point on.

    If I downgrade to 9.0.2 every button works again.

    Maybe someone can explain what was changed after 9.0.2?

    Regards

    Nicolas

  • Wow, thanks HiassofT !

    Alas, I don't think I've made any progress.

    I've followed most of the instructions in [xbmcbuntu] [SOLVED] some buttons not working PHILIPS MCE USB IR Receiver-Spinel plus - starting from Step 5, intermixed with your notes above.

    5. "InputClass" section added to /usr/share/X11/xorg.conf.d/10-evdev.conf by copying /usr/share/X11/xorg.conf.d to /storage/.config/, adding to 10-evdev.conf; then bind mounting /storage/.config/xorg.conf.d to /usr/share/X11/xorg.conf.d. Followedup by a systemctl restart xorg && systemctl restart kodi

    6. Replaced with 99-zotac.rules from above Noting the , RUN+="/sbin/initctl --quiet emit --no-wait ir-ready" is missing from above

    6. - Config files - Omitted /etc/lirc/hardware.conf. lirc_options.conf amended as above; lircd.conf copied from referenced thread.


    Rebooted; and repeated Step 5 (since the bind mount will disappear over the reboot).


    Step 5 definitely got Xorg to ignore the devices: - from /var/log/Xorg.0.log:

    Code
    [   794.241] (II) config/udev: Adding input device PHILIPS MCE USB IR Receiver- Spinel plus Consumer Control (/dev/input/event7)
    [   794.241] (**) PHILIPS MCE USB IR Receiver- Spinel plus Consumer Control: Ignoring device from InputClass "PHILIPS MCE USB IR Receiver- Spinel plus"
    [   794.243] (II) config/udev: Adding input device PHILIPS MCE USB IR Receiver- Spinel plus Keyboard (/dev/input/event5)
    [   794.243] (**) PHILIPS MCE USB IR Receiver- Spinel plus Keyboard: Ignoring device from InputClass "PHILIPS MCE USB IR Receiver- Spinel plus"
    [   794.245] (II) config/udev: Adding input device PHILIPS MCE USB IR Receiver- Spinel plus System Control (/dev/input/event6)
    [   794.245] (**) PHILIPS MCE USB IR Receiver- Spinel plus System Control: Ignoring device from InputClass "PHILIPS MCE USB IR Receiver- Spinel plus"

    The /dev/remote sylink is definitely there:

    Code
    # ls -l /dev/remote
    lrwxrwxrwx    1 root     root            11 Apr  8 16:26 /dev/remote -> usb/hiddev1

    lircd seemed to be having a fit:

    Code
    # journalctl -x -u lircd |head
    -- Logs begin at Wed 2020-04-08 16:41:59 AEST, end at Wed 2020-04-08 16:53:16 AEST. --
    Apr 08 16:49:05 XBMC lircd_helper[327]: lircd-0.10.1[327]: Error: (zotac_repeat) too many repetitions
    Apr 08 16:49:05 XBMC lircd-0.10.1[327]: Error: (zotac_repeat) too many repetitions
    Apr 08 16:49:05 XBMC lircd_helper[327]: lircd-0.10.1[327]: Info: closing '/dev/remote'
    Apr 08 16:49:05 XBMC lircd-0.10.1[327]: Info: closing '/dev/remote'
    << repeats infinitely >>

    ... which was fixed with

    but irw still won't recognise the "other" scancodes (e.g. Windows key / Teletext):

    Code
    # irw
    67 0 KEY_UP devinput
    6c 0 KEY_DOWN devinput
    << nothing for Windows key >>
    << nothing for Teletext key >>

    Same story in kodi.log.

    I'm not sure lircd is working properly... Did a systemctl stop xorg; systemctl stop kodi; systemctl stop eventlircd; systemctl stop lircd

    Added /etc/lircd/hardware.conf from the referenced thread (again, through a bind mount...)

    systemctl start lircd ... then irw /run/lirc/lircd.socket while journalctl -xf -u lircd in another window.

    Back to:

    Code
    Apr 08 17:12:19 XBMC lircd_helper[3324]: lircd-0.10.1[3324]: Info: removed client
    Apr 08 17:12:19 XBMC lircd_helper[3324]: lircd-0.10.1[3324]: Info: closing '/dev/remote'
    Apr 08 17:12:19 XBMC lircd-0.10.1[3324]: Info: removed client
    Apr 08 17:12:19 XBMC lircd-0.10.1[3324]: Info: closing '/dev/remote'
    << repeats infinitely >>

    ... as soon as irw fires up. Also, irw now doesn't report any scancodes at all... It seems before, it was reading them from eventlircd.

    Ideas? Did I miss something?

    Cheers,

    Peter

  • You can drop the xorg.conf change (not needed as the input device will be grabbed by eventlircd anyways) and the RUN+= you added to the udev rule (that was only needed by fernetmenta's ancient upstart setup - it's not relevant to LE).

    The zotac_repeat error seems to be the real issue here. It's a bug in lirc LIRC / Tickets / #327 plugin zotac broken

    lirc is pretty much unmaintained these days but the bug (and fix) was quite obvious. Could you test with this build?

    LibreELEC-Generic.x86_64-9.2-devel-20200408115852-106a54a.tar

    BTW: if you restart lircd via systemctl you also have to restart lircd-uinput. Better not do that but just reboot, that's safer :)

    so long,

    Hias

  • That build worked perfectly!! I'll have a tinker around with lircd.conf - some of the keys are reporting the same keycode (namely KEY_SLEEP and KEY_WAKEUP are both reporting as KEY_POWER). You were right about the duplicate keypresses, too.

    Will the bug fix patch be integrated into LibreElec for future releases, or is this something I'd need to do with each upgrade?

  • Thanks for reporting back, glad it's working now! The bugfix will be in future LE releases, we already added it to our repository.

    KEY_SLEEP and KEY_WAKEUP are remapped via eventlircd, changing that is a bit tricky.

    Since you got lircd working it might be best to just disable all input from the device and let lircd handle everything - then you can also easily change button mapping.

    Add the following lines to your 99-zotac udev rule file, that will prevent eventlircd from picking up the input from the remote:

    Code
    ACTION=="add", SUBSYSTEM=="input", KERNEL=="event*", \
    ATTRS{idVendor}=="0471", ATTRS{idProduct}=="20cc", \
    ENV{eventlircd_enable}="false", ENV{LIBINPUT_IGNORE_DEVICE}="1"

    You'll then also need to prevent xorg from picking up the input, you can do that by creating a /storage/.config/xorg.conf file, that will then be used instead of the default xorg.conf files in /etc/X11. Pick the one matching your graphics card and add the inputclass block from the linked kodi thread there.

    so long,

    Hias

  • Thought I'd need to do something along those lines... That fixed it!

    I'll clean up my .config and write up the full instructions to get it working in case others are having the same issue.

    Thanks again for your help Hias!