Commit graph

608 commits

Author SHA1 Message Date
Martin Pitt
04dd349103 Fix compilation eror against Linux 2.6.36
Include <stdint.h> so that <linux/fs.h> can use uint64_t. Arguably a bug in the
kernel headers, but it costs us nothing to safeguard against it.

  CC     libupshared_la-up-device-idevice.lo
In file included from sysfs-utils.c:39:0:
/usr/include/linux/fs.h:37:2: error: expected specifier-qualifier-list before ‘uint64_t’
2010-11-04 18:45:10 -04:00
Michael Biebl
bb9660b220 Re-add AM_MAINTAINER_MODE (but enable it by default)
Using AM_MAINTAINER_MODE allows to modify the build systemd without
triggering the autotools. We enable it by default so the current
behaviour does not change.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-11-04 15:34:26 +00:00
Richard Hughes
cf20174f33 trivial: post release version bump 2010-11-01 13:05:01 +00:00
Richard Hughes
9bafe4fd76 Released UPower 0.9.7 2010-11-01 13:01:49 +00:00
Richard Hughes
98d6dbc8b0 Ensure the self check code can find UPower.conf 2010-11-01 12:48:31 +00:00
Richard Hughes
e1e796e584 trivial: fix make distcheck 2010-11-01 12:44:10 +00:00
Richard Hughes
59893663fb Port from EggDebug to the GLib built-in logging framework 2010-11-01 11:28:31 +00:00
Richard Hughes
ed34986e08 libupower-glib: Reject invalid object paths to avoid asserting libdbus 2010-11-01 09:52:07 +00:00
Christoph Thompson
7176815926 Add French translation 2010-11-01 09:51:20 +00:00
Michal Schmidt
e76b05967b remove the UP_DEVICE_SUPPLY_CHARGED_THRESHOLD heuristic
When a full battery starts to discharge, but reports its status as 'Unknown',
it takes a few minutes before g-p-m notices any change.
upowerd guesses the battery is fully charged as long as it has over 90% charge.

I see no reason to delay the reporting of discharging of the battery.
Let's remove this heuristic.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-10-21 16:18:44 +01:00
Alex Murray
5387183d53 Keyboard backlight of zero is not an error
Fixes a fail to detect keyboard backlight when initial value is zero

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-10-18 12:52:53 +01:00
Richard Hughes
f74dae440b Do not dist the UPowerGlib-1.0.gir file to fix building on F14 2010-10-12 19:14:23 +01:00
Alex Murray
5d902c22b7 Add support for controlling leds keyboard backlights
Add a new DBus interface based on the QoS one to provide for controlling a
keyboard backlight via the Linux leds interface.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-10-11 11:03:06 +01:00
Richard Hughes
58f3d9fbdf Fix up all the warnings when building with new versions of gobject-introspection 2010-10-05 11:13:09 +01:00
Edward Sheldrake
cfd3641501 Fix building with gobject-introspection 0.9.10 2010-10-05 11:03:42 +01:00
Richard Hughes
1ec95eabf3 trivial: post release version bump 2010-10-04 16:38:54 +01:00
Richard Hughes
0710db53e2 Released UPower 0.9.6 2010-10-04 16:31:42 +01:00
Richard Hughes
116ed04599 Fix the build with new versions of gobject-introspection 2010-10-04 15:53:51 +01:00
Richard Hughes
163d5fc355 Do not continue to poll the serial port if there is no Watts Up Pro adaptor 2010-09-20 16:22:45 +01:00
Brett Witherspoon
53611449ee Allow explicitly disabling libimobiledevice support
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-09-20 12:18:08 +01:00
Richard Hughes
260e62d872 Only save by default 7 days data to stop the log files becoming huge. Fixes rh#634228
Parsing huge log files at startup will demolish startup time. Cull old
entries when the file is resaved to keep them sane. Also add the needed
self tests to check this in the future.
2010-09-17 16:15:38 +01:00
Richard Hughes
7e45ad91ed trivial: fix make distcheck 2010-09-17 16:10:39 +01:00
Richard Hughes
a20798dc9c Remove devkit-power-gobject 2010-08-31 19:45:49 +01:00
Matthias Clasen
4a53c56a91 Fix up_polkit_get_subject() D-BUS error return
All callers of up_polkit_get_subject() just exit without returning an error to
the D-BUS caller if they fail to get the PolicyKit subject. Do that in
up_polkit_get_subject() itself now, for convenience.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-19 13:10:49 +02:00
Matthias Clasen
3967e062ef Fix double D-BUS return in up_daemon_*_allowed
Do not send a D-BUS return message any more in up_polkit_is_allowed(), since
this makes it hard for callers to ensure that they return exactly one result to
the D-BUS caller. Instead, just pass a GError to the caller.

Update up_daemon_suspend_allowed() and up_daemon_hibernate_allowed()
accordingly, to always return either a result or an error.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-19 13:04:38 +02:00
Matthias Clasen
d815c491eb Add missing D-Bus return in up_qos_cancel_request()
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-19 12:49:06 +02:00
Martin Pitt
fa536eacc4 Revert "Add missing D-Bus return in up_qos_cancel_request()"
This reverts commit 1fc5aae71f.
2010-08-19 12:48:04 +02:00
Matthias Clasen
1fc5aae71f Add missing D-Bus return in up_qos_cancel_request()
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-19 12:45:13 +02:00
Matthias Clasen
43ed5814cf Free GErrors after returning them
dbus_g_method_return_error() does not free or take ownership of the passed
GError, we need to free it ourselves.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-19 12:25:00 +02:00
Richard Hughes
a4e099c5bf Ensure we've initialized errors when calling into PolicyKit 2010-08-10 15:52:12 +01:00
Richard Hughes
0660e5d207 Fix compile with the latest PolicyKit release 2010-08-10 15:51:35 +01:00
Richard Hughes
23a1694d69 Ensure the new device types get valid descriptions in upower --dump 2010-07-26 15:28:12 +01:00
Richard Hughes
211c1347d5 trivial: post release version bump 2010-07-12 11:52:17 +01:00
Richard Hughes
f96f669b47 Released UPower 0.9.5 2010-07-12 11:50:52 +01:00
Richard Hughes
4fb88d5dc7 trivial: fix make distcheck 2010-07-12 11:50:05 +01:00
Martin Pitt
79c7b27332 Dynamic testing for enough hibernate swap
Checking for enough hibernation swap space at the daemon startup is not
sufficient, since both active memory as well as swap space change over time.
Now check whenever we receive a hibernate request or read the can-hibernate
property.
2010-07-07 15:38:22 +02:00
Martin Pitt
1d6f7ddfa3 fix typo in numerical constant
*brown paperbag*
2010-07-07 15:31:48 +02:00
Martin Pitt
c4a1c15d0c Fix UP_DAEMON_WATERLINE harder
Commmit fc7c6e003 had a thinko, UP_DAEMON_WATERLINE specifies (active
memory)/(available swap), not the other way around. So replace it with 99%
instead.

Also update the documentation of up_backend_get_used_swap() to explain what the
returned percentage actually means.
2010-07-07 15:08:43 +02:00
Martin Pitt
04eefe984c src/linux/up-backend.c: Add missing #include
We need sys/wait.h to get the WEXITSTATUS (and related) macros.
2010-07-07 11:20:47 +02:00
Martin Pitt
fc7c6e003a Increase UP_DAEMON_SWAP_WATERLINE
Native Linux suspend-to-disk does not use compression, and needs 2 KB of page
meta information for each MB of active memory. So bump the previous waterline
of 80% of active memory to 100.2%. Add an extra .05% to prevent rounding errors.

This should make the prediction whether hibernate is going to work very
accurate. However, it might prevent hibernate for folks who use an alternative
userspace solution like uswsusp which do support compression.

http://lists.freedesktop.org/archives/devkit-devel/2010-July/000867.html
2010-07-07 11:14:32 +02:00
Richard Hughes
6118ac82ec Get the powersave command from the backend rather than hardcoding Linux specifics 2010-07-07 10:07:37 +01:00
Mariusz Ceier
ac8fa9d5be up-device-supply.c: Fix #27902 Bug - Daemon Segmentation Fault
In linux backend, g_object_set was called with wrong
argument types for time-to-empty,time-to-full and percentage
properties. This patch uses explicit casts in the same way as freebsd
backend.

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
2010-07-02 14:04:42 +01:00
Victor Lowther
6770e8cb34 Use pm-is-supported to test if various sleep modes are supported.
pm-is-supported does all the work upower was duplicating, and it handles more
use cases than the old upower code did.  No point in duplicating functionality.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-06-14 08:59:40 +01:00
Victor Lowther
da3a51d2e8 Cast cnt to int to stop gcc from complaining.
GCC was complaining about int and ssize_t being differnt types.
Make it quit doing that.
2010-06-14 08:56:27 +01:00
Richard Hughes
6ba86292e9 Port to GTest 2010-06-05 17:00:34 +01:00
Richard Hughes
82a6a882d0 Assign names to our idle sources when using new versions of glib2
This makes it possible to profile more accurately using systemtap
2010-06-05 15:55:29 +01:00
Joseph Stockman
2aba7d4cfb Update the list of supported TrippLite HID Power Devices
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-06-02 19:19:02 +01:00
Richard Hughes
34add0cfe2 Add UP_DEVICE_KIND_COMPUTER as we'll need UP_DEVICE_KIND_TABLET for wacom tablets 2010-06-01 14:25:10 +01:00
Steven Walter
6bb6602c06 When calculating used swap space, only use anonymous pages
up_daemon_check_swap_space uses the Active: line from /proc/meminfo to
determine the amount of swap the system needs to be able to suspend.  However,
because Active: includes both anonymous and file-backed pages, this greatly
overestimates the amount of swap needed.  File-backed pages can be written back
to disk and so do not consume swap.

Instead, up_daemon_check_swap_space should use Active(anon): from /proc/meminfo
because only anonymous pages need to be written out to swap during a suspend.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-05-29 13:12:57 +01:00
Richard Hughes
37504601f3 trivial: print the specific error from libusb1 2010-05-28 15:15:11 +01:00