summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
30 hoursmeson_options: replace deprecated boolean variableHEADmasterKate Hsuan1-2/+2
2 daysrules: 95-upower-hid: update hwdb from upstream NUTKate Hsuan1-0/+1
Update to the latest hwdb from NUT. Link: https://networkupstools.org Link: https://raw.githubusercontent.com/networkupstools/nut/master/scripts/upower/95-upower-hid.hwdb
2 daysbuild: Make installation of tests optionalLuciano Santos2-16/+23
Default to installing them, while letting people/distributors decide what they want.
13 dayslinux: up-enumerator-udev: also permit lp5523:kb nameSicelo A. Mhlongo1-1/+6
While common keyboard backlight devices use 'kbd_backlight' in the name, per linux kernel include/dt-bindings/leds/common.h, there are a few legacy names, including 'lp5523:kbN'. They cannot be easily changed now because it would break userspace, hence the names are still provided in the kernel. Support them in upower as well. The lp5523 as used on the Nokia N900 exposes six independent keyboard backlight LEDs, and UPower is able to manage them with this patch in place.
13 dayslinux: integration-test: Multiple keyboard backlight LED supportKate Hsuan1-0/+130
The integration test for multiple keyboard backlight support.
13 daysup-daemon: The implementation of EnumerateKbdBacklightKate Hsuan1-0/+34
The implementation for enumerating all keyboard backlight LED objects on the system.
13 daysdbus: org.freedesktop.UPower: Enumerate kbd backlight LEDsKate Hsuan1-0/+15
Enumerate all keyboard backlight LED objects on the system.
13 dayslinux: up-enumerator-udev: enumerate the LED subsystemKate Hsuan1-2/+2
The LED udev subsystem was added to the list to watch the keyboard backlight LED device events.
13 daysup-daemon: device-added and device-removed keyboard backlight deviceKate Hsuan1-26/+52
The keyboard backlight device will be added to or removed from DeviceList when receiving the "device-added" and "device-removed" signal.
13 daysup-daemon: DeviceList for keyboard backlight LED devicesKate Hsuan1-0/+5
The DeviceList was created to store the keyboard backlight LED devices.
13 dayslinux: up-enumerator-udev: Process add, change, and remove udev events for ↵Kate Hsuan1-52/+109
keyboard backlight device Add, update, and remove the keyboard backlight LED device when receiving add, change, and remove udev events.
13 dayslinux: up-kbd-backlight-led: the keyboard backlight control implementation ↵Kate Hsuan3-0/+380
for Linux The implementation for Linux included: 1. Set and get brightness. 2. Get max brightness. 3. Signal if the brightness was changed by the device.
13 dayslinux: up-backend: Add and remove keyboard backlight LED deviceKate Hsuan1-9/+22
These are the callback functions for the signals "device-added" and "device-removed" to add and remove keyboard backlight devices.
13 daysup-device-list: Introduce the UpDeviceKbdBacklight objectKate Hsuan1-1/+5
This commit makes UpDeviceList store the UpDeviceKbdBacklight objects and sets the udev native path property of UpDevice and UpDeviceKbdBacklight.
13 daysup-device-kbd-backlight: The parent class for keyboard backlight controlKate Hsuan3-0/+472
This parent class can be used for multiple implementations, such as freebsd and Linux. The child class inherits it to register the device to upower and access the dbus services.
13 daysdbus: org.freedesktop.UPower.KbdBacklight: Description for deprecating ↵Kate Hsuan1-0/+6
the KbdBacklight object path The object path /org/freedesktop/UPower/KbdBacklight is going to be deprecated in the future. The upper-layer app should migrate to the new API instead.
13 daysdbus: KbdBacklight: Add a native path attributeKate Hsuan1-0/+13
The DBus property shows the udev native path.
2025-08-26Release 1.90.10v1.90.10Kate Hsuan2-1/+17
- Fix wrong model name of the devices (!267, #309) - Switch charge_types to "Custom" when charging threshold is enabled (!268, #275) - Fix invalid command line arguments (!269) - Fix leak when reporting daemon usage error (!270) - OpenBSD: support battery status from qcpas (!272) - Fix history progression (!274, #316) - Add a battery filter to the upower command line (!275) - Change the charging behaviors using charge_types (!276, !46, #275) - Fix integration tests issues, including floating point value and race between umockdev and upower (!277, !278) - Rework upower command (!280) - Propagate charge-threshold-enabled to display device (!281)
2025-08-26upower: Add a `-b`/`--battery` option to dump only battery informationJosh Triplett3-0/+17
This is useful when asking people to give information about battery health. It avoids having to give two-step instructions of first enumerating devices with `upower -e`, then looking for a device whose name starts with `/org/freedesktop/UPower/devices/battery_`, then running `upower -i` on that device. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2025-08-21up-daemon: Propagate charge-threshold-enabled to display deviceFlorian Müllner1-0/+10
The property indicates that a device is plugged-in but not charging because of the charging threshold. Desktops may want to indicate that state, but the property is currently only exposed on actual devices, not the virtual display device that is usually exposed in the interface. To address this, propagate the property to the display device if at least one device has charge thresholds enabled. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5228
2025-08-20tools: up-tool: rework upower dump and enumerateKate Hsuan1-54/+99
1. Move dump and enumerate to the separated functions. 2. Introduce an output filter. Co-work-with: Cursor Reviewed-by: Kate Hsuan <hpa@redhat.com>
2025-08-12linux: integration-test: The type of percentage property is doubleKate Hsuan1-19/+25
The data type of the "Percentage" property is double, so the value is a floating point number, ex, 100.0
2025-08-12linux: integration-test: fix comparison of floating point valuesMichael Biebl1-68/+114
Use assertAlmostEqual for all values that are floating point numbers: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual This avoids issues with excessive precision on i386. More information https://wiki.debian.org/ArchitectureSpecificsMemo#i386 See also the corresponding downstream bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050436 The patch was generated using: for i in Capacity Energy EnergyEmpty EnergyFull EnergyFullDesign EnergyRate Luminosity Percentage Temperature Voltage ; do sed -i -r "s/(assertEqual)(.*$i)/assertAlmostEqual\2/g" src/linux/integration-test.py done Fixes: #251
2025-08-11linux: integration-test: the settings discovery for charge thresholdKate Hsuan1-0/+138
The test case for settings discovery for charge threshold. The test cases include: 1. only charge_types (4) 2. charge_control_start_threshold + charge_control_end_threshold + charge_types (7) 3. charge_control_end_threshold + charge_types (6)
2025-08-11linux: up-device-supply-battery: Discover the settings of charge thresholdKate Hsuan1-2/+18
This commit discovers the settings, including charge_control_start_threshold, charge_control_end_threshold, and charge_types and update the results to the battery information.
2025-08-11up-device-battery: set up charge-threshold-settings-supported propertyKate Hsuan2-0/+3
Setup and update the charge-threshold-settings-supported property.
2025-08-11dbus: org.freedesktop.UPower.Device: the ChargeThresholdSettingsSupported ↵Kate Hsuan1-0/+20
property The types of settings for charge thresholds that are supported. The value is a bitmask value and it is the sum of the supported types. 1: The system supports charge start threshold. The battery discharges to a percentage, then starts charging. 2: The system supports charge end threshold. The battery charges to a percentage, then stops charging. 4: The system supports optimized charging behaviors controlled by the system firmware. Examples: If the system supports charge start threshold and charge end threshold, the value is 3. If the system supports charge end threshold and the battery charging behavior is controlled by the system firmware, the value is 6.
2025-08-11linux: integration-test: Switch between Long_Life, Fast, Standard, and AdaptiveKate Hsuan1-4/+182
Charge_types has to be "Long_Life" if charging threshold is enabled. Charge_types has to be "Fast", "Standard", or "Adaptive" if charging threshold is disabled.
2025-08-07linux: up-device-supply-battery: Set charge_types to enable/disable the ↵Kate Hsuan1-2/+21
charge threshold If the charge threshold is enabled, the charge_types set "Long_Life". If the charge threshold is disabled, the charge_types set to any of charge_types for charging, such as "Fast", "Standard", and "Adaptive". This commit is only for the system that only has the charge_types attribute to control the battery behaviour.
2025-08-07linux: up-device-supply-battery: Using charge_types Long_Life and Standard ↵Kate Hsuan1-3/+50
to manage charging threshold We found some systems, such as Lenovo ideapad that don't support charge_control_start_threshold  and charge_control_end_threshold but it provide the charge_types Long_Life and Standard. The chatre_types Long_Life operate the battery in the conservation mode. That means if Long_Life and Standard are found, the system supports the charge threshold feature. Co-work-with: Cursor Reviewed-by: Kate Hsuan <hpa@redhat.com>
2025-08-07linux: up-device-supply-battery: Set charge_types through an enumKate Hsuan1-55/+62
The charge enum is used to set the charge_types and namespacing the emum to prevent varaible name conflicts.
2025-08-07linux: integration-test: reduce the test failure for the slow systemKate Hsuan1-16/+18
On a slow system like riscv64, the test_daemon_version and test_daemon_restart tests sometimes failed. A delay was added after the daemon starts to give it enough time to fully initialize, which has reduced the chance of these tests failing.
2025-08-07linux: integration-test: fix random test failure for test_bluetooth_hidpp_mouseKate Hsuan1-3/+4
Sometime we found the errors shows below when pipeline test was running. 379s ERROR: test_bluetooth_hidpp_mouse (__main__.Tests.test_bluetooth_hidpp_mouse) 379s Logitech Bluetooth LE mouse with HID++ kernel support 379s ---------------------------------------------------------------------- 379s Traceback (most recent call last): 379s File "/usr/libexec/upower/integration-test.py", line 4380, in test_bluetooth_hidpp_mouse 379s self.assertEventually( 379s ~~~~~~~~~~~~~~~~~~~~~^ 379s lambda: self.get_dbus_dev_property(bat0_up, "Model"), value=alias 379s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 379s ) 379s ^ 379s File "/usr/libexec/upower/integration-test.py", line 399, in assertEventually 379s if condition() == value: 379s ~~~~~~~~~^^ 379s File "/usr/libexec/upower/integration-test.py", line 4381, in <lambda> 379s lambda: self.get_dbus_dev_property(bat0_up, "Model"), value=alias 379s ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 379s File "/usr/libexec/upower/integration-test.py", line 316, in get_dbus_dev_property 379s return self.dbus.call_sync( 379s ~~~~~~~~~~~~~~~~~~~^ 379s UP, 379s ^^^ 379s ...<7 lines>... 379s None, 379s ^^^^^ 379s ).unpack()[0] 379s ^ 379s gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/UPower/devices/mouse_dev_11_22_33_44_AA_BB” (19) 379s The upower and bluez daemons were started after the udev was initialized to avoid the random errors.
2025-07-23linux: integration-test: Switch the charge_types between Custom and Fast ↵Kate Hsuan1-0/+266
with charging threshold status The charge_types is set to "Custom" when the charging threshold is enabled. If the charging threshold is disabled, it will be reset to "Fast".
2025-07-23linux: up-device-supply-battery: Set charge_types to "Custom" when enabling ↵Kate Hsuan1-0/+200
charging threshold If the charge_types isn't set to "Custom" on a Dell laptop, the charging threshold doesn't work. This commit sets the charge_types to "Custom" if the charging threshold is enabled. Also, the charge_types will be set to "Fast", "Standard", or "Adaptive" when the charging threshold is disabled. This commit reads and writes the battery udev attribute "charge_types". However, this attribute can't be found on some of the systems, so the error on reading and writing charge_types attribute is ignored.
2025-06-25up-history: reverse preset progressionFabrice Bellet1-2/+2
2025-06-05openbsd: add support to fetch battery status from qcpasLandry Breuil1-0/+2
2025-06-04tools: Reorder upower(1) command-line options to match manual pageUla Shipman1-1/+1
2025-06-04docs: Document all upower(1) command-line optionsUla Shipman1-3/+35
2025-05-29tools: Handle invalid command-line argumentsUla Shipman1-1/+6
2025-05-27daemon: Fix memory leak when reporting usage errorUla Shipman1-0/+1
2025-05-13linux: integration-test: Two mice were paired with a unifying receiverKate Hsuan1-0/+134
The model name of the two mice should be displayed when paired with one unifying receiver.
2025-05-13linux: up-enumerator-udev: Prevent reading the sysfs path from a ↵Kate Hsuan1-0/+6
non-GUdevDevice object A non-GUdevDevice object may be included in the sibling device list, since the udev information was created slowly. This object triggers errors when upower tries to get udev information. Therefore, get_latest_udev_device() returns NULL, when it receives a non-GUdevDevice object. The error messages are shown as follows: (upowerd:2026931): GUdev-CRITICAL **: 10:38:29.775: g_udev_device_get_sysfs_path: assertion 'G_UDEV_IS_DEVICE (device)' failed (upowerd:2026931): GUdev-CRITICAL **: 10:38:29.775: g_udev_client_query_by_sysfs_path: assertion 'sysfs_path != NULL' failed
2025-04-30linux: up-device-supply: Only update model name when the device is under the ↵Kate Hsuan1-7/+20
same parent f17d3bf fixed the unstable joypad model name but led the hid++ devices to show the incorrect model name if more than one device is paired to a unifying receiver. The patch only updates the model name when the device is under the same parent. Resolves: #309
2025-04-16linux: integration-test: Test exporting sysfs attributesSicelo A. Mhlongo1-0/+40
Add test for DBus exporting of the following sysfs attributes: 1. capacity_level 2. voltage_min_design 3. voltage_max_design Related: #301 Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-04-16lib: up-device: Expose CapacityLevel, VoltageMinDesign, and VoltageMaxDesignSicelo A. Mhlongo1-0/+70
For supplies that report the voltage_min_design, voltage_max_design, and capacity_level attributes on sysfs, expose them via libupower for possible use by clients. Related: #301 Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-04-16linux: up-device-supply-battery: read values of capacity_level and ↵Sicelo A. Mhlongo1-0/+6
voltage_min/max For Linux systems that provide these attributes, extend the implementation by reading the values for the design maximum and minimum voltage for the battery, as well as the coarse capacity level reported by the kernel. Related: #301 Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-04-16up-device-battery: Define capacity-level, voltage-min-design and ↵Sicelo A. Mhlongo2-0/+9
voltage-max-design properties Extend the parent class of the battery to support reporting the design maximum and minimum voltage, as well as the kernel-derived capacity level. Related: #301 Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-04-16dbus: Define CapacityLevel, VoltageMinDesign and VoltageMaxDesign propertiesSicelo A. Mhlongo1-0/+50
Some drivers provide capacity_level, voltage_min_design, and voltage_max_design properties on sysfs even for system supplies. Expose these properties over DBus for consumption by clients. Related: #301 Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
2025-04-11linux: integration_test: Wait 5 seconds for bluez to set up the device ↵Kate Hsuan1-0/+2
information