Find a file
2025-01-08 14:01:34 +08:00
.ci Reformat python code style with black 2025-01-08 14:01:34 +08:00
contrib ci: Add codespell test to the pre-commit test 2025-01-08 13:59:50 +08:00
data/zsh-completion add completions for CLI 2024-10-26 19:56:28 +00:00
dbus dbus: G_MAXUINT means ignore ChargeStartThreshold or ChargeEndThreshold 2024-08-23 22:21:52 +08:00
doc doc: Remove website 2022-07-11 17:12:10 +02:00
etc Support fractional battery percent. 2024-09-12 15:55:00 +08:00
libupower-glib Fix trailing white space and end of file 2025-01-08 14:01:34 +08:00
po Add Georgian translaton 2022-07-21 08:01:24 +00:00
policy Revert "policy: Remove policy for removed features" 2024-08-22 14:20:33 +08:00
rules rules: 95-upower-hid.hwdb: Update hwdb for HID devices 2024-12-31 13:39:50 +08:00
src Reformat python code style with black 2025-01-08 14:01:34 +08:00
tools Revert "all: Remove Lid handling" 2024-01-26 14:57:27 +00:00
.gitlab-ci.yml ci: Test on Debian system 2024-09-12 15:10:15 +08:00
.markdownlint.json ci: markdownlint: Add markdownlint to the pre-commit check 2025-01-08 13:59:50 +08:00
.pre-commit-config.yaml ci: Add python code style check to the pre-commit test 2025-01-08 14:01:29 +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 Update README.md and HACK to match markdown.lint style 2025-01-08 13:59:50 +08:00
meson.build add completions for CLI 2024-10-26 19:56:28 +00:00
meson_options.txt add completions for CLI 2024-10-26 19:56:28 +00:00
NEWS NEWS: Update release date 2024-09-18 11:25:08 +08:00
README Update README.md and HACK to match markdown.lint style 2025-01-08 13:59:50 +08: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)
  polkit-gobject-1     >= 124
```

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