[solved] Detect Resume from Standby / Mem



  • Hi,

    We are currently developing an embedded device based on the am335x sdk from ti (based on arago-project.org)

    The main application on the device is being developed using Qt4.8

    We want to detect when the device is entering Standby / Mem states so that we can save data and suspend our main application

    We also want to detect when the device is resuming from these states so that the main application can be resumed correctly

    Does anyone have experience / information / links to how this may be achieved?

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    This might be of interest.

    Hope it helps



  • I've found a solution to my issue above.

    On our system the Standby / Mem state can be invoked via a script /usr/bin/pm_suspend.sh which in turn calls echo mem > /sys/power/state to suspend the device to memory.

    I've added kill -USR2 {App.pid} before the call to suspend and kill -USR1 {App.pid} after.

    My application understands that USR2 is a signal to save our data and delete our main form and that USR1 is a signal to spawn a new instance of our main form.


  • Lifetime Qt Champion

    Great !

    Since you have it working now, please update the thread title prepending [solved] so other forum users may know as solution has been found :)

    Also consider up-voting the answer(s) that help you, it will allow other members to find them more easily :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.