AgeCommit message (Collapse)AuthorFilesLines
2021-04-22ci: Add ABI checkHEADmasterBastien Nocera1-0/+4
2021-04-22ci: Indent the dependenciesBastien Nocera1-6/+22
Makes it easier to make changes easily readable.
2021-02-04up-tool: Catch NULL return for more upower API callsBenjamin Berg1-0/+8
This can lead to crashes if the communication with the daemon fails. See
2021-02-04up-client: Document and handle NULL return when getting devicesBenjamin Berg1-3/+4
2021-02-02tests: Add test cases for Bluetooth device classesMarijn Suijten1-1/+109
2021-02-02tests: Move BlueZ battery setup into helper functionMarijn Suijten1-42/+27
2021-02-02tests: Convert unpacked tuple constants to range()Marijn Suijten1-3/+3
2021-02-02linux: Parse kind from Class if Appearance is not availableMarijn Suijten1-0/+94
Not all headsets have a GAP profile revealing their appearance, but they do have a class.
2021-02-02lib: Add more device kinds for Bluetooth classesMarijn Suijten2-0/+65
This adds a variety of missing device kinds specific to the Bluetooth classes supported in gnome-bluetooth [1]. In up_device_to_text these types have only been added to the `percentage` class, which is currently the only property exposed by org.bluez.Battery1, where these devices are coming from. [1]:
2021-02-02lib: Invert percentage conditional in device_to_textMarijn Suijten1-11/+2
Almost every device kind except line power and invalid (>= last) carry a valid percentage property. By inverting this conditional not every new device needs to be added explicitly to this already long and lacking chain (PDA and MONITOR were already missing).
2021-01-19build: Remove libusb dependency in LinuxBastien Nocera3-4/+0
As the last user, the CSR support code, was removed.
2021-01-19linux: Remove support for CSR devicesBastien Nocera6-432/+0
Those devices date back from the mid-2000s. If they still work, and somebody is still interested in having them export their battery status, we would recommend moving this information to the appropriate kernel drivers.
2021-01-18linux: Set update-time for BlueZ devicesBastien Nocera2-1/+6
When the battery percentage for a BlueZ device changes, change the update-time so that the charge history is somewhat useful.
2020-12-16lib: Add "Touchpad" device typeBastien Nocera8-12/+28
2020-11-05linux: Fix gudev includes for UpInputBastien Nocera2-1/+1
2020-11-05linux: Add support for running under umockdevBastien Nocera1-2/+23
The sysfs path needs to be adjusted when running under umockdev.
2020-11-05linux: Don't throw debug errors unless neededBastien Nocera1-4/+7
It's really confusing seeing "not a switch [...]" when we actually managed to find a switch, so throw 2 errors in the debug when both checks fail, rather than as things are being tested.
2020-10-23linux: Fix warning when compiling with mesonBastien Nocera1-0/+1
src/up-input.c:294:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration] 294 | close (input->eventfp); | ^~~~~ | pclose
2020-10-23linux: Remove unneeded header from up-input.hBastien Nocera1-2/+0
Missed in an earlier commit. Fixes: 7ddb75166de ("linux: Remove UpDaemon dependency from UpInput")
2020-10-22linux: Remove unused headers in up-input.cBastien Nocera1-10/+0
2020-10-22linux: Remove UpDaemon dependency from UpInputBastien Nocera3-13/+58
Emit signals from UpInput for UpBackend to consume, rather than having UpInput poke the daemon directly.
2020-10-22linux: Make watched switch a property of UpInputBastien Nocera2-9/+74
And add up_input_new_for_switch() to watch other switches.
2020-10-22linux: Remove duplicate header in up-input.cBastien Nocera1-1/+0
2020-10-22linux: Simplify UpInput object codeBastien Nocera2-51/+34
Use G_DECLARE_FINAL_TYPE() to clean up header and remove the use of a private struct, as the whole object struct is now private.
2020-10-22linux: Clarify UpInput device handlingBastien Nocera1-3/+2
Despite what the comments say, the device is indeed a valid input device, it's just not one we want to add to the power devices, as done in up-daemon.c's up_daemon_device_added_cb().
2020-06-18linux: Fix umockdev link in testBastien Nocera1-1/+1
2020-06-17ci: Force building with libplistBastien Nocera1-2/+2
2020-06-17build: Use a newer libplist if availableBastien Nocera1-1/+3
2020-06-17linux: Add support for iPhone XR, XS modelsBastien Nocera1-2/+26
Modifying the udev serial to be acceptable as an hyphened UDID, as the usbmux stack expects. Closes: #114
2020-05-05tests: Add a keyboard/mouse combo device testBastien Nocera1-0/+47
2020-05-05linux: Identify keyboard/pointing device combos as keyboardsBastien Nocera1-3/+9
Rather than using the type of the first sibling device we find, which is usually the pointing device portion, make sure that keyboard/pointing device combo devices are identified as keyboards.
2019-10-24linux: Detect Bluetooth pensBastien Nocera1-0/+3
Numbers from:
2019-10-24lib: Add "Pen" device typeBastien Nocera4-3/+11
So we can track the battery information for powered tablet pens, rather than labelling them as tablets.
2019-10-23linux: Add test for Appearance property being missingBastien Nocera1-0/+44
Similar test to the test_bluetooth_le_mouse() one, but without an appearance property.
2019-10-23linux: Remove unused code in test suiteBastien Nocera1-8/+1
There's no need to create a udev device, the metadata comes from bluez.
2019-10-17linux: Fix warning when bluez Appearance property isn't setBastien Nocera1-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
2019-10-17linux: Fix memory leak in Bluez backendBastien Nocera1-4/+13
g_dbus_proxy_get_cached_property() returns transfer full GVariants.
2019-09-03trivial: post release version bumpMartin Pitt1-1/+1
2019-09-03Released UPower 0.99.11UPOWER_0_99_11Martin Pitt1-0/+20
2019-07-25Add code of conduct documentBastien Nocera1-0/+3
2019-06-04UpKbdBacklight: Fix endless loop burning 100% CPU on keyboard plugoutHans de Goede1-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.
2019-05-18build: Migrate from intltool to gettextMartin Blanchard6-16/+82
2019-05-09linux: Use symbolic names for device types in test suiteBastien Nocera1-13/+9
2019-05-09linux: Add gaming input type to the test suiteBastien Nocera1-1/+2
The enum member was missing.
2019-05-09rules: Reduce our list of HID++ devicesBastien Nocera1-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
2019-05-07rules: Split off HID++ rulesBastien Nocera3-15/+16
They should probably have been split off from the start.
2019-05-07linux: Add test for Logitech unknown device racesBastien Nocera1-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.
2019-05-07linux: Start polling for unknown device batteries tooBastien Nocera1-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".
2019-05-07linux: Retry to get a battery type if it's unknownBastien Nocera1-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".
2019-05-07linux: Don't treat device batteries like laptop batteriesBastien Nocera1-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