Find a file
Philipp Zabel 2949136b15 linux: Fix < 0.01 W energy-rate readings from power_now sysfs property
Currently, if a power supplies' power_now sysfs file reports discharge
rates < 0.01 W, the code will try to calculate the discharge rate from
the legacy sysfs files. On new kernels where those don't exist, this
produces wrong results.

For example, on a dual-battery Thinkpad T450s, while the external
battery is discharging, the internal battery reports power_now = 0,
but the corresponding upower energy-rate field incorrectly reads
about 2.3 W.

This patch fixes the issue by falling back to the legacy code only if
the legacy current_now sysfs file exists.

Closes: #7, #44
2021-06-17 18:14:53 +02:00
.ci ci: Ignore changes to "kind" enums 2021-06-17 13:47:33 +02:00
dbus docs: Mention that not all batteries are laptop batteries 2019-05-07 11:44:22 +00:00
doc doc: Fix dist not working 2018-10-25 13:12:35 +02:00
etc etc: Update IgnoreLid documentation 2015-11-12 16:38:42 +01:00
libupower-glib lib: Add UP_DEVICE_KIND_BLUETOOTH_GENERIC type 2021-06-17 13:47:33 +02:00
m4 Use PIE to better secure installed tools and also use full RELRO in the daemon 2013-05-07 14:07:31 +01:00
po build: Migrate from intltool to gettext 2019-05-18 18:38:35 +02:00
rules data: Also remove HID++ udev rules 2021-06-17 14:37:25 +02:00
src linux: Fix < 0.01 W energy-rate readings from power_now sysfs property 2021-06-17 18:14:53 +02:00
tools up-tool: Catch NULL return for more upower API calls 2021-02-04 09:45:50 +00:00
.gitlab-ci.yml ci: Export the tarball in the artifacts 2021-06-17 15:45:02 +02:00
AUTHORS trivial: add my copyright 2008-09-06 11:12:24 +01:00
autogen.sh build: Migrate from intltool to gettext 2019-05-18 18:38:35 +02:00
code-of-conduct.md Add code of conduct document 2019-07-25 12:08:15 +02:00
COMMITMENT Add COMMITMENT file as part of GPL Common Cure Rights Commitment 2018-06-18 16:11:43 +01:00
configure.ac linux: Use new uncached sysfs attr gudev API 2021-06-17 12:01:38 +02:00
COPYING trivial: Rename a few 'DeviceKit-power' strings we missed 2010-05-28 15:00:07 +01:00
git.mk Use git.mk and remove the manual .gitignore files 2011-07-19 12:40:21 +01:00
HACKING HACKING: Mention "make check" in the file 2017-09-08 17:40:18 +02:00
Makefile.am build: Force enable introspection for "make distcheck" to work 2021-06-17 15:45:02 +02:00
NEWS 0.99.12 2021-06-17 15:45:02 +02:00
README Update README 2016-02-17 17:01:16 +00:00
RELEASE trivial: post release version bump 2017-11-28 11:16:37 +00:00
upower-glib.pc.in lib: Remove dbus-glib from the dependencies 2013-10-14 10:42:56 +02:00

===============
UPower
===============

Requirements:

   glib-2.0             >= 2.34.0
   gio-2.0              >= 2.16.1
   gudev-1.0            >= 147    (Linux)
   libusb-1.0           >= 1.0.0  (Linux)
   libimobiledevice-1.0 >= 0.9.7  (optional)

UPower is an abstraction for enumerating power devices,
listening to device events and querying history and statistics.
Any application or service on the system can access the
org.freedesktop.UPower service via the system message bus.