summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* linux: Fix warning when bluez Appearance property isn't setwip/hadess/bluez-memleakBastien Nocera2019-10-171-4/+9
| | | | | | | | The Appearance property might not be available, and would cause warnings like: upowerd[17733]: g_variant_get_type: assertion 'value != NULL' failed upowerd[17733]: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed upowerd[17733]: g_variant_get_uint16: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_UINT16)' failed
* linux: Fix memory leak in Bluez backendBastien Nocera2019-10-171-4/+13
| | | | g_dbus_proxy_get_cached_property() returns transfer full GVariants.
* trivial: post release version bumpMartin Pitt2019-09-031-1/+1
|
* Released UPower 0.99.11UPOWER_0_99_11Martin Pitt2019-09-031-0/+20
|
* Add code of conduct documentBastien Nocera2019-07-251-0/+3
|
* UpKbdBacklight: Fix endless loop burning 100% CPU on keyboard plugoutHans de Goede2019-06-041-1/+6
| | | | | | | | | | | | | | | | | If an external keyboard with a backlight gets unplugged then up_kbd_backlight_event_io would constantly get called, burning 100% CPU. To make things worse, up_kbd_backlight_event_io would also constantly post DBUS events, causing gnome-shell to also become very unresponsive. This commit fixes this by returning FALSE from up_kbd_backlight_event_io on unplug. While at it also fix calling up_kbd_backlight_emit_change with a negative brightness value in other error scenarios. Specifically this fixes calling up_kbd_backlight_emit_change with -1 on the initial up_kbd_backlight_event_io call in which case up_kbd_backlight_brightness_read will typically fail with ENODATA.
* build: Migrate from intltool to gettextMartin Blanchard2019-05-186-16/+82
| | | | https://gitlab.freedesktop.org/upower/upower/issues/89
* linux: Use symbolic names for device types in test suiteBastien Nocera2019-05-091-13/+9
|
* linux: Add gaming input type to the test suiteBastien Nocera2019-05-091-1/+2
| | | | The enum member was missing.
* rules: Reduce our list of HID++ devicesBastien Nocera2019-05-091-5/+0
| | | | | | | | Those devices have been supported in the Linux kernel since at least 3.19, so there's no need to try and support those with our user-space handling. Closes: #3
* rules: Split off HID++ rulesBastien Nocera2019-05-073-15/+16
| | | | They should probably have been split off from the start.
* linux: Add test for Logitech unknown device raceswip/hadess/fix-logitech-unknownBastien Nocera2019-05-071-0/+51
| | | | | | Check that external devices which show up as "battery" types have their capacity_level correctly read, and that the device's type will be correctly read after an input node is attached.
* linux: Start polling for unknown device batteries tooBastien Nocera2019-05-071-1/+1
| | | | | | | | This check is supposed to start a poll for 1) batteries embedded in external devices 2) batteries when battery polling is not disabled. Make sure to start the poll for all batteries embedded in devices even the ones that are just detected as "battery".
* linux: Retry to get a battery type if it's unknownBastien Nocera2019-05-071-0/+11
| | | | | | | | | | On some devices the power_supply node will show up before a related node such as "input", making it impossible to know which type of device we're attached to without waiting. Try to detect the device type again if the device type is still "battery". This fixes some Logitech devices appearing as "Battery" instead of their respective device type, such as "mouse".
* linux: Don't treat device batteries like laptop batteriesBastien Nocera2019-05-071-7/+4
| | | | | | | | | | | | | | | | | | | Use the correct refresh function for device batteries which aren't of a known type. This fixes battery information not getting updated on many Logitech wireless devices. Reproducer: - Unplug Logitech receiver - Replug Logitech receiver - Press button on Logitech keyboard - Move mouse/touchpad The touchpad battery would be stuck in "unknown" and with a "type" of battery. This commit forces the correct refresh function to be used, one that reads the capacity_level on those devices, and will update the overall battery level. Closes: #72
* docs: Mention that not all batteries are laptop batteriesBastien Nocera2019-05-071-0/+6
| | | | | They might be device batteries where the device type is not known or catalogued.
* Harden systemd serviceTopi Miettinen2019-04-051-0/+17
| | | | Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
* Let systemd create /var/lib/upowerMartin Pitt2019-02-241-0/+1
| | | | | | | | | This directory may not exist when cleaning out /var (e. g. on stateless systems). As upowerd cannot mkdir it by itself due to `ProtectSystem`, let systemd create it via `StateDirectory`. Keep `ReadWritePaths` and the `mkdir` in the Makefile to continue to support a non-default `--historydir`.
* Move D-Bus policy file to /usr/share/dbus-1/system.d/Michael Biebl2019-02-241-1/+1
| | | | | | | | | | | To better support stateless systems with an empty /etc, the old location in /etc/dbus-1/system.d/ should only be used for local admin changes. Package provided D-Bus policy files are supposed to be installed in /usr/share/dbus-1/system.d/. This is supported since dbus 1.9.18. https://lists.freedesktop.org/archives/dbus/2015-July/016746.html
* Replace use of G_TYPE_INSTANCE_GET_PRIVATEChristian Kellner2019-02-2126-69/+27
| | | | | | G_TYPE_INSTANCE_GET_PRIVATE has been deprecated since glib version 2.58 and should be replaced with the xxx_get_instance_private (obj) which is generated by G_ADD_PRIVATE.
* Replace use of deprecated g_type_class_add_privateChristian Kellner2019-02-2126-70/+26
| | | | | | | | Use G_DEFINE_TYPE_WITH_CODE (..., G_PRIVATE_ADD (...)) instead of the (deprecated since glib 2.58) function g_type_class_add_private to add a private structure for a type. Bump the minimal required version of glib to 2.38.0, the version where G_PRIVATE_ADD was added.
* trivial: post release version bumpChristian Kellner2019-02-201-1/+1
|
* Released UPower 0.99.10UPOWER_0_99_10Christian Kellner2019-02-202-1/+10
|
* integration-test: Test mapping pending-charge to fully-chargedJoão Paulo Rechi Vita2018-12-181-0/+25
|
* linux: Map pending-charge to fully-charged when charge is 100%João Paulo Rechi Vita2018-12-181-0/+6
| | | | | | | | Some devices report "Not charging" when the battery is full and AC power is connected. In this situation we should report fully-charged instead of pending-charge. Closes: #86.
* linux: Don't set out_state before state is finalJoão Paulo Rechi Vita2018-12-181-1/+2
| | | | | | | | Currently up_device_supply_refresh_battery sets out_state before the state value is definitive, so the wrong state value is returned to the caller. Luckily the only caller does not make use of this value at the moment, so there are no user-visible consequences. Nonetheless this is a bug, so this commit fixes it.
* integration-test: Test DisplayDevice pending-chargeJoão Paulo Rechi Vita2018-11-141-0/+72
| | | | | | | Test relaying the pending-charge state to the DisplayDevice. This commit adds three tests: only one battery pending-charge, one battery pending-charge and another one discharging, and one battery pending-charge and another one charging.
* integration-test: Define PENDING_CHARGE and PENDING_DISCHARGE statesJoão Paulo Rechi Vita2018-11-141-1/+3
| | | | | Add definitions for UP_DEVICE_STATE_PENDING_CHARGE and UP_DEVICE_STATE_PENDING_DISCHARGE.
* daemon: Consider pending-charge when calculating the display stateJoão Paulo Rechi Vita2018-11-141-1/+5
| | | | | | | | | | | | | | Without this change if all batteries in the system are in the pending-charge state, the display device state is set to unknown, and its icon to battery-missing-symbolic. This change makes the pending-charge state be considered when calculating the DisplayDevice state, setting it to pending-charge if at least one battery in the system is pending-charge and no other is charging or discharging. Closes: #81 Closes: #19
* daemon: Make comment more succinctJoão Paulo Rechi Vita2018-11-141-3/+3
| | | | | | | This will help make it more clear when adding an extra state on the following commit. It also makes the language consistent between the different lines. There are no changes on the meaning of these lines nor any functional changes on this commit.
* 0.99.9UPOWER_0_99_9Bastien Nocera2018-10-252-1/+11
|
* ci: Run distcheck as a testBastien Nocera2018-10-251-0/+1
|
* doc: Fix dist not workingBastien Nocera2018-10-257-38/+33
| | | | | | | | | | automake's documentation says that it works depth-first, but it doesn't actually go depth first when dist'ing a directory. So our .ref.xml files aren't generated when we try to get them added to the dist. Fix this with a big hammer by moving the generation to the current directory, rather than spending any more time working with automake. Can't wait for the meson port.
* build: Fix up-daemon-generated.h not being found on distcheckBastien Nocera2018-10-251-0/+2
|
* src/linux/up-device-hid.c: usage_code is defined as an unsigned integerLaurent Bigonville2018-10-251-1/+1
| | | | Also define "value" as a signed 32 bits integer
* docs: Mention to try and not use IconName when possiblewip/hadess/no-icon-nameBastien Nocera2018-10-021-1/+2
| | | | See https://gitlab.freedesktop.org/upower/upower/merge_requests/16#note_41003
* daemon: Fix upower's keyboard backlight supportwip/hadess/sandboxing-fixBastien Nocera2018-10-021-1/+2
| | | | | | | Disabling kernel tunables blocked us from accessing /sys, meaning we couldn't change keyboard backlight levels. Closes: #73
* build: Build upower out-of-treeBastien Nocera2018-10-021-1/+3
| | | | So that this particular setup is tested.
* test: Fix up-self-test crash during out-of-tree buildsBastien Nocera2018-10-022-5/+2
| | | | | | When the layout of the build tree doesn't match the expectations in up-self-test, the test would crash failing to find UPower.conf. Pass the path as a macro during build so we always know where it is.
* build: Fix out-of-tree buildBastien Nocera2018-10-021-1/+1
| | | | | | | | | The generated headers for the dbus service are in the build dir, not the source dir. ../../libupower-glib/up-client.c:39:10: fatal error: up-daemon-generated.h: No such file or directory #include "up-daemon-generated.h" ^~~~~~~~~~~~~~~~~~~~~~~
* build: Add missing python3-dbus package to CIBastien Nocera2018-10-021-1/+1
|
* daemon: Fix upower not having access to udev eventsBastien Nocera2018-10-021-1/+2
| | | | | | | | | PrivateNetwork=true will cut off upower from the udev netlink socket, so it's not what we want to use, as we want those events. See https://lists.freedesktop.org/archives/systemd-devel/2018-July/041000.html Closes: #68
* lib: UpClient: up_client_get_display_device returns a UpDeviceGuido Günther2018-09-301-1/+1
| | | | It doesn't return a UpClient.
* lib: UpClient: Fix stray '%'Guido Günther2018-09-301-1/+1
|
* lib: Use @see_also instead of "See also"Guido Günther2018-09-308-16/+8
| | | | | | This ensures consistent rendering. See https://developer.gnome.org/gtk-doc-manual/stable/documenting_sections.html.en
* lib: Work-around to fix gtk-doc's type detectionGuido Günther2018-09-305-21/+13
| | | | | | | | | | Without the braces on the same line gtk-doc adds function pointers as functions to the documentation and fails to detect the types as GObjects. This fixes object names in the index and cross refs. See the examples in https://developer.gnome.org/gtk-doc-manual/stable/documenting_symbols.html.en
* build: gtk-doc: Rebuild types and sectionsGuido Günther2018-08-221-1/+1
| | | | | This makes sure we stay up to date and get the object hierarchy generated.
* 0.99.8UPOWER_0_99_8Bastien Nocera2018-06-191-0/+18
|
* linux: Add test for MacBook uevent behaviourBastien Nocera2018-06-191-0/+34
| | | | See https://gitlab.freedesktop.org/upower/upower/issues/56
* linux: Refresh for 5 seconds after plug/unplug on MacBooksBastien Nocera2018-06-191-2/+3
| | | | | | | | | Pull the 2 previous changes together to refresh the battery status for a couple of seconds after receiving an event on the power line. This fixes charge status being inaccurate for up to 120 seconds (the normal poll timeout on MacBooks). https://gitlab.freedesktop.org/upower/upower/issues/56