No description
  • C 67.7%
  • Python 29.5%
  • Meson 2.2%
  • Shell 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fimeg 800a8fde18 charge thresholds: read and write them where they actually live
On a split gauge/charger the threshold attributes are on the charger, not
the battery, and upstream only looks at the battery — so a settable ceiling
reported as unsupported, and a write went to a path that does not exist.
Same supplier walk charge_type already uses. Also report the live value when
no hwdb CHARGE_LIMIT entry recommends a pair.
2026-08-24 14:04:28 -04:00
.ci ci: Revamp the CI to make more efficient use of ci-templates 2026-05-28 20:08:54 +10:00
.gitea/workflows project the tested ref onto the public forge 2026-08-23 20:55:08 -04:00
.publication carry the publication gate on the candidate ref 2026-08-23 20:15:27 -04:00
contrib ci: Use the ci-fairy job to check commit messages 2026-05-28 20:08:54 +10:00
data/zsh-completion upower: Add a -b/--battery option to dump only battery information 2025-08-26 13:29:52 +08:00
dbus Expose ChargeType and PercentageTrusted on Device 2026-07-17 16:09:44 -04:00
doc upower: Add a -b/--battery option to dump only battery information 2025-08-26 13:29:52 +08:00
etc linux: up-backend: Auto CriticalPowerAction 2026-03-06 12:19:53 +08:00
libupower-glib up-types: recognize kernel's "N/A" spelling for CHARGE_TYPE_NONE 2026-07-24 09:08:41 -04:00
po Update LINGUAS 2025-01-17 02:11:22 +00:00
policy policy: org.freedesktop.upower.rules: grant permission for skipping the inhibitor 2026-03-06 12:19:57 +08:00
rules rules: 60-upower-battery: Fix for Asus battery charge threshold detection 2026-07-02 15:03:33 +08:00
src charge thresholds: read and write them where they actually live 2026-08-24 14:04:28 -04:00
tools tools: up-tool: Free the memory with GLib auto clean up 2026-06-02 16:44:51 +08:00
.git-blame-ignore-revs Ignore commits for tree wide changes 2025-01-08 16:54:58 +08:00
.gitconfig Ignore commits for tree wide changes 2025-01-08 16:54:58 +08:00
.gitignore gitignore pycache and build dirs 2026-07-17 16:09:56 -04:00
.gitlab-ci.yml ci: fix meson parameter for doc generation 2026-05-29 13:47:55 +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 pre-commit-config: Remove deprecated default_stages "commit" 2025-01-13 08:55:18 +00:00
.publication-history-allowlist.txt review the commit that installs the gate 2026-08-23 20:15:47 -04:00
.publication-mechanism.json carry the publication gate on the candidate ref 2026-08-23 20:15:27 -04: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.md HACKING: Add Signed-off-by tag in the commit message 2026-05-25 17:18:31 +08:00
meson.build Release version 1.91.3 2026-07-02 15:39:04 +08:00
meson_options.txt meson_options: replace deprecated boolean variable 2025-09-17 12:27:42 +08:00
NEWS Release version 1.91.3 2026-07-02 15:39:04 +08:00
README.md contrib: add a tartan static analysis script and description 2025-12-29 17:02:31 +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

Using tartan

Tartan is a LLVM static analysis plugin built to analyze GLib code. It can be installed and then run using:

mkdir build
cd build
meson setup ..
SCANBUILD=../contrib/tartan.sh ninja scan-build