summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add morphology, disable man page generationbaserock/morphSam Thursfield2012-07-231-0/+9
| | | | We don't have docbook schemas yet.
* Use systemd for suspend and hibernateMatthias Clasen2012-07-1110-32/+194
| | | | | | | | | | | | | | | | | | When running under systemd, call into systemd for suspend and hibernate instead of pm-utils. To capture resume events, install a small script that gets executed by systemd after resume and sends a dbus signal back to upower. To make this work, the upower backends gain a new signal, ::resuming, that they can optionally emit to signal that a resume happened. Backends opt in to this by returning TRUE from up_backend_emits_resuming(). In this case, upower doesn't assume the sleep command to block until resume, but instead waits for the ::resuming signal from the backend. The only backend that uses this mechanism is the linux backend when built with systemd support. Signed-off-by: Richard Hughes <richard@hughsie.com>
* trivial: Fix up some documentation typosLukas Tinkl2012-06-271-4/+4
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: Properly initialize update-time when creating devicesLandry Breuil2012-06-271-0/+4
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* trivial: post release version bumpRichard Hughes2012-06-252-5/+5
|
* Released UPower 0.9.17UPOWER_0_9_17Richard Hughes2012-06-251-0/+17
|
* linux: Remove obsolete check for magicmouse_ and duplicated wacom_ checksDaniel Nicoletti2012-06-181-4/+1
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* linux: Don't allow non-power-supply devices to set the OnBattery propertyDaniel Nicoletti2012-06-181-0/+4
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* Fix wrong PowerSupply property for devices without a scope sysfs attributeMartin Pitt2012-06-141-2/+2
| | | | | | | | | | | Fix NULL pointer comparison in up_device_supply_coldplug(). This caused (lt-upowerd:5754): GLib-CRITICAL **: g_ascii_strcasecmp: assertion `s1 != NULL' failed when a device does not have a "scope" sysfs attribute, and erroneously considering that device to not power the system. https://launchpad.net/bugs/1012578
* integration-test: fail on CRITICALsMartin Pitt2012-06-141-1/+11
| | | | | | | | | | | | Crash the daemon on any CRITICAL message, and also set WARNING and CRITICAL messages to be fatal on the client side. On the server side we might have some legitimate warnings, such as failing to load the config file from /usr/local/etc (if you build a tree without passing correct --sysconfdir options, etc.). This exposes the current CRITICAL the daemon raises at startup. As with that the daemon never starts up, fix the "wait for the daemon" loop to time out after 10 seconds.
* Selectively disable warnings for deprecated GValueArrayMartin Pitt2012-06-142-0/+12
| | | | | | | GLib 2.33 and further deprecates GValueArray. However, we still need it as long as we are using dbus-glib, so selectively disable the deprecation warnings for the three functions that use GValueArray. This allows us to continue to build with -Werror.
* Drop 'type' parameter from CancelRequest() signatureSascha Silbe2012-05-301-8/+0
| | | | | | | | | | | | | | CancelRequest() never worked because the method signature in D-Bus introspection data didn't match the actual function signature. Since the 'type' parameter isn't needed by the implementation (cookies are unique across all requests, not just requests of a certain type), we drop it from the public API. This makes it easier for clients to use the API as they only have to remember the cookie, not both cookie and type. Since it never worked in the first place, there are no backwards compatibility issues. Signed-off-by: Richard Hughes <richard@hughsie.com>
* Fix use-after-free of qos itemSascha Silbe2012-05-301-2/+6
| | | | | | | | | | | | up_qos_init() registers a destroyer callback for the qos item array, so the current item will be gone after the calls to g_ptr_array_remove(). By storing the item kind in a local variable we can pass it to up_qos_latency_perhaps_changed() later. Delaying the removal from the array is not an option as up_qos_latency_perhaps_changed() scans that array to re-evaluate the target latency. Signed-off-by: Richard Hughes <richard@hughsie.com>
* linux: Treat the battery state 'not charging' as PENDING_CHARGERichard Hughes2012-05-301-0/+2
| | | | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=826215
* Fix the LatencyChanged signalSascha Silbe2012-05-221-1/+1
| | | | | | | | The type of the 'value' parameter of the LatencyChanged signal is integer, not boolean. Fixing this causes the signal to actually be emitted. Signed-off-by: Richard Hughes <richard@hughsie.com>
* trivial: post release version bumpRichard Hughes2012-04-302-5/+5
|
* Released UPower 0.9.16UPOWER_0_9_16Richard Hughes2012-04-303-3/+26
|
* Correct the cap on the energy rateGary Ching-Pang Lin2012-04-271-1/+1
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* libupower-glib: fix small memory leakPavel Vasin2012-04-261-0/+1
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* Never detect HID devices with batteries as power suppliesRichard Hughes2012-04-181-2/+12
| | | | | | | | | | | | | | | | | Some HID devices with batteries (like bluetooth keyboards) have been creating power supply devices in sysfs since Linux 3.3. UPower thinks that they are system devices and shuts down the system if they get low. This is bad. This is fixed in Linux 3.4, where there is a new 'scope' file that defines if the device is powering the system. Helpfully ACPI batteries don't populate the scope value, but soon will. Add support for the scope attribute now, and default to system devices if it's missing. Note, you need to be running a 3.4 kernel or a 3.3 with the patch backported for this to work. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=806295
* Re-coldplug dock status when resuming from sleepEvan Broder2012-04-111-0/+17
| | | | | | | | It's possible for the docked state of a laptop (i.e. the display connectivity state) to change while the laptop is asleep. Signed-off-by: Evan Broder <evan@ebroder.net> Signed-off-by: Richard Hughes <richard@hughsie.com>
* Fix crash in up_device_csr_finalize()Martin Pitt2012-04-031-1/+1
| | | | | | Commit 46f1c7f0283 has a typo which prevents the fix from actually working. https://launchpad.net/bugs/972300
* Clamp the UPS percentage from 0 to 100 to fix syslog spamRichard Hughes2012-02-171-1/+1
| | | | This device bug seems to happen with CPS UPS units.
* Return all history records for a timespan of zeroRichard Hughes2012-01-181-1/+7
| | | | This makes the code conform to the documentation.
* Do not print error message for missing /etc/crypttab.Kelly Anderson2012-01-181-1/+3
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* Install a systemd service file if systemd is usedBenedikt Morbach2012-01-175-8/+45
| | | | | | | This makes dbus defer starting upowerd to systemd instead of doing it itself and thus puts the daemon under proper systemd supervision. Signed-off-by: Richard Hughes <richard@hughsie.com>
* libupower-glib: srcdir != builddir fixRyan Lortie2012-01-111-0/+1
|
* Add boolean RunPowersaveCommand to UPower.confLandry Breuil2012-01-062-2/+14
| | | | | | | Defaulting to true, it controls whether we want the powersave commands to be run when running on battery/plugging ac. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: set powersave command to apm -C/-ALandry Breuil2012-01-061-1/+5
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: no need to pass the fd aroundLandry Breuil2012-01-061-9/+6
| | | | | | better access it where needed through the singleton. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: handle case where minutes_left might be negativeLandry Breuil2012-01-061-2/+2
| | | | | | might not be useful since apm_fd is accessed through the singleton.. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: improve logic wrt sensor typeLandry Breuil2012-01-061-15/+5
| | | | | | | | in case some sensors are in AMPHOUR/AMPS and others in WATTHOUR/WATTS, don't assume they are all the same type. As a benefit, shrinks the code a bit. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: fix energy-rate calculationLandry Breuil2012-01-061-3/+5
| | | | | | | since acpibat.c r1.59, bst_rate type is SENSOR_AMPS or SENSOR_WATTS and value has been corrected. Tweak accordingly. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: use a singleton pattern to access /dev/apmLandry Breuil2012-01-063-23/+22
| | | | | | up_apm_get_fd() opens /dev/apm only if it's not already opened. Signed-off-by: Richard Hughes <richard@hughsie.com>
* openbsd: Fix history by not trying to refresh if /dev/apm wasn't opened yetLandry Breuil2012-01-061-2/+5
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* trivial: post release version bumpRichard Hughes2011-12-052-5/+5
|
* Released UPower 0.9.15UPOWER_0_9_15Richard Hughes2011-12-051-0/+19
|
* src/linux/integration-test: Fail gracefully if GI is not availableMartin Pitt2011-12-051-2/+6
|
* Fix invocation of src/linux/integration-testMartin Pitt2011-12-051-1/+1
| | | | | In Makefile.am "check", do not call the test suite through "python". Just call it directly and let the hashbang take care of the interpreter.
* Revert "src/linux/integration-test: Do not crash on absent ↵Martin Pitt2011-12-051-12/+5
| | | | | | | | | _outcomeForDoCleanups" This reverts commit 14761c09d27934188829e3c804aca6593757ed9b. The real reason for the failure is that Makefile.am calls the script with "python" which is Python 2, but we need Python 3.
* src/linux/integration-test: Do not crash on absent _outcomeForDoCleanupsMartin Pitt2011-12-051-5/+12
| | | | | | unittest.TestCase unfortunately does not have any public API to check whether a test case succeeded, so we use the private self._outcomeForDoCleanups. This does not seem to exist every time, so avoid a crash if it doesn't.
* upower: Handle Linux power supplies not exporting a present propertyHeiko Stübner2011-12-031-1/+6
| | | | | | | | | | | | According to Anton Vorontsov (Linux power supply maintainer) power supplies should not export a present property when they are not hotpluggable and users of the properties should handle supplies without present-property as always present. This patch implements this feature using an additional sysfs_file_exists call before sysfs_get_bool. Signed-off-by: Richard Hughes <richard@hughsie.com>
* trivial: USB devices are assumed to be 5VRichard Hughes2011-11-291-0/+9
|
* trivial: fix the name of the percentage fileRichard Hughes2011-11-291-1/+1
|
* Don't assert when the power_supply device type is usbRichard Hughes2011-11-291-4/+1
|
* Move the wacom hack to allow us to support other types of USB deviceRichard Hughes2011-11-291-26/+17
|
* If a power-supply device doesn't report charge or energy, try to read the ↵Richard Hughes2011-11-291-1/+8
| | | | percentage
* Fix crash in up_device_csr_finalize()Martin Pitt2011-11-111-1/+2
| | | | | | Spotted when running regression tests in KVM. There, initializing a HID device causes a "could not initialize libusb: -99" warning, but the device is created nevertheless. Do not crash in _finalize() by trying to call libusb_exit(NULL).
* src/linux/integration-test: Port to Python 3Martin Pitt2011-11-111-7/+8
|
* Use linear regression to get better predicted battery timesLeonardo Robol2011-10-191-24/+99
| | | | | | | | | | | For hardware that has no rate data we use the differences in charge over a time period to work out the effective rate. Using linear regression this estimation is much more realistic. To do this, introduce a simple circular buffer and use an index to calculate the rate on each update. Signed-off-by: Richard Hughes <richard@hughsie.com>