Results 1 to 2 of 2

Thread: Detect Resume from Standby / Mem

  1. #1
    Join Date
    Jun 2015
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question 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?

    Thank

  2. #2
    Join Date
    Jun 2015
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Detect Resume from Standby / Mem

    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.

Similar Threads

  1. QThread - how to pause and resume
    By xrep in forum Qt Programming
    Replies: 4
    Last Post: 7th March 2012, 09:59
  2. How to send the PC to standby or hibernation?
    By falconium in forum Qt Programming
    Replies: 4
    Last Post: 19th May 2010, 10:51
  3. Standby / hibernate system events
    By rensdenobel in forum Qt Programming
    Replies: 0
    Last Post: 13th October 2008, 18:39
  4. QFTP resume download
    By wagui in forum Qt Programming
    Replies: 9
    Last Post: 14th March 2008, 15:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.