Posts by Skeeve

    Quote

    set the log level to 1 at advancedsettings.xml

    vm.overcommit_memory=2
    vm.overcommit_ratio=100
    vm.vfs_cache_pressure=1000

    to /storage/.config/sysctl.d/sysctl.conf

    MALLOC_ARENA_MAX=1

    to /storage/.config/kodi.conf (create the file if it's not there)

    Reboot.

    I did that now and will check tomorrow whether or not the system will hang again after about 1-1.5h of playback.

    Quote

    ATM it's unclear whether it's a crash or a hanger.

    Not a crash, I assume, because the system still displays the last frame of whatever I was watching. Also there is no crashlog after switching off and on again.

    I installed LibreElec on a Wyse Thin Client some time ago and from the beginning on I had issues with zhe system. Usually I can watch one episode of a series, flawlessly, but most of the time I start getting issues when starting another one.

    I also have the feeling that it's not that I view something, but it seems to be related to the system itself hanging after, maybe an hour or two.

    I just upgraded to the newest 12.2 version and I'm wondering which files to constantly monitor in order to see what's the reason for the hangs.

    Currently I'm running this from my Laptop:

    Code
    while (true)
    do
        (date;ssh kodiwyse 'uptime;echo "-------";dmesg')>kodiwyse.txt
        head -2 kodiwyse.txt
        sleep 30
    done

    So just monitoring dmesg. Is there anything else you recommend to look out for?

    Hi.

    Thanks to all the support I received here, I was able to get an old Jolly Click 1:1 IR remote control connected to my Raspberry (3b).

    Since it has more than 40 buttons there is plenty of room for making certain buttons do useful stuff for me.

    This is what I implemented:

    1. Channel down plays the next video in the current directory
    2. Channel up plays the previous video
    3. One button will now toggle the "watched status" of the currently selected video

    1 & 2 I find quite helpful when binge-watching a series

    3 is for "quickly" setting videos to "watched". I regularly delete watched videos with a script. So this help me mark those videos without actually having watched them til the end, which sometimes happens with YT videos.

    /storage/.kodi/userdata/scripts/skiponeback.py

    Code
    import xbmc
    xbmc.executebuiltin('Action(Stop)')
    xbmc.executebuiltin('Action(UP)')
    xbmc.executebuiltin('Action(Play)')

    /storage/.kodi/userdata/scripts/skiptonext.py

    Code
    import xbmc
    xbmc.executebuiltin('Action(Stop)')
    xbmc.executebuiltin('Action(Down)')
    xbmc.executebuiltin('Action(Play)')

    /storage/.kodi/userdata/scripts/togglewatched.py

    Code
    import xbmc
    xbmc.executebuiltin('Notification(Toggle Watched Status,Pleas wait…,5000)')
    xbmc.executebuiltin('Action(ToggleWatched)')

    The notification is for me to see, that the button was registered. Sometimes it takes some time for the system to actually get the status changed.

    /storage/.kodi/userdata/keymaps/keymap.xml

    Unfortunately no, kodi uses a hardcoded set of button codes.

    Another question: Is it possible to replace the Lircmap.xml?

    Currently there are some duplicates, meaning: Two keys mapped to the same kodi remote button.

    Maybe it's possible to use other kodi remote button instead to be able to map them to scripts or actions?

    Fantastic! Thanks again HiassofT

    Code
            <remote>
               <red>runScript(script.audio.profiles,0)</red>
           </remote>


    Code
    2025-10-25 12:48:34.206 T:996     debug <general>: LIRC: - NEW 18e 0 KEY_RED devinput (KEY_RED)
    2025-10-25 12:48:34.226 T:953     debug <general>: HandleKey: 251 (0xfb, obc4) pressed, window 10000, action is runScript(script.audio.profiles,0)


    Out of curiosity: Is there any way to define new keys?

    I mean <red> is not a very descriptive name ;)

    There is no KEY_B in Lircmap.xml of kodi.

    Yes… Thank you.

    I just noticed as well :(

    Will try other keys.


    Okay… As mglae pointed out correctly, there is no "KEY_B". So I tried "KEY_RED".

    This is the keymap I used:

    And this is the log:

    Code
    2025-10-25 10:36:03.654 T:1120    debug <general>: LIRC: - NEW 18e 0 KEY_RED devinput (KEY_RED)
    2025-10-25 10:36:03.687 T:1076    debug <general>: HandleKey: 251 (0xfb, obc4) pressed, window 10000, action is ActivateWindow(TVChannels)

    So it seems to be mapped somewhere else and not in my keymap.

    Sorry. Copy & Paste error. My current map is


    The log is the same as posted above. :(

    I finally got my Remote, which only works with lirc, to function.

    For the most parts like navigattion starting, a video, pausing it, mute the sound or change the volume it works.

    Simply by having stuff like this in my /storage/.config/lircd.conf

    But now there are several other buttons which I'd like to match to some useful functions.

    For examle the Button labeled "AV" on my remote should be mapped to runScript(script.audio.profiles,0).

    So I added a button KEY_B, because it's the button B on my bluetooth keyboard which also runs that script.

    And then I added to my keymap /storage/.kodi/userdata/keymaps/bluetoothaudio.xml

    Code
    <keymap>
        <global>
           <keyboard>
               <key id="61506">runScript(script.audio.profiles,0)</key>
               <key id="9">runScript(script.audio.profiles,0)</key>
               <KEY_B>runScript(script.audio.profiles,0)<KEY_B>
        </global>
    </keymap>

    But it didn't work.

    When I compare the debug output of a working key with that of my AV key, I can see a clear difference.

    Code
    2025-10-25 00:39:36.207 T:941     debug <general>: LIRC: - NEW 6a 0 KEY_RIGHT devinput (KEY_RIGHT)
    2025-10-25 00:39:36.215 T:935     debug <general>: HandleKey: 168 (0xa8, obc87) pressed, window 10000, action is Right
    
    2025-10-25 00:39:42.557 T:941     debug <general>: LIRC: - NEW 30 0 KEY_B devinput (KEY_B)
    2025-10-25 00:39:42.962 T:935     debug <general>: HandleKey: 0 (0x0, obc255) pressed, window 10000, action is

    So the key is correctly registered as "KEY_B", but there seems to be no mapping applied.

    What am I doing wrong?

    Okay. I fixed the repeat issue with suppress_repeat 10.

    What I haven't found out yet is how to assign KEY_AB to a runscript.

    I tried a keymap.xml as well as remote.xml:

    Code
    <keymap><global><keyboard>
    <key id="61506">runScript(script.audio.profiles,0)</key>
    <key id="9">runScript(script.audio.profiles,0)</key>
    <key id="KEY_AB">runScript(script.audio.profiles,0)</key>
    </keyboard></global></keymap

    and

    Code
    <keymap>
      <global>
        <remote>
          <KEY_AB>runScript(script.audio.profiles,0)</KEY_AB>
        </remote>
      </global>
    </keymap>

    with irw I can see that the KEY_AB is registered, but the script isn't run.

    Code
    KodiLG:~ # irw
    196 0 KEY_AB devinput
    196 0 KEY_AB devinput
    ^C

    Thank you Hias.

    It works now. The masking stuff was sone while I was desperately trying to get the remote to work. Thanks for finding that.

    Almost everything works now as I need it.

    I only need to suppress repeats as the remote is quite fast in repeating. I thought suppress_repeat 1 would be enough but no.

    I also need to find out how to map my j_AV key to runScript(script.audio.profiles,0). I hope that I can do it somehow with ~/.lircrc.

    For all(?) keys run: grep 'KEY_' /usr/lib/udev/rc_keymaps/*.toml | cut -d= -f2 | cut -d\" -f2 | cut -d\' -f2 | sort -u

    Regarding the lircd-uinput:

    I had to manually enable it and now it's working!

    Unfortunately it's not surviving a reboot.

    Any hint for that?

    This is the status after reboot: