autostart.sh not runnig the same in libreelec 8.x vs librelec 7.x

  • I've been using the following autostart.sh script since version 7 of libreelec:

    echo EHC1 > /proc/acpi/wakeup
    echo XHC > /proc/acpi/wakeup

    The state is disabled for EHC1 and enabled for XHC upon a fresh boot of the box.

    On my system this script enables EHC1 and disables XHC. Since upgrading to version 8 of libreelec the script does not run as it used to. The first enables EHC1 as it should yet the second XHC is still enabled when it should be disabled. Running the two commands via ssh enables/disables them properly.

    What has changed between version 7 and 8 of libreelec in regards to autostart.sh?

    Thanks

  • It is safer to use

    Code
    grep -q EHC1.*disabled /proc/acpi/wakeup && echo EHC1 >/proc/acpi/wakeup
    grep -q XHC.*enabled /proc/acpi/wakeup && echo XHC >/proc/acpi/wakeup


    It enables EHC1 only if it is disabled. Same for XHC: it disable it if it is enabled.

    You should check what values are set after boot - maybe they were changed between releases.


  • You should check what values are set after boot - maybe they were changed between releases.

    This was already stated in my original post.

    There is no solution to my original script. Adding a sleep does not affect the outcome. The only solution seems to be running it in the background with a sleep value. Ugly but it's the only solution that works for me.

    Code
    (
      sleep 10;
      echo EHC1 > /proc/acpi/wakeup)
      echo XHC > /proc/acpi/wakeup)
    )&
  • Maybe I don't understand what is the issue you have? Can you show all states?

    Code
    cat /proc/acpi/wakeup


    Autostart.sh is working as same as in previous versions: executed just before kodi is started.

  • Something has changed as my original script did not work. The new one does. There is nothing else to say. There has been an underlying change in regards to those commands in version 8. Case closed.

  • It does work the same for me, did you try it like this?

    Code
    echo EHC1 > /proc/acpi/wakeup &
    echo XHC > /proc/acpi/wakeup


    or like this if sleep is needed

    Code
    sleep 5; echo EHC1 > /proc/acpi/wakeup &
    sleep 5; echo XHC > /proc/acpi/wakeup