Power button issue with suspend

  • Hi all,

    I have a problem with the power button of my IR remote control. The uboot of my box (M8S, Amlogic S812 2G/8G) doesn't support power off correctly, therefore I applied a suspend patch in Kodi (LE 9.0, Kodi 18.2).

    The suspend and resume works fine with my box. When I press power button, the box woke up, but the power menu always shows up after resume.

    If somebody have a solution, how can I ignore power button event in Kodi after I sent to sleep the box, please share with me.

    Thanks,

    dtech.

  • Thanks, but this is not a real solution. If I need to completly ignore power menu, I can comment out the line of power button in the remote.conf.

    But I need the power menu if the power button pressed in normal mode.

    I don't know what process can handle power button event if the box is in suspend mode.

    If the button is pressed, the box wakes up, but Kodi also handles this button event. I have the problem with the last thing only.

    Edited once, last by dtech (August 12, 2020 at 5:53 PM).

  • Okay, but how? I compile LE from source, so I will try to find a permanent fix for this sutation, a source code patch would be the best.

    The autostart.sh is just a temporary modification for one device only, but it is not enough.

    I tried to figure out what process handles this, because systemd have a "kodi-lirc-suspend.service" script.

    If I send the box to suspend mode, dmesg shows the last pressed button was ENTER (Power menu -> Suspend item selected).

    The box is now in sleep state. I press the power button again. The box wakes up, LED changes from red to blue.

    But there is no pressed button listed in dmesg. Kodi somehow still detects this button event, and it shows the power menu again.

    I tried to override power button event: instant sleep instead of power menu.

    But it causes an evil endless loop: wake up and back to suspend again...

  • Another approach: Start your own script whenever the power button has been pressed. Like the above XML, but with tag content:

    Code
    <power>RunScript(script[,args]*)</power>

    Read here for details. Use a shell environment variable and a Python script to note the suspend state.

  • Witam wszystkich i proszę o pomoc

    Sprzęt Giada N20 ION 2

    Zainstalowany OpenELEC-Generic.x86_64-8.0.4

    Migrowałem do LibreELEC-Generic.x86_64-10.0.2

    i są 2 problemy których nie umie rozwiązać już od tygodnia szukam wszędzie ale jak coś znajdę to nie potrafię tego zrobić

    problem 1 jak naciskam pilotem power off to wyskakuje mi pole wyboru wyłącz zasilanie uśpij itp. w openElec tego nie było pola

    po prostu naciskałem pilotem off i wyłączał się

    problem 2 znowu na libreelec po wciśnięciu UŚPIJ i ponownym wznowieniu pojawia się czarny ekran i nie startuje na open elec tego problemu nie było


    bardzo lubcie openelec ale tam już zaczynają powoli nie działać nie które wtyczki bo wymagają nowszego kodi i tylko dlatego się przesiadłem ale te problemy mnie irytują

    pomożecie mi je rozwiązać ??