Posts by Uukrul

    On Amlogic, I had to apply this patch:

    to get builds from the TVH master branch working. If I remember correctly, it happened after this commit and I had to manually check all the optimization options until I found the culprit: peephole2.

    Looking at that log, the same happens on Rockchip.

    For those interested, it can be done with irexec:

    - Create the file /storage/.config/lircrc with the following:

    Code
        begin
            prog   = irexec
            button = KEY_FAVORITES
            config = Remote.sh
        end

    where button is the key you want to assign and config a script like this:

    Bash
    #!/bin/sh
    enabled=$(ps -ef | grep -v grep | grep kodi.bin | wc -l)
    
    if [[ $enabled == "0" ]]; then
        systemctl start kodi
    else
        systemctl stop kodi
    fi


    that starts kodi if isn't running and stops it if it is.

    Now you only have to add "irexec -d" to the autostart.sh file and reboot your box.

    I had a Raspberry that I used as a Mysql, web, ftp, samba, nfs, oscam,... server for my Nvidia Shield and other devices but, since I now have an S905X box, I decided to use it instead as a server for a far better experience. What I want is to stop and start Kodi with a key from my remote control, because is a waste of power having Kodi in the background when I don't use it, and I'd like to know how to do it without the need of SSH and a PC.

    Stopping is easy editing the keymap with the "Quit" function but, how could I send the "systemctl start kodi" command with the remote?

    Thanks in advance.

    My Mecool M8S Pro+ does not show a shutdown menu in LE. Hitting the power button shuts the box down with no menu choices.

    You have to change the key assigned to the power button (I have mine set to f10). If you are using wrxtasy's remote.conf, change the line

    Code
    0x59  116    # power

    to

    Code
    0x59  68    # f10


    and then create a /storage/.kodi/userdata/keymaps/keyboard.xml with the following:

    Code
    <keymap>
      <global>
        <keyboard>
          <f10>Suspend()</f10>
          <f10 mod="longpress">ActivateWindow(ShutdownMenu)</f10>
        </keyboard>
      </global>
    </keymap>

    A single press puts the box to sleep and a long press shows the shutdown menu. To enable the sleep mode, follow these instructions