libkeepalive
Loading...
Searching...
No Matches
libkeepalive

Introduction

Normally when there are no signs of user activity, display will be powered off and soon after that the device is suspended.

This is troublesome for applications that want to:

  • Show something on screen without really expecting user interaction (any application that does video playback).
  • Continue processing even if display does get blanked (say something like fractal generator).
  • Wake up at some specific time (normal timers are frozen when device is suspended).

While there are low level solutions to these problems, the availability might vary from one device / kernel version to another.

What libkeepalive is meant to provide is: Make available a stable API that will work on all Mer based devices even if the underlying implementation details should change in the future.

Preventing Display Blanking

Use functionality listed in keepalive-displaykeepalive.h

Example: keep-display-on.c

Prevent Device From Suspending

Use functionality listed in keepalive-cpukeepalive.h

Example: block-suspend.c

Schedule Background Activity

Use functionality listed in keepalive-backgroundactivity.h

Example: periodic-wakeup.c

GLib Timeout Compatibility API

In some cases application just needs to ensure it wakes up to handle simple tasks. For this purpose keepalive-timeout.h provides timer functions that can be used as suspend proof drop in replacement for glib timeouts.

Example: simple-timer-wakeup.c