[PATCH v1 0/2] Add logind and sysfs power methods
Alberto Milone
alberto.milone at canonical.com
Tue Jul 15 14:46:52 UTC 2014
pm-utils is now deprecated and, as a result, we should rely on
either Logind (where available) or on sysfs.
This is a first draft I've been working on. The new code features
autodetection (which defaults to Logind, and falls back to sysfs)
in addition to adding the --pm-method parameter to allow users
to specify one of the following methods:
logind, sysfs, pm-utils
Quirks are only available when using pm-utils but this shouldn't
be a blocker for the adoption of these additional methods.
I used the GLib Dbus bindings only to avoid using the C Dbus
bindings. While this adds a dependency on GLib, it's a small
price to pay.
Similar code should be written to handle S4, which I plan to do
as soon as we agree on the final details of the current patches
for S3. It would probably be a good idea for s3.c and s4.c to
share the same code.
The new functions in fwts_pipeio.c and fwts_stringextras.c come
from Logind's source code (whose LGPL 2.1 is compatible with
FWTS'). I have given credit to the original author but please
let me know if there's a better way to do it.
This also fixes LP: #1339588
Alberto Milone (2):
src/Makefile.am: depend on glib and gio
Add support for different power methods to suspend
configure.ac | 2 +
src/Makefile.am | 4 +-
src/acpi/s3/s3.c | 526 +++++++++++++++++++++++++++++++++---
src/lib/include/fwts_pipeio.h | 6 +
src/lib/include/fwts_stringextras.h | 1 +
src/lib/src/fwts_pipeio.c | 108 ++++++++
src/lib/src/fwts_stringextras.c | 28 ++
7 files changed, 635 insertions(+), 40 deletions(-)
--
1.9.1
More information about the fwts-devel
mailing list