Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Forcing to enter sleep mode after a delay
Forum Updated to NodeBB v4.3 + New Features

Forcing to enter sleep mode after a delay

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alefburzmali
    wrote on last edited by
    #1

    Hi !

    I would like to force my screen to enter in the framebuffer sleep mode for saving energy when my board is not used.

    I know I have to use the following command lines to force enter in the fb sleep mode :
    @echo 1 > /sys/class/graphics/fb0/blank@
    And in order to force my screen to get out of the sleep mode :
    @echo 0 > /sys/class/graphics/fb0/blank@

    Unfortunately my board doesn't enter in sleep mode after a delay. I think I have to code somethin in my Qt app so that after a certain time
    of inactivity the first command is launched thanks to a QProcess. And once a somebody put his finger in the touchscreen the second command will have to be lauched too in order to get back to a normal screen mode.

    I don't really know how to start building such thing. I though of using a Qt timer that is reset to 0 at every mouse event, and once the certain delay is reached a signal should be sent to a special slot whose aim is to launch the command. And once a mouse is got another signal should force the screen to wake up.

    I don't know if it is the right way to proceed. Have you some advice ? Because I'm not that at ease with that way of working, it looks a little bit dirty for me ...

    Thanks you !

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      QTimer is definitely an option for what you want to do. Did you investigate running a separate screen saver though? Those usually do the screen blanking AFAIK.

      PS: Why don't you just use a QFile to open /sys/class/graphics/fb0/blank and write the 1/0 into it? That should save you the QProcess...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved