recovering from suspend

  • Hey,

    I've got LibreELEC running on Khadas VIM2 Pro and it works flawlessly with LE 11.0.1 but I've got some minor issue.

    Built in VIM2 WiFi card didn't play well with my router so I bought external / USB WiFi to fix the issue and it helped.

    But seems it goes into awkward state after LE goes into suspend state. When I wake it up it's lottery and sometimes WiFi works and sometimes it doesn't.

    I've got impression that when I wake it up few minutes after suspend then USB card works but when I do it the next day it doesn't.

    So my assumption is that LE first goes into suspend-to-ram which recovers successfully but at some point it goes to suspend-to-disk which probably isn't well supported by the driver that my USB card uses.

    Anyway... I've got few ideas how to fix it and the most straightforward is to change suspend mode from suspend-to-disk to suspend-to-ram... but I have no idea how to do it.

    Could someone point me to the docs that cover such scenario?

    My second idea is to completely disable suspension but again I'm not really sure how to do it.

    Third idea is to try to unload and load again kernel module for that card (88XXau) after unsuspend cause system in general works but again I'm not really sure where exactly in /etc should I try to implement it and how.

    Any hints are greatly appreciated.