Posts by HiassofT

    This time, I was able to use my remote once after I started the Pi (not immediately), afterwards, the remote was dead again.

    Update: After I posted this, I removed the batteries and put them back into my remote. Now it works again, so the problem was the remote, sorry. So everything works perfectly fine for me with LibreELEC 8.1 and "Enable Lirc" activated.

    Thanks for your help :)

    Cool, I like problems that can be solved that easily :)

    As I have you here with an Xbox One remote, could you test another thing?

    Change the "dtoverlay=lirc-rpi" line in config.txt to "dtoverlay=gpio-ir", disable Lirc in LE settings and then reboot.

    The Xbox one remote should work out-of-the box, without having to run lirc.

    so long,

    Hias

    if you still need some feedback :

    Thanks a lot for the logs!

    It looks like lircd runs a tad earlier than on my RPi, disabled in-kernel decoding, but the udev rule configuring ir-keytable seems to have run a bit later (not visible in the logs), as at the end nec and rc-6 protocols are also enabled.

    Parallel startup and race conditions can be a lot of fun :)

    so long & thanks to all of you for your feedback,

    Hias

    It's strange. I have activated 'lirc', reboot, and the error with double commands no longer occurs. But if I now deactivate 'lirc' again, irc no longer works, so I have to activate 'lirc' in settings now. o0

    This means lircd successfully disabled in-kernel decoding. If you then disable lirc that won't be re-enabled again and your remote no longer works. You could manually enable it on the shell via "ir-keytable -p rc6,nec", but in general it's easier to just reboot.

    Quote

    Here still my logs:

    Crap, the interesting stuff (enabled protocols) didn't make it into the logs - ir-keytable sends them to stderr instead of stdout...

    If you catch a situation with double-presses again, please run these commands instead:

    Code
    ir-keytable -r 2>&1 | paste
    
    journalctl -a | paste

    But no need to spend too much time on that, the info that the issue doesn't always occur was already helpful!

    Quote
    Looks as if the error only happens at the first reboot after update.

    It's probably rather random if you get that issue or not - after all if there's a fight between 2 configuration services it's not good and the easy solution is to just disable lirc in LE settings.

    so long,

    Hias

    Hi, I recently switched from Openelec to LibreELEC. I added the files lircd.conf, Lircmap.xml and remote.xml on LibreELEC 8.1. It didn't work until I turned on "Enable Lirc". After this it worked perfectly fine, but after some time it stopped working completely. I don't understand what's wrong. Under Openelec 5.95.3 everything was fine. Turning "Enable Lirc" on and off allows me to use my remote once, but afterwards it stops working. The remote I'm using is the Xbox one remote. I also added dtoverlay=lirc-rpi to the config.

    Please post the output of these commands when the remote stopped working:

    Code
    journalctl -a | paste
    dmesg | paste
    systemctl status lircd | paste
    systemctl status lircd-uinput | paste
    systemctl status eventlircd | paste

    so long,

    Hias


    Nothing special, I just update LE v8.0.2MR through the le-addon. After reboot the entry 'lirc' was present and active.


    My device: Zotac Zbox ci321nano with LE x86_64_generic

    I could now (partly) reproduce the issue on RPi and understand what's going on:

    In LE 8.0.x lirc is automatically enabled if an IR receiver supporting the /dev/lirc interface is detected. If you go to LE Settings->Services "Enable Lirc" will be set to on.

    But although lirc was enabled it wouldn't be started unless you had a .config/lircd.conf file or were using the lirc_rpi driver on RPi or had an old xbox dvd remote dongle connected. As the remote buttons were still decoded by the kernel everything worked as before and we all seem to have missed the fact that Lirc was actually enabled when it shouldn't have been...

    In 8.1.0 Lirc handling changed: on a fresh install it won't be enabled by default, and if you enable it it will actually be started - using a default lircd.conf file if you didn't provide your own.

    So, on a 8.0.x->8.1.0 upgrade you are now presented with an enabled and actually running lircd.

    The one thing I don't quite understand, and also couldn't reproduce so far, is why you get the "double buttonpresses" on Generic.

    When lircd starts it will automatically disable in-kernel decoding. OTOH there's also the ir-keytable auto-configuration running which enables in-kernel decoding for MCE and a bunch of other remotes. Although that leads to 2 configuration services fighting against each other I had expected lircd to be run last, and thus win, and lead to remote buttons only be decoded by lircd, not the kernel - this is also what I got in my tests on RPi.

    It would be great if someone plagued by double-presses could do a few tests on 8.1.0, maybe that'll give some clues about why that happens:

    Enable lirc in LE settings, reboot, then run the following commands:

    Code
    ir-keytable -r | paste
    journalctl -a | paste

    so long,

    Hias

    Make sure lirc is disabled in LE settings.

    In 8.0.2 enabling lirc didn't have any effect unless you also created a .config/lircd.conf file (or were using lirc_rpi on a RPi). In 8.2 this is changed and now lirc will use a default config if you enable it in LE settings.

    so long,

    Hias

    Then it will be better to disable [lirc] in the setting by default ... less confusion

    Lirc shouldn't be enabled by default, you have to manually turn that on.

    If it behaved differently on your setup it would be great if you could post steps how to reproduce this.

    IIRC the only cases where lirc was automatically enabled in the past were if you used lirc_rpi on the RPi or if you had an old xbox dvd remote receiver plugged in.

    so long,

    Hias

    LibreELEC supports MCE remotes out-of-the box without having to run lircd - they are handled by the Linux kernel.

    In general, keep lirc disabled and if you need to configure your remote use ir-keytable. Lirc is meant to be used only in very special cases, with odd remotes that aren't supported by the linux kernel / ir-keytable.

    If you enable lirc eg with an MCE remote it can happen that the button presses are decoded both by the kernel and by lirc, and you get double actions.

    so long,

    Hias

    Hmmm, never seen such a thing before. Which LE version / system / kernel was used, and which USB DVB stick?

    "cat /sys/class/rc/rc0/protocols" could give some clues if that's maybe an ir-keytable or kernel issue. Also test if changing protocols directly via sysfs "echo nec > /sys/class/rc/rc0/protocols", then cat again to check, works.

    so long,

    Hias

    No problem, feel free to ask! Remote handling in Kodi is somewhat confusing, took me a while to understand it as well :)

    The LIRC events from eventlircd will show up with "devinput" as remote name (with lirc they'd show up as the remote name defined in lircd.conf).

    Hint: enable debug logging in kodi and then check .kodi/temp/kodi.log. A lirc event from eventlircd will look like this:

    Code
    12:40:51.762 T:1943990288   DEBUG: LIRC: Update - NEW at 10148446:6c 0 KEY_DOWN devinput (KEY_DOWN)
    12:40:51.763 T:1943990288   DEBUG: OnKey: 167 (0xa7, obc88) pressed, action is Down

    "devinput" is the "remote name".

    Keyboard input OTOH looks like this:

    Code
    12:47:40.167 T:1943990288   DEBUG: Keyboard: scancode: 0x6c, sym: 0x0112, unicode: 0x0000, modifier: 0x0
    12:47:40.167 T:1943990288   DEBUG: OnKey: down (0xf081) pressed, action is Down

    so long,

    Hias

    It's a bit tricky, but for self-contained binary addons like tvheadend without dependencies it's doable. Main problem is getting the latest ZIP . You can do this with that shell script:

    name it eg "get-addon.sh" and then run "sh get-addon.sh service.tvheadend42"

    Then stop your current tvheadend (via systemctl stop service.tvheadend42), unzip the file in /storage/.kodi/addons, make sure all files in the bin subdir have executable permissions (otherwise to a chmod +x /storage/.kodi/addons/service.tvheadend42/bin/*), then start it via "systemctl start service.tvheadend42".

    That's basically what kodi is doing as well.

    so long,

    Hias