Shutdown with Power button in Kodi 18 / LE9

  • i run now LE9.0.1. and found out that the powerbutton of the remote is working different , compaired to LE8

    i tried this code:

    Code

    1. <keymap>
    2. <global>
    3. <remote>
    4. <power>shutdown</power>
    5. </remote>
    6. </global>
    7. </keymap>

    but this code is not working.

    When i press this button (powerbutton ) the ActivateWindow(ShutdownMenu) is poping up and the system is going into sleepmode, before and after adding this code

    what am i doing wrong ?

    Edited once, last by niek: or do i need to add which remote i use for this system ??? (September 3, 2019 at 9:24 PM).

  • Hi Da Flex

    i installed LE on a Generic PC, first i had LE8.. And there it worked fine.. pressing powerbutton on the remote( when the system is on)

    the ActivateWindow(ShutdownMenu) pops-up . On that menu i could select if i would turn the system off or reboot etc.

    But now i upgrade my system from LE8 to the latest version LE9.0.2.. Some installed items where not competable like AEON NOX 5 and TVheadend. So i selected a differend skin AEON NOX silvo. I did some adjustments to the skin, so it looks and reacts the same as AEON NOX 5( so everyone at home can easily use it).

    But the power off button at LE9 on my system reacts different. Pressing powerbutton on the remote( when the system is on), the ActivateWindow(ShutdownMenu) pops-up, but also the system is doing directly into sleep mode ..

    Some how the sleep mode is activated and that is not what i want

    i had already installed "keymap editor" at LE8, because the back button was not correct working at the remote (when im in series or film collections menu). So i already have a gen.xml file where a code is changing a button. So i added the extra code, but i did not see any difference..

    /storage/.kodi/userdata/keymaps/gen.xml:


    maybe i have to install a clean LE9 ???

  • I think your installation is OK. There are some known changes regarding button definitions since LE 9.x.

    Your button press is activating two actions at the same time, which indicates overlapping definitions.

    So, my first advice is to uninstall the keymap editor add-on, and do all definitions manually.

    Use the suggested place for remote control definitions, which is /storage/.kodi/userdata/keymaps/remote.xml .

    Give me a feedback how your code acts under the described conditions.

  • OK.

    1)uninstalled keymap editor and removed extra code at /storage/.kodi/userdata/keymaps , after a reboot => same problem

    2)added the code (one at a time) see attach code at /storage/.kodi/userdata/keymaps/remote.xml , => same problem

    code:

    <keymap><global><remote><power>shutdown</power></remote></global></keymap>

    code:

    <keymap><global><keyboard><power>shutdown</power></keyboard></global></keymap>


    but i know this code is working, it generated with keymap editor ( but it is a different key, which is rerouted)

    <keymap><global><keyboard><key id="61573">back</key></keyboard></global></keymap>

  • but i know this code is working, it generated with keymap editor ( but it is a different key, which is rerouted)

    <keymap><global><keyboard><key id="61573">back</key></keyboard></global></keymap>

    OK, then your complete /storage/.kodi/userdata/keymaps/remote.xml should look like this:

    Code
    <keymap>
        <global>
            <remote>
                <power>shutdown</power>
                <key id="61573">back</key>
            </remote>
        </global>
    </keymap>

    If it doesn't works, use a color button for testing.

    Insert this (instead of<power>shutdown</power>) to define the red button:

    Code
    <red>shutdown</red>
  • I already tried that complete code, what you mentioned above. the <back> button is working, but the <power> button not with this code

    So i will try a different key , the <red> button is not working for me . i have a remote without color buttons (i7 Rii mini)

    I first tried the <home> button , but that was not working , maybe just like the other keys a number?? .

    i will try further , but it looks like , what you already told before , the powerbutton is caring out two instructions

  • niek : I did see this problem too (or something similar) also when switching from LE8 to LE9.

    I my case it is about an ir MCE remote, also power button related.

    My system switches on from sleep mode, and directly back into sleep mode again, if i press the power button normally.

    Only if i press the power button very very short, i get the correct function.

    It looks like the linux kernal in LE9 translates a repeating powerkey command as 2 separate actions.

    I have not been able to fix this.

    Now, when i'm writing this, i think about something: maybe, the bios power-on/off function of the PC and the linux kernal are in some kind of 'overlap' function, and that is why the power command is executed twice !!

  • Da Flex

    with this part of the code

    <power>noop</power>

    i have the same problem .

    instead of the RED button i rerouted the volume+ button, so that button will power down the system and that works. it will shutdown the system normally according to the code

    Meganiekje

    did you made an update from LE8 to LE9 or made a complete new install with LE9?

    Edited 2 times, last by niek (September 5, 2019 at 9:03 PM).

  • Da Flex

    with this part of the code

    <power>noop</power>

    i have the same problem .

    Thanks for testing. Then the <power> tag is wrong, and you have to find the right key ID number, like you already did for the "back" button.

    PS: One little thing you could still try: Disable the CEC adapter add-on completely. The power button press should have no effect then. Just to be sure your PC is not responding to other signals when pressing the button.

  • Da Flex

    With keymap editor i found the key id of the powerbutton is it ID 61663

    Code
    <keymap>
       <global>
          <keyboard>
             <key id="61573">back</key>
             <key id="61663">noop</key>
          </keyboard>
       </global>
    </keymap>

    so i used this code , but it strangly has no effect. still same problem

    where can i find the "CEC adapter add-on completely"?