1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
@section The Daemon
The heart of the package is the daemon
(@code{/usr/sbin/powersaved}). It listens for hardware changes
and checks e.g. the CPU load to adjust the CPU frequency
dynamically.
There are a fixed amount of events that the daemon my throw.
The events could be triggerd by the underlying
hardware/kernel and the daemon just forwards them (e.g. ACPI
events) or the daemon can generate his own events when it
recognises hardware changes (e.g. low/high CPU usage, changed
battery levels, @dots{}). See @ref{Events} for an complete
overview of all events and @ref{Scripts} how you can use them
in your own scripts and programs.
@section The User Binary
This binary (@code{/usr/bin/powersave}) provides general information about
your system (APM/ACPI, battery, throttling, CPU frequency, @dots{}).
For some functionalities you may need a running daemon. The binary then
connects to the daemon through a socket and sends its requests (e.g.
suspend, standby, change CPU freq policy, @dots{}).
The modifications could only be temporarily. They could e.g.
be overridden by the policy of the daemon. E.g. if you plug/unplug
AC adapter and another power scheme (see @ref{Schemes}) is activated
which then adjusts your power policy as you specified them for this
scheme.
The binary should mainly give you some information of your hardware.
Please have a look at the manpage for details.
@section The C-Libraries
If you intend to write your own power manageing program you can make
use of the provided libraries.
All libraries are build statically and shared by the build system.
@subsection Library that directly accesses the Hardware
The libpowersave.a/libpowersave.so library directly accesses kernel
functions (through /proc, /sys or ioctl) and could be very useful to
gain hardware information (Have a look into powerlib.h for provided
functions).
The library is currently converted to make use of HAL functions to
gain hardware information. You may want to have a look at the code
and also directly make use of HAL to gain that information.
However, HAL lacks in some functionalities, therefore there are still
functions that access /proc and /sys files directly.
@subsection Library to send Requests to and retrieve HW Information from the Daemon
Only exists in old versions, deprecated, don't use.@*
Use the DBus interfaces instead.
@subsection Library to register at the Daemon to retrieve Events asynchronously
Only exists in old versions, deprecated, don't use.@*
Use the DBus interfaces instead.
@subsection Library to access the powersave daemon via DBus
This library should make it a bit easier to connect to the powersave daemon
over the DBus system bus.
However, you should make use of the DBus bindings directly if possible.
They are offered in different languages (perl, QT, glib, phython, ...).
See @ref{DBus} what information you can query from the powersave daemon and
what actions(e.g. suspend, cpufreq policy, ...) you can trigger.
|