Commit graph

1736 commits

Author SHA1 Message Date
Landry Breuil
23948aed38 trivial: return FALSE in callback
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:53 +00:00
Landry Breuil
41e678a8f4 openbsd: Add GObject stuff + wip on apm_thread/apm_event_cb
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:51 +00:00
Landry Breuil
4746c7df50 openbsd: add skeleton code
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:50 +00:00
Landry Breuil
ad04d9fd44 Add openbsd backend switches
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:49 +00:00
Landry Breuil
2527d0170d upower needs -pthread
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:48 +00:00
Landry Breuil
d81b7ebee4 openbsd: add openbsd backend SUBDIR
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:46 +00:00
Richard Hughes
befdb09c54 trivial: post release version bump 2011-03-21 10:14:59 +00:00
Richard Hughes
36e97ab4cc Released UPower 0.9.9 2011-03-21 10:11:17 +00:00
Richard Hughes
e4574b70ac Correct the DBus-glib property name for LidForceSleep 2011-03-14 11:25:06 +00:00
Richard Hughes
b0bbb29df1 Add a config option 'EnableWattsUpPro' to disable the Watts Up Pro device
Annoyingly, the device used in the Watts Up Pro device seems to be a generic
USB->serial adaptor, which means it doesn't have a unique vendor and product
ID. If we try to probe for the WUP device, we can actually upset other devices
that are not expecing to be probed. This fixes #33846 although we actually
still need to be more strict in detecting a true WUP device.
2011-03-14 11:01:12 +00:00
Richard Hughes
6e8794ac6d Honour ACLOCAL_FLAGS in Makefile.am 2011-03-14 10:10:40 +00:00
Michael Biebl
d1e5f6a4da Depend on stable GUdev API
The GUdev API was declared stable in udev release 147.
Bump the version in the configure check and drop the
G_UDEV_API_IS_SUBJECT_TO_CHANGE defines.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-09 11:03:44 +00:00
Arnaud Patard
8b9ee53133 up-input.c: fix bitmap check
In up_input_coldplug(), some checks are done on the input device found in order
to detect if it's a lid switch or not.

The following one is problematic :

         /* convert to a bitmask */
         num_bits = up_input_str_to_bitmask (contents, bitmask, sizeof (bitmask));
         if (num_bits != 1) {
                 g_debug ("not one bitmask entry for %s", native_path);
                 ret = FALSE;
                 goto out;
         }

Checking if there's only 1 bit set is wrong. It's nice if you have a x86 with
acpi using 1 input device for the lid switch but it's not always nice.
One can create input devices with gpios-keys like this:

 static struct gpio_keys_button keys[] = {
         {
                 .code = SW_LID,
                 .gpio = ...,
                 .type = EV_SW,
                 .desc = "Lid Switch",
         },
         {
                 .code = SW_RFKILL_ALL,
                 .gpio = ...,
                 .type = EV_SW,
                 .desc = "rfkill",
         },
 };

The resulting SW bitmap will be 9 and thus there are 2 bits sets and due to the
mentionned check, the device is ignored by upower.

As a fix, I'm checking if the number of bits is between 0 and SW_CNT
bits.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-04 17:29:44 +00:00
Richard Hughes
38199e44ff Add an option for polling dock devices in UPower.conf, defaulting to false 2011-03-03 14:02:27 +00:00
Michael Biebl
11301ae3d6 Drop devkit and devkit-power-daemon symlinks
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-02-23 16:18:53 +00:00
Richard Hughes
b31de44eee Add a LidForceSleep property to ensure that we don't melt any laptops
We still need to add the DMI quirks, but I'm waiting for the
community to supply them now.
2011-02-02 13:44:09 +00:00
Richard Hughes
6343de2dd6 trivial: post release version bump 2011-01-07 11:50:14 +00:00
Richard Hughes
444a372e5a Released UPower 0.9.8 2011-01-07 11:48:42 +00:00
Richard Hughes
17b7aef701 linux: use the number of active DRM devices to determine the system docked status
Not ideal, but better than relying on ACPI.
2011-01-04 18:05:09 +00:00
Richard Hughes
c507b516d4 Add an IsDocked binary property to the main interface 2011-01-04 17:01:59 +00:00
Richard Hughes
2af7a6e091 Support the power_now sysfs attribute to get time remaining on new kernels
The kernel has removed the insanity of providing current_now in either
(and unspecified) units of uVh or uWh and instead provides power_now
for the power rate value.

Related commits:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b137b9942a07843c64a934cfdb7d43155e507e13
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7faa144a518c456e2057918f030f50100144ccc6

Thanks to Florian Eitel for the initial patch.
2011-01-04 09:30:22 +00:00
Zygmunt Krynicki
2dcde5a1c8 Fix links to git repository in HACKING
The hacking file used to refer to UPower.git wheras the real repository
is upower.git.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-12-27 10:26:18 +01:00
Arnaud Quette
2a6339f8ec Update the list of HID UPS devices
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-12-01 10:41:28 +00:00
Martin Pitt
83f1a6394b Testsuite: Reduce race condition in history purging check
Previously we set the "max age" to seconds and then waited for exactly 2
seconds until we wrote the history data back to files. In a lot of cases this
actually took a tad more than 2 seconds, which caused the second-last history
entry to disappear as well.

Reduce the waiting to 1.1 seconds, which will now give us 900 ms to write back
the history file. Still not ideal, but the best we can do in the test suite.
2010-11-05 09:56:47 -04:00
Martin Pitt
e38cddbb8e Fix self check to work as non-root
In our test suite, create and use a temporary directory for our history. This
makes the history check work as non-root.

Consequently, drop the skipping of the history check for "make distcheck".
2010-11-04 23:32:08 -04:00
Martin Pitt
a4353d0801 UpHistory: Add method to set history dir
Add up_history_set_directory() method to change the directory for history
files. This is mainly useful for our test suite.
2010-11-04 23:29:34 -04:00
Martin Pitt
809eefc145 Drop check for polkit-backend again
This was introduced in 0660e5d2, but we don't use polkit-backend anywhere.
2010-11-04 19:06:46 -04:00
Martin Pitt
d1e6e48ad3 Check for and link against libplist
src/linux/up-device-idevice.c explicitly uses libplist, so check for it in
configure.ac. With gcc 4.5 private requirements of libraries aren't
transitively linked any more, thus the build fails with

  CCLD   upowerd
/usr/bin/ld.bfd.real: linux/.libs/libupshared.a(libupshared_la-up-device-idevice.o): undefined reference to symbol 'plist_dict_get_item'
/usr/bin/ld.bfd.real: note: 'plist_dict_get_item' is defined in DSO /usr/lib64/libplist.so.1 so try adding it to the linker command line
/usr/lib64/libplist.so.1: could not read symbols: Invalid operation
2010-11-04 18:55:55 -04:00
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