Posts by HiassofT

    Thanks a lot for testing!

    I've sent my changes to the driver author and the Linux kernel IR maintainer to get some more feedback and testing media: rc: xbox_remote: add protocol and set timeout - Patchwork and I'll later push a PR so it'll be added to future LibreELEC releases.

    I'm not sure if there's anything we can do about the performance of quickly repeated button presses. The current parameters (64ms period plus 10ms timeout) are rather similar to the ones of the lirc_xbox driver (which used a default of 100ms to distinguish between repeated button presses and new ones) so I'd expect to be performance to be about the same.

    Other remotes / protocols like eg rc-6 (used on MCE remotes) contain a "toggle bit" to distinguish between held down buttons and new button presses which helps a lot to improve the performance on quickly repeated button presses. The xbox remote driver doesn't seem to set that bit, could well be that the IR protocol or IR receiver don't support that.

    so long,

    Hias

    Thanks a lot for the tests!

    The MCE USB dongle could receive something but unfortunately it doesn't look like valid IR signals so we can't use it to get the details of the Xbox remote protocol. It was worth a try, though.

    I managed to deduce parameters from the ir-keytable -t output though and had a shot at using them in the xbox remote driver. Can you please test with this image (for RPi2/3)?
    libreelec-rpi2.arm-9.0-devel-20190323102559-d446ddb.tar

    When you test with this image please keep an eye on "double-action" button presses (i.e. if a short button click results in 2 or more movements). I've added a bit of headroom to the parameters but if they are too strict they could (occasionally) happen and we'd need to increase the headroom.

    so long,

    Hias

    Thanks for the tests! The output of test one looks fine, but the outputs of tests 2 and 3 look like you used the MCE remote.

    Can you please repeat these tests with the Xbox DVD remote?

    We need the specifics of the Xbox DVD remote protocol, and the MCE USB receiver is able to capture raw signals.

    So, for test 2, plug in the MCE USB receiver and capture the buttons 1, 2, 3 of your Xbox DVD remote.

    For test 3, plug in both recievers and press button 1 on your Xbox DVD remote for about 2 seconds.

    so long,

    Hias

    Thanks for the info, the MCE USB receiver looks fine, I have one with the same chipset here.

    I'd like you to run 3 tests, before each test do a cold boot and then stop kodi and eventlircd so they don't interfere with testing:

    Code
    systemctl stop kodi
    systemctl stop eventlircd

    For the first test plug in the Xbox DVD remote dongle, stop kodi/eventlircd and then run the following command

    Code
    ir-keytable -t

    Then press each of the buttons "1", "2", "3" for about 1-2 seconds, copy the output you got on the console to a text file and attach it here.

    For the second test plug in only the MCE USB receiver, stop kodi/eventlircd.

    Then grab the raw signals for each of the buttons "1", "2," and "3" while you press them for about 1-2 seconds. Run the following command (substituting 1.txt according to the button you'll press)

    Code
    ir-ctl -t 200000 -r1.txt

    Press the button for 1-2 seconds, then press control-c in the terminal to stop recording. Attach the 3 files (1.txt, 2.txt, 3.txt).

    For the third test plug in both the Xbox DVD receiver dongle and the MCE USB receiver.

    After bootup (and stopping kodi/eventlircd) run ir-keytable to see which rcX and /dev/lircX device was assigned to the MCE USB receiver (either the Xbox or the MCE device could be number zero and the other number one). The output should look like this

    Code
    Found /sys/class/rc/rc0/ (/dev/input/event10) with:
            Name: Media Center Ed. eHome Infrared Remote Transceiver (1934:5168)
            Driver: mceusb, table: rc-rc6-mce
            lirc device: /dev/lirc0
    ...
    Found /sys/class/rc/rc1/ (/dev/input/event0) with:
            Name: Xbox DVD USB Remote Control(045e,0284)
            Driver: xbox_remote, table: rc-xbox-dvd
            lirc device: /dev/lirc1

    Note the /sys/class/rc/rc0/ and lirc device: /dev/lirc0 in the output of the "Media Center Ed. eHome Infrared Remote Transceiver" / "Driver: mceusb" block - if you got rc1 and/or /dev/lirc1 or something else substitute rc0 and /dev/lirc0 with your values.

    Run the following commands:

    Code
    ir-keytable -s rc0 -p lirc -c
    ir-ctl -d /dev/lirc0 -t 20000
    echo "nop" > /sys/kernel/debug/tracing/current_tracer
    echo "rc_keydown" > /sys/kernel/debug/tracing/set_ftrace_filter
    echo "ir_raw_event_store_with_filter" >> /sys/kernel/debug/tracing/set_ftrace_filter
    echo "function" > /sys/kernel/debug/tracing/current_tracer

    Now press the button "1" for about 2 seconds. Then run the following command to grab the kernel trace:

    Code
    cat /sys/kernel/debug/tracing/trace | paste

    Note the URL you got on the console and post it here together with the files you grabbed in the previous 2 tests.

    With that info it should be rather easy to determine the missing parameters.

    so long,

    Hias

    Please go through the troubleshooting section in the wiki Infrared Remotes [LibreELEC.wiki] it contains step-by-step things to test. Just post the the outputs you got at the working and on-working step if you are unsure.

    As a general hint make sure you don't have any leftovers from previous configurations, like a .config/lircd.conf or .config/rc_maps.cfg file or keymaps in .config/rc_keymaps/

    so long,

    Hias

    If your MCE USB receiver is a "real" MCE receiver (using the mceusb driver) or if you have an x86 box with a built-in IR receiver or a Raspberry Pi with a GPIO IR receiver we should be able to create a test setup to get the missing parameters and improve the current xbox driver.

    Could you run "ir-keytable" on the box where you use the Xbox DVD dongle and on the one with the MCE USB remote and post the output?

    I'lll then think about how to best get the needed info with that equipment (already have some ideas :)

    so long,

    Hias

    The old lirc IR drivers in the linux kernel were rewritten and moved to the newer RC subsystem (which existed for quite some tine and allows IR decoding to be handled completely in the kernel, without needing to run lircd). When this was finished the old lirc code in the kernel was removed.

    The xbox dvd IR driver, which was based on the kernel lirc code, never made it into the linux kernel and for several years OpenELEC and LibreELEC included it as a separate kernel patch (which required updating on almost every kernel update so this meant quite a bit of work for us).

    As the base upon the driver was built was removed we had to remove the driver from LE - it was not longer possible to get it working without a major rewrite and as no one in the team had the hardware to test it the was nothing we could do.

    A few months ago Benjamin stepped up, rewrote the driver and submitted it to the Linux kernel and also created a backport for the kernel used in LibreELEC - which means current LibreELEC contains again support for the Xbox DVD remote (which was not available for several months during LE9 development).

    so long,

    Hias

    Unfortunately the parameters which are responsible for the bad response to repeated button presses are not configurable via config files or standard commands.

    One of them, the timeout value, can be set on some IR receivers with "ir-ctl -t ...", but the xbox dvd driver has that set to the default 125ms and doesn't allow changing it. The other parameter, the IR repeat period, is set by the IR core - and as the xbox dvd driver specifies RC_PROTO_UNKNOWN it's 125ms too. The repeat period probably isn't too far off, rc-5, rc-6 and NEC have a period of about 110-115ms, but the timeout is probably far too high.

    In combination this means pressing a button quicker than about 4 times a second (250ms) isn't recognized as separate button presses but interpreted as a button held down, so the normal key repeat will kick in after half a second. The key repeat settings are configurable (using ir-keytable -D ... -P ...) but that won't help you much with the case of quickly repeated button presses.

    so long,

    Hias

    As suspected the BIOS has broken ACPI tables.

    On non-broken BIOSes you should see a PNP device with ITE in it's name in dmesg, like this

    Code
    [    0.998539] pnp 00:01: Plug and Play ACPI device, IDs ITE8708 (active)

    Back then I tried using different acpi_os_name settings (add it to the cmdline in syslinux.cfg), as suggested eg here https://wiki.archlinux.org/index.php/dsdt but that didn't help. You could try this, too, but don't expect too much - probably not much we can do about it.

    so long,

    Hias

    Sluggish response to multiple presses seems to be a known issue with the current driver, see the discussion here: linux: restore Xbox DVD Movie Playback Kit support by benpicco · Pull Request #3015 · LibreELEC/LibreELEC.tv · GitHub

    The correct parameters (repeat period and timeout) haven't been measured and configured in the driver yet - see explanation here Re: [RFC] [PATCH] media: rc: Improve responsiveness of Xbox DVD Remote

    There's not much we can do about it until someone does that, there are no "knobs to turn".

    so long,

    Hias

    The ITE CIR receiver should be supported by Linux kernels out of the box and you should get an entry in /proc/bus/input/devices and a "rc0: ... " line in dmesg.

    Check if it's enabled in BIOS settings, usually there's some entry with "CIR", on some BIOSes it's disabled by default.

    A BIOS update could also help, sometimes the BIOSes have messed up ACPI tables and Linux won't detect all devices - I have an ancient P4 board here with a connector for an IR receiver and IR settings in BIOS but the ACPI tables don't list it so it's not usable in Linux (manually patching ACPI tables is a possibility, but that's a really deep rabbit hole).

    If you can't get it working please post a full dmesg (dmesg | paste), maybe there are some hints in there.

    so long,

    Hias

    You can only use one of the few defined kodi button names in Lircmap.xml - see eg the default Lircmap.xml lircmap.xml or the button translater source code irtranslator.cpp for a list of valid names.

    So for radio you could use the "liveradio" button <liveradio>KEY_A</liveradio>.

    For the DVD button it's probably best to map it to "eject", this will open/close the tray.

    so long,

    Hias