Find a file
Jelle van der Waa 1e58e8218a Stop using deprecated g_get_current_time
g_get_current_time was deprecated in 2.62 and can be directly replaced with
g_get_real_time.
2024-03-13 08:59:46 +01:00
.ci ci: Permit XML to be invalid to avoid issues with colored logs 2022-05-10 11:06:18 +02:00
dbus docs: Document all current device types 2024-03-05 22:36:39 +01:00
doc doc: Remove website 2022-07-11 17:12:10 +02:00
etc etc: Document Time* unit 2021-09-07 09:27:20 +00:00
libupower-glib Stop using deprecated g_get_current_time 2024-03-13 08:59:46 +01:00
po Add Georgian translaton 2022-07-21 08:01:24 +00:00
rules rules: Update hwdb from upstream NUT 2024-03-05 15:32:48 +08:00
src Stop using deprecated g_get_current_time 2024-03-13 08:59:46 +01:00
tools Revert "all: Remove Lid handling" 2024-01-26 14:57:27 +00:00
.gitlab-ci.yml Revert "ci: Update last ABI break" 2024-02-09 15:07:21 +08:00
AUTHORS trivial: add my copyright 2008-09-06 11:12:24 +01: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
COPYING trivial: Rename a few 'DeviceKit-power' strings we missed 2010-05-28 15:00:07 +01:00
HACKING HACKING: Mention "make check" in the file 2017-09-08 17:40:18 +02:00
meson.build Bump glib2 requirement 2024-03-13 08:59:46 +01:00
meson_options.txt rules: Update udev rules and migrate to use hwdb 2022-04-01 11:47:17 +02:00
NEWS 1.90.2 2023-07-06 10:52:27 +02:00
README Bump glib2 requirement 2024-03-13 08:59:46 +01:00
RELEASE RELEASE: Update notes on how to do releases 2022-02-09 17:53:54 +01:00

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

Requirements:

   glib-2.0             >= 2.66.0
   gio-2.0              >= 2.16.1
   gudev-1.0            >= 235    (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.

Debugging
---------

When doing bug reports, the following information can be useful:
 * `grep . /sys/class/power_supply/*/*`:
   This includes the current kernel view of all power supplies in the
   system. It is always a good idea to include this information.
 * `udevadm info -e`:
   This shows the hardware configuration and is relevant when e.g. the
   type of an external device is misdetected.
 * `upower -d`:
   Shows upower's view of the state
 * `upower --monitor-detail`:
   Dumps device information every time that a change happens. This helps
   with debugging dynamic issues.
 * `udevadm monitor`:
   Dumps the udev/kernel reported hardware changes (and addition/removal).
   This is helpful when debugging dynamic issues, in particular if it is
   not clear whether the issue is coming from the kernel or upower.

In addition, it can also be useful to run upower in debug mode and post the
logs. There are two ways of doing so:
 * Run upower daemon manually, you can do so using:
   `sudo /usr/libexec/upowerd -rd`
 * Modify the systemd service and restart. This is best done by:
   1. `sudo systemctl edit upower.service`
   2. Adding the two lines:
      ```
      [Service]
      Environment=G_MESSAGES_DEBUG=all
      ```
   3. `sudo systemctl restart upower.service`
   4. Grab logs using `journalctl -u upower.service` or similar