commit c9b2e177267b623850b3deedb1242de7d2e413ee
Author: Bastien Nocera <hadess@hadess.net> Date: Fri Jun 26 14:07:13 2015 +0200 linux: Fix possible double-free When reopening the lockdown daemon with upower as the client, don't double-free if the user says "No" to trusting the laptop. https://bugzilla.redhat.com/show_bug.cgi?id=1231763 commit fe37183fba649b999af3f66b9e0b0d70a054426c Author: Bastien Nocera <hadess@hadess.net> Date: Wed Jun 17 10:52:12 2015 +0200 lib: Fix memory leak in up_client_get_devices() When up_client_get_devices() fails to contact the D-Bus daemon, don't leak the newly created array. commit 95e8a2a316872bf5e6b262ccc3a165cca8240d27 Author: Richard Hughes <richard@hughsie.com> Date: Thu May 28 10:22:05 2015 +0100 trivial: post release version bump commit 418bbc9d844ebb12de6428f0f578ca7ded612aae Author: Richard Hughes <richard@hughsie.com> Date: Thu May 28 10:20:47 2015 +0100 Released UPower 0.99.3 commit 6c706ff03365e462e1b076155428decbed0f55c6 Author: Marc Deslauriers <marc.deslauriers@ubuntu.com> Date: Mon May 4 19:31:31 2015 -0400 linux: Properly detect bluetooth mice and keyboards that are HID devices https://bugs.freedesktop.org/show_bug.cgi?id=90222 commit 31b2b8ec78198c72bc7e139c5cccd178bd835e72 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Apr 28 13:17:22 2015 +0200 linux: Work-around broken battery on the Onda v975w Until https://bugzilla.kernel.org/show_bug.cgi?id=83941 is fixed, this allow to have a bit more information than "0% battery" displayed in the UI. https://bugs.freedesktop.org/show_bug.cgi?id=90214 commit abaf635ce4d9dd66c729360fd19089fc61c67a3b Author: Bastien Nocera <hadess@hadess.net> Date: Tue Apr 28 13:01:11 2015 +0200 linux: Use CLAMP() instead of a series of ifs commit f8104a112eb967cd4c2aaf57b5a59aafe7c4738f Author: Peter Wu <peter@lekensteyn.nl> Date: Wed Jan 21 15:56:23 2015 +0100 rules: support Logitech Unifying in Linux 3.19 Linux 3.19 changed the way in which devices get registered by introducing a hid-logitech-hidpp module. The driver name therefore needs to be adjusted. Signed-off-by: Peter Wu <peter@lekensteyn.nl> commit aa902f41e5193ab1326cd33a16c08423020ab6aa Author: Bastien Nocera <hadess@hadess.net> Date: Tue Feb 3 23:55:02 2015 +0100 build: Fix libimobiledevice msg in configure commit 2510148b16a71504dff3880c8af416fd85a2885d Author: Vlad Orlov <monsta@inbox.ru> Date: Fri Mar 13 13:17:31 2015 +0100 lib: Fix crash on uninitialized variant Initialize the GVariant* pointers, so that they aren't uninitialized when jumping to "out:" and unref'ing them. https://bugs.freedesktop.org/show_bug.cgi?id=89476 https://bugs.debian.org/774546 https://bugs.launchpad.net/ubuntu-mate/+bug/1428337 commit f3706d7a2978ae0fae513fd09469dbfcf5c28a09 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Feb 3 23:20:26 2015 +0100 linux: More memory handling fixes in iDevice We could crash if up_device_idevice_refresh() failed during start_poll_cb(). commit a410c26991ebd6538a7205fda98a0fb008a8dcd2 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Feb 3 21:29:08 2015 +0100 linux: Bail out when iDevice state is malformed If there's no BatteryCurrentCapacity value, we've failed updating the device. commit e37fcd1db10c1c1df619a5cb290678687481347e Author: Bastien Nocera <hadess@hadess.net> Date: Tue Feb 3 21:27:32 2015 +0100 linux: Defer getting iDevice info until ready We're a bit too fast for usbmuxd to have noticed the USB device getting plugged in, so defer until either the device is 1) noticed by usbmuxd and 2) paired. https://bugs.freedesktop.org/show_bug.cgi?id=88950 commit 3bade56d1fc1e75a6e8fda70330b4f4f9d7b3d2d Author: Richard Hughes <richard@hughsie.com> Date: Thu Dec 18 09:33:09 2014 +0000 trivial: post release version bump commit 42fd6fd4909b149c179108157fcf09bfe66e3599 Author: Richard Hughes <richard@hughsie.com> Date: Thu Dec 18 09:32:27 2014 +0000 Released UPower 0.99.2 commit 9639487d4e3de7974ca4c9e2bef71c464ba6d569 Author: Peter Wu <peter@lekensteyn.nl> Date: Wed Dec 3 18:27:35 2014 +0100 daemon: fix ulong/gulong typo Regression in 4221835fae97f875a23d0ce449e955f2ea488bbc ("daemon: properly disconnect signals, stop memleak"). https://bugs.freedesktop.org/show_bug.cgi?id=82659 Signed-off-by: Richard Hughes <richard@hughsie.com> commit 2199a9b0b5a631a69bb5b4ac00c7c6e8a9007240 Author: Peter Wu <peter@lekensteyn.nl> Date: Sun Nov 23 00:13:54 2014 +0100 daemon: fix dbus proxy leak on shutdown Fixes leaking some DBus objects on shutdown, causing noise in gobject-list and valgrind logs. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit 90994b0d81ca8e44e6a150c53d2c713fad39c29c Author: Peter Wu <peter@lekensteyn.nl> Date: Thu Nov 20 15:55:37 2014 +0100 daemon: release resources at shutdown This makes it easier to find real memory leaks with valgrind. After calling the up_backend_unplug functions, you cannot restart it with up_backend_coldplug since the lists are cleared. Tested with Linux only (not on *BSD; dummy compiles). https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit a91d03a3a9310b5d00e65a249aab2241906733bc Author: Peter Wu <peter@lekensteyn.nl> Date: Tue Nov 18 22:01:51 2014 +0100 daemon: fix various reference leaks up_daemon_get_daemon takes a reference on UpDaemon, so it must be properly dereferenced. Similar for up_daemon_get_devices_list which references an UpDeviceList. The display device was allocated in init, but never released either. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit 4221835fae97f875a23d0ce449e955f2ea488bbc Author: Peter Wu <peter@lekensteyn.nl> Date: Tue Nov 18 06:04:08 2014 +0100 daemon: properly disconnect signals, stop memleak Whenever the daemon is polling on a device, a new signal is connected to the object. This signal was not disconnected when polling stops which resulted in a memory leak. Furthermore, whenever the "warning-level" property is updated, the signal would result in an exponentially raising call count (this happens when the battery percentage changes for example). https://bugs.freedesktop.org/show_bug.cgi?id=82659 Reported-by: Alexander Jesner <alexander@jesner.eu> Signed-off-by: Peter Wu <peter@lekensteyn.nl> commit 1f9c094119296e10d9d7144867b689495c6420bd Author: Peter Wu <peter@lekensteyn.nl> Date: Tue Nov 18 05:28:50 2014 +0100 hidpp: fix memleak for each Feature The name of each Logitech HID++ 2.0 Feature will now be freed. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit 73927044cb213030e210b46bbc6e4de3aa41ba16 Author: Peter Wu <peter@lekensteyn.nl> Date: Mon Nov 17 22:32:42 2014 +0100 daemon: fix memleak in org.freedesktop.UPower.Wakeups.GetData up_wakeups_get_cmdline returns allocated memory and up_wakeup_item_set_cmdline duplicates it. Therefore free the former after setting it on the item. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit d1971e4d1614cf4f589678fcd26bbe0d50b8b0b9 Author: Peter Wu <peter@lekensteyn.nl> Date: Mon Nov 17 21:44:27 2014 +0100 daemon: plug huge memleak in GetStatistics Reproducible by executing `upower -d` or by calling the DBus method org.freedesktop.UPower.Device.GetStatistics(charging). up_device_get_statistics -> up_history_get_profile_data -> up_stats_item_new. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit 8988f069862a588d4c48afc703f500037cb0c50a Author: Peter Wu <peter@lekensteyn.nl> Date: Thu Nov 6 18:50:30 2014 +0100 daemon: fix memleaks in GetStatistics and GetHistory dbus_g_method_return[_error] does not claim the passed parameters, the caller must free it theirselves. complex is filled with an GValueArray pointer (see UP_DBUS_STRUCT_DOUBLE_DOUBLE) but its contents are not freed (memleak!). This patch introduces a deprecation warning due to the use g_value_array_free, but since UP_DBUS_STRUCT_DOUBLE_DOUBLE is a GValueArray, this is unavoidable. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit f3dfc1ea8337aa3ff12e9df71013b315e206efc5 Author: Peter Wu <peter@lekensteyn.nl> Date: Thu Nov 6 19:06:49 2014 +0100 daemon: fix memleak in queue_changed_property The control of value is transferred to up_daemon_queue_changed_property, let it release the memory when an error occurs. https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit 71cbf8dfb943a674cb5a746e0e4cbd4b226e8f04 Author: Peter Wu <peter@lekensteyn.nl> Date: Thu Nov 6 18:29:07 2014 +0100 linux: fix memleak when reading critical action g_variant_get for string types must be freed as documented at https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-strings Since we just want to compare it, use a pointer as documented at https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-pointers https://bugs.freedesktop.org/show_bug.cgi?id=82659 commit b3e5143f5a56beee63529fd25b44522ae282e226 Author: Peter Wu <peter@lekensteyn.nl> Date: Mon Nov 17 22:33:32 2014 +0100 hidpp-device: avoid unaligned memory access Fixes a -Wcast-align warning and a -fsanitize=undefined error. https://bugs.freedesktop.org/show_bug.cgi?id=71079 commit 5eead9ecf671c486523fffe20cee6dc3888e446c Author: Peter Wu <peter@lekensteyn.nl> Date: Tue Nov 18 10:28:18 2014 +0100 daemon: remove unused variable Introduced in 2e87407eb91407e64f3d23de07b9dc91735a6a49 https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 2e87407eb91407e64f3d23de07b9dc91735a6a49 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Nov 14 23:07:25 2014 +0100 daemon: Use new warning update helper function Rather than the copy/paste code in commit: b9bd275890387fb35c185f37ec0ea1f2aa857818 This makes sure that the AC status is updated. https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 83ebd3eccbff589af0dc6d2f1978338cdfa10833 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Nov 13 19:20:12 2014 +0100 daemon: Update display device when battery is removed When removing a battery, make sure to go through the batteries, and update the display device status. https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 4fdb9cee21d0d862ed3b551bebb48cf90d645de4 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Nov 13 19:19:30 2014 +0100 daemon: Split out updating on_battery and warning_level So that we can reuse this code. https://bugs.freedesktop.org/show_bug.cgi?id=86144 commit 3a5f3e552635a6935d5238eb37c555fd05eddbd9 Author: Nikolay Martynov <mar.kolya@gmail.com> Date: Sun Oct 5 01:03:42 2014 -0400 upowerd: Fix cleanup in up_device_idevice_coldplug/finalize Under certain conditions lockdownd_client_free was called twice for same client. This caused SIGSEGV. This patch addresses this issue Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com> Signed-off-by: Richard Hughes <richard@hughsie.com> commit 68646992097f098e7faefe43f02af7b20bcf3c11 Author: Evangelos Foutras <evangelos@foutrelis.com> Date: Thu Oct 2 16:16:34 2014 +0300 daemon: Update aggregate device on battery removal https://bugs.freedesktop.org/show_bug.cgi?id=84345 Signed-off-by: Richard Hughes <richard@hughsie.com> commit bbe15b14dec5016f0763772cc770a784483ac24a Author: Evangelos Foutras <evangelos@foutrelis.com> Date: Thu Oct 2 16:04:31 2014 +0300 all: convert value from g_get_real_time() to seconds Commit 5ddfe0d (all: Use g_get_real_time() when possible) replaced calls to g_get_current_time() with g_get_real_time(), however, we also need to convert the return value from microseconds to seconds. Signed-off-by: Richard Hughes <richard@hughsie.com> commit 5ddfe0dba19c069b16a1b38cac2fa9dc8372862d Author: Bastien Nocera <hadess@hadess.net> Date: Wed Sep 24 15:15:23 2014 +0200 all: Use g_get_real_time() when possible Instead of a call to g_get_current_time(). commit 8271045a68b5d34a47d0c6214681e2b088234d2e Author: Bastien Nocera <hadess@hadess.net> Date: Wed Sep 24 15:11:07 2014 +0200 daemon: Set update-time on the aggregate device commit 1a8ccbcefc29f863ec6317e319f7de471a3fbbbe Author: Eric Koegel <eric.koegel@gmail.com> Date: Mon Sep 15 17:42:25 2014 +0300 Correct check to prevent the display of invalid ASCII codes Cppcheck found it as a logical conjunction always evaluates to false: EXPR < 32 && EXPR > 126. Change the expression to an Or. https://bugs.freedesktop.org/show_bug.cgi?id=71066 Signed-off-by: Richard Hughes <richard@hughsie.com> commit 33a3af8008520f472727bf2144bae9a7585bc53e Author: Eric Koegel <eric.koegel@gmail.com> Date: Sun Sep 14 17:32:27 2014 +0300 Fencepost array access error Array 'temp_data[100]' accessed at index 100, which is out of bounds. https://bugs.freedesktop.org/show_bug.cgi?id=71066 Signed-off-by: Richard Hughes <richard@hughsie.com> commit 081c35a36c9becea28698ac73ef5b31045fc3973 Author: Eric Koegel <eric.koegel@gmail.com> Date: Sun Sep 14 19:03:15 2014 +0300 Bump GLib min req to 2.34 UPower uses g_clear_pointer several places in the code, but is available starting in 2.34. Update UPowers minimum version to match. https://bugs.freedesktop.org/show_bug.cgi?id=83850 Signed-off-by: Richard Hughes <richard@hughsie.com> commit 657331063761bad6e7c608585a30ea18c6fdcf71 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Aug 25 17:04:55 2014 +0200 linux: Respect the CriticalPowerAction config option It was documented, but the configuration was never actually read. https://bugs.freedesktop.org/show_bug.cgi?id=82925 commit 07fa35c42b4ddab4bdc4ae0172aefac0258fe71e Author: Bastien Nocera <hadess@hadess.net> Date: Mon Aug 25 17:04:27 2014 +0200 daemon: Add helper to get string from config https://bugs.freedesktop.org/show_bug.cgi?id=82925 commit 90082ec5d4453ddafcfecdc867fa7f46f8aac2d4 Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue Sep 2 18:43:33 2014 +0200 Linux integration tests: Split big tests into several smaller ones This is better design to catching regressions and problems in a more pin-pointed fashion. This also avoids having to restart the umockdev testbed due to changing the environment variables with stop/start_daemon(). commit 01ab81233f1e85afe8c3078d6a8d894d627e42fb Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue Sep 2 17:19:08 2014 +0200 Linux integration tests: Fix error handling for Python 3.4 Python 3.4 changed the TestCase._outcome semantics, adjust accordingly. commit e5bd3e80f3239d4d52b52b91e73007f12f60d312 Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue Sep 2 15:57:09 2014 +0200 Linux integration tests: Fix crash if there is no session D-BUS This can happen in CI environments without a desktop session. commit 0b50cef90c277ce550a5b14ec2fffd8178f93694 Author: Richard Hughes <richard@hughsie.com> Date: Mon Aug 18 13:10:03 2014 +0100 trivial: post release version bump commit 4f74e297e47f3ac3e4c11e05674fdf39cdc96edd Author: Richard Hughes <richard@hughsie.com> Date: Mon Aug 18 13:08:48 2014 +0100 Released UPower 0.99.1 commit 47c6974fc0c375eee18ebdfce9891643bcf209de Author: Alexander Jesner <alexander@jesner.eu> Date: Fri Aug 15 15:50:50 2014 +0200 Free the obtained device list array after use Signed-off-by: Richard Hughes <richard@hughsie.com> commit e4ad754351b67c00438c736c14bb948905708009 Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Wed Jul 16 12:19:13 2014 +0200 doc: Adjust documentation for polkit removal commit 3b6948bc4bbdd68b5ed3a974e57a156a79c1a7b8 Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Wed Jul 16 11:45:35 2014 +0200 self-test: Add missing #include up-self-test.c: In function ‘up_test_history_func’: up-self-test.c:274:2: warning: implicit declaration of function ‘rmdir’ [-Wimplicit-function-declaration] rmdir (history_dir); commit bddc559713ed3e8d790231139b21c8277931b5d0 Author: Martin Pitt <martin.pitt@ubuntu.com> Date: Wed Jul 16 11:43:57 2014 +0200 Remove polkit tests Complete the polkit dependency removal by also dropping it from the self tests. Unbreaks build and up-self-test again. commit 9a2b2633095fb901fc1931ab0c600392d68bb3b4 Author: Eric Koegel <eric.koegel@gmail.com> Date: Mon Jul 14 08:16:06 2014 +0300 Remove polkit dependency With the removal of the suspend/hibernate code, there's no longer a need for upower to depend on polkit. This patch removes the old polkit code. Signed-off-by: Richard Hughes <richard@hughsie.com> delete mode 100644 src/up-polkit.c delete mode 100644 src/up-polkit.h commit d1bb06985fb30a9dfd4c2eb423ac19540445b9e4 Author: Fabian Raetz <fabian.raetz@gmail.com> Date: Mon Jun 30 10:03:00 2014 +0000 openbsd: Expose "capacity" and "energy-full-design" properties https://bugs.freedesktop.org/show_bug.cgi?id=80707 commit b1aeed994884602b3601a7f4b98419c65be9009c Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jun 24 16:45:38 2014 +0200 daemon: Fix possible UpHistoryItem leak on failure commit bab2431c1e7406860179267faa54f35ad82131fe Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jun 24 16:41:48 2014 +0200 linux: Simplify list freeing commit dbb9bead6d3b9e70a5d58019b1615d2a6fba5312 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jun 24 16:34:40 2014 +0200 linux: Fix small memleak on startup with Logitech devices commit 969c97426a868626e8c6289e3a7ff3207fc56624 Author: Richard Hughes <richard@hughsie.com> Date: Tue May 20 13:25:17 2014 +0100 Do not print a critical warning when misusing up_device_set_object_path_sync() commit 5ed25a7e5f115a71433f137905394ae6b119e450 Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 10:49:37 2014 +0200 all: Remove IsDocked property Removes the deprecated (for not very long) property, before we do a 1.0 release. https://bugs.freedesktop.org/show_bug.cgi?id=78380 commit e8beb269dffd7957a1faefa9794a6cbc1a23d40e Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 09:48:44 2014 +0200 tools: Remove is-docked from up-tool commit cfbd05deb30f722e25707fdf28d880fce1c908fc Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 09:47:45 2014 +0200 linux: Remove is_docked from the integration test commit 212b4397ccba17caf86206e2b265c0c2e4ad158c Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 09:46:49 2014 +0200 lib: Fix API doc for up_client_get_on_battery() commit 54a030a38d3451b90cc6552b15555085bfc215ca Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 09:46:08 2014 +0200 lib: Hard-code the IsDocked value commit 135339acc197f0d6a92b71c85048c5a7cb6ce9d6 Author: Bastien Nocera <hadess@hadess.net> Date: Wed May 7 09:27:24 2014 +0200 daemon: Deprecate "IsDocked" property The IsDocked property has been incorrect for a number of laptops for a while, as it thought that laptops with hybrid graphics cards were always docked. The alternative would have been to use the platform/dock_station devices, but those are only exported for ACPI docking stations. Instead, whether an external display is attached (which isn't really docking) should be checked in the same place where the policy depending on the value should be applied, such as gnome-settings-daemon. https://bugs.freedesktop.org/show_bug.cgi?id=36818 delete mode 100644 src/linux/up-dock.c delete mode 100644 src/linux/up-dock.h commit dbf7eb7e557674a9b888a088f1cae4f36b77e14d Author: Bastien Nocera <hadess@hadess.net> Date: Wed Apr 23 15:34:24 2014 +0200 daemon: Fix shutdown on boot on some machines On the Lenovo A600 all-in-one, there's a HCI/HID dual-mode Broadcom device which will try to get the battery level of the supplied mouse and keyboard, but will usually fail to do so. So we have a battery of type "battery" (it's not either a mouse or a keyboard, as it's supposed to handle both) but our display device battery code doesn't check whether those batteries are power supplies or not, using this "empty" (0% after the check timed out) battery in the shutdown policy. Check better for power supply devices, not all the "battery" types are power supply batteries, they might be non-power supply ones from unknown device types. commit d650df8af80b734f6c44a0acb2080493330b8836 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Apr 23 15:20:37 2014 +0200 lib: Fix typo in g-i annotation Missing colon. commit 4bed9c99c1d459f0d1bc760716573e2a2af5e0e1 Author: Jasper Lievisse Adriaanse <jasper@humppa.nl> Date: Sun Apr 20 20:15:36 2014 +0200 Update lid status when updating ac status. Signed-off-by: Richard Hughes <richard@hughsie.com> commit b9cff29978113aefe3ad18521f383f12ab099a34 Author: Cosimo Cecchi <cosimo@endlessm.com> Date: Tue Feb 25 09:43:04 2014 +0000 Create the history directory at runtime In addition to build time - this increases compatibilty with OSTree, which starts out with an empty /var. Signed-off-by: Richard Hughes <richard@hughsie.com> commit 0d64bbddaa0078ef148d609a3cfad854cf00d7de Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Nov 8 14:59:50 2013 +0100 lib: Fix segfault on getting property when daemon is not running This fixes "upower --version" when the daemon is not running, and thus the client proxy is NULL. commit e96f5349f905d5005bd29c5a4786c10fb86d1453 Author: Richard Hughes <richard@hughsie.com> Date: Tue Oct 29 12:52:47 2013 +0000 trivial: post release version bump commit 9b28dac1a1e764593532628b31342dad813ad013 Author: Richard Hughes <richard@hughsie.com> Date: Tue Oct 29 12:51:34 2013 +0000 Released UPower 0.99.0 commit 97ed6c47319295cfc15b9c9618137d2a56d03497 Author: Richard Hughes <richard@hughsie.com> Date: Tue Oct 29 12:51:23 2013 +0000 trivial: Fix a compile warning in the linux backend commit e673d9e59b9e3c71d1b49d308fcea50f6ec4093d Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 16:21:33 2013 +0100 linux: Use daemon poll for batteries too This has 2 effects: - we never stop polling (we used to stop polling when the battery was marked as fully-charged, but that can happen when the battery is discharging too) - when in an unknown state, we will poll through the daemon, and through our unknown poll. This isn't a problem as there'll another 115 seconds of wait until we get to poll through the daemon again. commit 03591e6e05e813e5cc8b1116dfaf6722ff942603 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 14:38:37 2013 +0100 linux: Switch non-battery devices to use the new daemon poll Next up is doing this for batteries, which need to switch between a normal/slow poll to a faster one when the battery state is unknown. commit d1032c562a1c61d1478d3a000d9ddf3144472251 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 14:38:13 2013 +0100 linux: Switch Unifying devices to use the new daemon poll commit 988889121ec44674aadaf0a23e61630bf6105b16 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 14:37:37 2013 +0100 linux: Switch iDevices to use the new daemon poll And remove the gathering of the battery poll from the device itself, it's of nearly no use. commit 8018418a97b2777c94ca6b6d693a3d52ce2147c9 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 14:37:09 2013 +0100 linux: Switch CSR devices to use the new daemon poll commit b7d69524e8b73a90e1ae488a749bdf26acdb8937 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 28 14:35:48 2013 +0100 daemon: Add poll helper functions To be used by all polling backends. This changes the defaults to poll every 120 seconds when a warning level isn't reached, and switch automatically to 30 seconds poll when the battery level is low. commit 6e8e659ca282dec0201a8773cd65153debea9e66 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 26 14:52:59 2013 +0200 daemon: Better timeout source naming Matching the work done in glib, gtk+, etc. This also differentiates the unknown and normal timeouts in the Linux power supply driver. commit 4d0af3b31bda9270037dc18a503305fea1c5710e Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 23 18:00:37 2013 +0200 linux: Add NoPollBatteries configuration option For system integrators. If your firmware is helpful to user space and automatically sends out uevent when the battery level changes (rather than just the battery state) as on most machines, you can enable "NoPollBatteries" in the configuration option, and reduce power consumption from UPower and its listeners. commit 64b1cc0f1d11b370e8c9e2cd07d24bf63fd61d07 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 23 17:57:12 2013 +0200 linux: Split up battery and device refresh In up_device_supply_refresh(). commit f62e7f11a7d9f89abb7b3b971417337a239e5ba6 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 23 17:54:43 2013 +0200 linux: Move poll disable to another function commit feea39fa43f65bc556216f2bcc0fdf1cc6098aba Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 23 17:04:22 2013 +0200 linux: Only disable timeouts if ever set We cannot ever set the refresh timeout when we have a power line device, so don't try and remove it there. commit 9ce7b4408fd66a578873a3c5b3e1b8aa4416795e Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 22 01:48:53 2013 +0200 daemon: Let the backends do the polling When the AC state changes, let the backends poll for battery changes. They know better what's _really_ happening (whether the real state is unknown even if they present a fully-charged battery), etc. This is only possible because we fixed the Linux backend to poll as it should always have. commit 7921e97b088487001c68cd20874bc3f995f11790 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 22 01:47:23 2013 +0200 linux: Poll for unknown state like the daemon did 5 times, with 1 second timeouts, instead of 30 times, with 2 seconds timeouts. commit 7804f8b08e3c2708af1045beb9cb4f8942883bd7 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 22 01:44:55 2013 +0200 linux: Fix the "unknown state" heavy poll It was never actually setup, as the fallback state was used to check whether we should use poll or not. commit 22da1a0bc5943b683189418d8b0f766e91b2bdbe Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 22 10:02:51 2013 +0200 linux: Clamp percentage for overfull batteries Some batteries report energy > energy_full and a percentage ("capacity" attribute) > 100%. Clamp these within 0 and 100% for both plausibility as well as to avoid setting an out-of-range property which would then become 0%. https://launchpad.net/bugs/1240673 commit a30ad0beaef1d6c42742c21c4f6c11866e9f53c9 Author: Benedikt Morbach <benedikt.morbach@googlemail.com> Date: Sat Mar 9 14:33:52 2013 +0100 build: Fix --without-systemdunitdir / --without-systemdutildir would take the with_*=no as a value and try to install to a "no" directory https://bugs.freedesktop.org/show_bug.cgi?id=62060 commit cf5d24922ed3634af8a7a3def998c14600f8dff3 Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 20 13:31:21 2013 +0200 linux: Fix parsing of double values for certain locales I don't think the kernel exports any numbers with a decimal portion, but if they did, they would get the wrong values because some locales use "," as the decimal separator, and not "." as the kernel/C locale would. commit 498d4491edc154d41c1fc7659c263ed8128b4822 Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 20 13:30:23 2013 +0200 daemon: Fix time to empty with multiple batteries If one battery is draining and the other one isn't, the time to empty wouldn't be zero, but it would only match the time to empty for the single battery. Instead, ignore the accumulated time to empty/time to full for multiple batteries and recalculate it. https://bugzilla.gnome.org/show_bug.cgi?id=710344 commit 21ecc70ccd4aee8bf25183837dc3276a4f51e934 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 19 20:19:11 2013 +0200 daemon: Restart upowerd when it crashes When UPower crashes, we would never notice the battery going flat because UPower clients aren't polling UPower, so won't autostart it. Instead we rely on systemd to restart us when we crash. libupower-glib also supports the client coming and going. https://bugzilla.gnome.org/show_bug.cgi?id=682912 commit 0741e5b591141e826c87e1aaa89b8e3fc2ec2565 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 18:43:50 2013 +0200 linux: Finish "fixing" the UPS test case Update the expected warning levels to match, and add a big fat FIXME for the test case itself. That's not how UPSes work, or how UPower is expected to work. commit 585ff606c0a096cdd2cb4aed2fe71a6bd71dc273 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 18:43:07 2013 +0200 daemon: No warning with no LEDs class If there are no LED class devices on the system, no need to print a warning when we cannot open the directory. commit 5be178ca5b770356d0412aff87e4696ff1a1afdf Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 18:41:30 2013 +0200 daemon: Don't get in a bad state when refresh fails Failure to refresh was supposed to be non-fatal, but since we started putting objects on the bus *after* refresh, we were skipping the registration if refresh failed, as is the case in the UPS test case. commit cd52ad6d1c1a07dac424dd1e69efd0b1eaf31355 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 18:41:12 2013 +0200 daemon: Fix typos in comments commit 7389aa951740dd1c53ccd9818a4f72f046393f03 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 18:38:59 2013 +0200 linux: More information in the debug output As was the case in other places, we need to be able to differentiate warning messages for them to be useful. commit ef2c9513433ce9371d160160183c36d48affaec8 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:52:56 2013 +0200 daemon: Differentiate 2 warnings No way to know which one was being called otherwise commit aa8fafca9e62ea9c95ac6662eef85819cbb6e5c0 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:49:07 2013 +0200 linux: Fix tests for "OnLowBattery" Replace them all with WarningLevel tests. Note we current crash when adding a UPS, in test_ups_ac. commit b3ee72144e1753320f0b0251faf17b3543e2d1d0 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:46:41 2013 +0200 linux: Add TODO item for the GetCriticalAction binding commit 720680d6855061b136ecc9ff756fb0cc2bc3ae2c Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:37:10 2013 +0200 linux: get_properties_sync() doesn't exist anymore commit fa1fb8404f7e598723b1b0e9d594bbc886681e6f Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:36:00 2013 +0200 linux: Add helper to get DisplayDevice property In the integration tests. commit b90ade819ab5debeb92d1b646ab418df9faba4d9 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:34:31 2013 +0200 daemon: Fix WarningLevel for devices with no "time to empty" As can happen with missing metadata, we might not have a time to empty, so rely on the percentage instead. commit 7fcce9156723b4f120442ae961660b9c1cd0aa76 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 17:34:09 2013 +0200 daemon: Add small doc update_warning_level commit af930df8b120052a6ee4f88d95af189224350aa2 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:58:48 2013 +0200 linux: Add new definitions Proxy paths, and enumeration from the current API. commit dd4f878f12d29032c01150e76d247cabc39ed8a6 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:41:14 2013 +0200 linux: Fix UMockdev typelib not being found The Makefile rule was using GI_REPOSITORY_PATH instead of GI_TYPELIB_PATH meaning that if a custom typelib path was needed (jhbuild for example) it wouldn't be found. commit f989b61d43dd6e38a6cf5580bb75e72f2cb5309b Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:19:32 2013 +0200 linux: Mark devices with 100% battery as full commit 9bc66af96f65ec7777ac565ab29e9d35dd69c3ea Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:11:15 2013 +0200 linux: Fix Bluetooth devices appearing with 0% battery When switching off Bluetooth devices, and before they timeout, we won't be able to read the battery percentage, so don't overwrite the previous value with "0%", but set the state to unknown instead. https://bugs.freedesktop.org/show_bug.cgi?id=70325 commit 4b4caf187f590efc41a10646e0f35d6a70098103 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:10:46 2013 +0200 linux: Add a way to check when sysfs_get_double fails commit 456a9a4ea409cb8630a62a1ecf224e2ed65a817e Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 16:04:45 2013 +0200 linux: Use up_device_supply_get_string() In up_device_supply_get_state() commit a1a91e7e5d3338bc649119d8c462f9c32135d971 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 15:59:59 2013 +0200 linux: Add a simpler, quicker path for devices When refreshing the state of device batteries, no need to get data that won't be there anyway, such as voltage, temperature, or consumption rate. This avoids warnings about voltage being unknown for devices, and cuts down on the properties churn. commit 2e4ed0c64445885d6842b64078d922036d9b7a43 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 15:52:32 2013 +0200 linux: Split off device state retrieval We're going to be reusing this elsewhere. commit 8aaa59243c920bd99a76253ce270462cb94c58fe Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 15:48:57 2013 +0200 linux: Ignore ACs coming from devices We already have enough information on the device battery. This avoids having a device for the wacom AC which we won't use. commit b3d23684545d08d6c7df0643b560fd5d1346154b Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 18 15:21:17 2013 +0200 linux: Remove incorrect statement Not all "UpDeviceSupply" actually supply power to the computer. commit aa5636e559f3b22e54887e9268071e1518455d7e Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 23:33:08 2013 +0200 daemon: Fix crash when device is removed When the device was removed, we forgot to cancel sending out changed properties, causing illegal memory accesses. commit 36f46546e9bdeeb42764c5b471d86dbfa28a981b Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 23:24:09 2013 +0200 daemon: Remove dead code from up_daemon_device_changed_cb() commit aa62f6a15c3834bc16f15e95f8d6e956b72fabd0 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 23:18:57 2013 +0200 lib: Fix possible warning when type changes UpDevice on the daemon side has a "type" property, but the libupower-glib object has a "kind" type instead. Translate that. commit c33729ad2c9e31dea3f256af2841efead91e7628 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 22:27:36 2013 +0200 linux: Use boolean values in sysfs_get_bool, not int commit 984ca2d5ee7d6612344e665597af0c124f12c5a1 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 22:14:56 2013 +0200 linux: Remove unused sysfs utils functions commit 088da47833a673282d67d52c80c7dd3d549d4af8 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 22:11:57 2013 +0200 NEWS: Explain better the *Changed removals commit 384bae5af83fe05a91fc77c25e4d18eba9911cb1 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 15:09:48 2013 +0200 NEWS: Update for future release commit 3063bdaf44f0936cdffcddd515bc89e3f4ca40aa Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 14:51:07 2013 +0200 lib: Fix compile-time warning commit 8460a10c5e5afb971e09b2393327525e95d7aeec Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 14:41:55 2013 +0200 linux: Remove debug commit c91abb77eda3c751b9653d03088afc6f0b432776 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 14:39:16 2013 +0200 tools: Update for lib API changes commit 5f43bb78f7a089ff5079082d92e8488114786711 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 14:36:35 2013 +0200 lib: Remove up_client_enumerate_devices_sync() And make device-removed send an object path, not a UpDevice. This means that we don't keep all the remote devices as local UpDevices object, getting woken up any time any of them have a property changed, without anybody listening. This should greatly cut down on the wakeups on the client side, especially for applications that only use a small portion of the API like the "on-battery" or "warning-level" properties. commit 0010e9325110e5a70a0d2381c84f88e7fb044ce4 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 12:40:41 2013 +0200 all: Remove *changed signals Now that we send out PropertiesChanged signals (on the daemon side) and "notify" signals (on the client side), there's no need for the all encompassing DeviceChanged and Changed signals. They would have woken up any client, even if they were not interested in receiving the signals. commit 8453da5014e6750ff2cdffcaa3a89dd616ca7434 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 12:40:05 2013 +0200 tools: Use notify signals instead of *changed ones commit 595d72f6b6cfc7cda51c7a6f13ed3b1749538d0e Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 12:37:29 2013 +0200 lib: Proxy notify changes from UpDevice glue commit c33528da7a300718b03ed3e19ef2fea5bdf27c1d Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 12:34:38 2013 +0200 lib: Simplify proxying glue properties in UpClient commit c9f3a13b296eb9b2e4a457f87d57bd0dfabd1225 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 11:31:41 2013 +0200 power: Work-around batteries that are slow to notice charge This is a hack that was in gnome-settings-daemon's power plugin. We would check whether we were on AC before saying for certain that batteries had a low-level, and raising the warning-level. commit db31456921f9977d8fef8ed1dcee6517107358ff Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 09:04:03 2013 +0200 all: Add GetCriticalAction daemon method This allows desktop front-ends to get which action will actually be taken when we hit critical battery. This is not a property as availability of actions might change over the course of the run of the system, and we didn't want to make unnecessary D-Bus calls on startup. commit a7870229ee32616ac9e55edbab1045d1dac171be Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 08:56:41 2013 +0200 linux: Fix incorrect check for logind sleep methods A simple reversed check... commit 5f830e74a79aac5d37fdddb3feda8ad064cdedd9 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 01:21:27 2013 +0200 build: And bump soname commit 16556b9377f8402b69458db7494c48ac04273654 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 01:20:54 2013 +0200 build: Bump version to 0.99.0 commit b777c63d97dbd73ca939b04b623c844e4d571d87 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 01:07:06 2013 +0200 daemon: Make warning-level UpDevice property writable So we can update the display device warning level. commit b2f72dd69ac683e7fa213d83b410b38fe1ab1b21 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:57:27 2013 +0200 all: Remove WarningLevel from the daemon properties The WarningLevel property just replicated the warning level on the display device, or at least should have. So we fix the latter to remove the former. commit c00eda8ca0c2d8dc772b8cc8b4bdc93ab353dc29 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:46:01 2013 +0200 tools: Print the display device when using -d commit a76eaeddb904e23ad7f03b37520d064b35c57b3b Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:45:26 2013 +0200 lib: Trim properties when printing the display device commit 369a2c6d08ad1a8689b62800069b9828b56bd0fb Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:36:10 2013 +0200 daemon: Indentation in UpDaemon struct commit 45c4b372775505e1e8f2f2bfa0c7395760bf52a4 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:35:22 2013 +0200 lib: Add up_client_get_display_device() Add a helper to get to the display device. commit 34951c91ffd3d11537c03909723dcb03bbcc6221 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 17 00:24:45 2013 +0200 lib: Remove unneeded up_client_get_properties_sync() It doesn't do anything, and we already broke the ABI by removing some functions, so remove this as well. commit c2426adb4b898ba33df38a249b3d6e413b76cc4d Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 15:58:39 2013 +0200 daemon: Add documentation for computed properties Those are also part of the display device properties that we will update. commit b72973472cbf639d47ed1250a1bdf2178945f61a Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 15:58:13 2013 +0200 daemon: Mention hard-coded display device object path /org/freedesktop/UPower/devices/DisplayDevice is a stable object path. commit 511a1dbf7c9135926f83f1fec57106a19cc9f428 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 15:57:34 2013 +0200 daemon: Minimise WarningLevel signals When it doesn't actually change, don't send out signals. commit f065cd202c70b412928d3b9287093b69b11ad3d8 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 15:56:19 2013 +0200 daemon: Fix sending device's PropertiesChanged signal The interface name was missing ".Device" at the end, so wasn't getting registered by clients. commit 01226cb2821e8cdc728f49c861e88d22fedc58df Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:56:35 2013 +0200 daemon: Emit PropertiesChanged for computed properties too The IconName and WarningLevel properties were not sent out through PropertiesChanged when they changed for devices. commit cb9b1aaad8e50b3117d28f29fed0a1569bfde681 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:48:25 2013 +0200 daemon: Only modify display device when it changes When none of the properties of the display device change, do not modify it. commit bda51f5284419cf4b548e754bcadd01d22c75e68 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:42:34 2013 +0200 daemon: Add GetDisplayDevice method And export a DisplayDevice object which can be used by desktop shells to show/hide the status icon. commit e7eed719f2c40482580c281750f5a6daf02a3d1d Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:39:26 2013 +0200 daemon: Set the display device type when on battery When on battery only, we weren't setting the display device type properly. commit f15992c6a3381f8a6275466b954d2e34c6ce89f2 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:06:13 2013 +0200 daemon: Use constant for the devices object paths commit 473b4c35685ff68184c4f48d65e04a82c977aace Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 13:05:43 2013 +0200 daemon: Remove spurious linefeed commit 19fdd684fab1647a6e340f63e09d5ccffe8bb038 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 16 12:42:09 2013 +0200 daemon: Remove 2 undefined functions from headers up_daemon_get_on_battery() and up_daemon_get_warning_level() weren't defined or used anywhere. commit 8bf9ae0eefae7aea4a49e90ef4bda2255aac97ed Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 17:50:55 2013 +0200 daemon: Remove left-over debug commit 2dae17d87b4e11c2476d248285693fd65f3dde17 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 17:47:20 2013 +0200 daemon: Make UpDevice emit PropertiesChanged signals That will make libupower-glib UpDevice work again, as the proxy was not receiving property changes, and we kept reading old cached values. commit 5e5e7379482d5b6f09426dce6e6afd15606bea4b Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 17:46:29 2013 +0200 daemon: Add support for more types for PropertiesChanged Add code to transform strings, doubles, uint64s, and int64s. commit 2cfd98c01d937922e24c6e0eaa80bc815efe4828 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 16:43:03 2013 +0200 daemon: Coalesce PropertiesChanged signals together Instead of sending one changed signal at a time, coalesce them together to reduce wakeups. We also export up_daemon_emit_properties_changed() for UpDevice to use. commit 85ce906bf232b16ec8401200cf11810cd879330f Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 16:04:21 2013 +0200 lib: Fix compilation commit 677f2f4da74137bfa037224aef5e0de23799fde2 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 15:51:55 2013 +0200 lib: Use slices to allocate cached properties Saves on memory fragmentation. commit 4079ba8272c465610329cf70a7e54adabab76762 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 15:51:00 2013 +0200 lib: Print property name when cached property doesn't exist commit d7d215a4b61b136b8f167c8e0f620bf55c1c7272 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 15:50:31 2013 +0200 lib: Cache property values correctly This is cleaner. commit 689ae112de257c49403722efcb5ab2c82335a860 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 14:54:03 2013 +0200 daemon: Calculate global WarningLevel correctly By using the state of all the combined batteries, rather than each one (eg. 2 batteries of the same type at 15% shouldn't trigger the "low" warning level). This introduces code to calculate the state of a "display" device, which is either a UPS, or a combination of all batteries. commit 7e61b094097a198e9d9b2fe409b3b16b1d171a14 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 14:53:10 2013 +0200 daemon: Fix possible crasher in UpDevice self-test commit 01d8004d6c70804182ba4776f764999ff3fd87b9 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 15 08:00:30 2013 +0200 daemon: Remove unimplemented up_device_test() commit dab98e291ab635b6957a72f16a6d72513b9bc6b3 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 22:27:35 2013 +0200 daemon: Remove unused internal D-Bus proxy In UpDevice. commit f71ac98cd22867f220808eae35e40b37ef3f9716 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 22:09:19 2013 +0200 daemon: Register on the Bus after coldplug Both for the daemon and devices, so as to avoid D-Bus changes storms on startup. commit d74e4a7243c000ff042d37e6fd6be880a4cc4fbb Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 16:19:10 2013 +0200 daemon: Don't emit changed signal in coldplug We weren't emitting GObject signals in coldplug, no need to send out D-Bus signals either. commit 0ac5c13369be5937b618100484236459c1d8de42 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 16:05:11 2013 +0200 daemon: Sort the UpDaemon struct member commit b446cac8f697fb1417f8d07190f95fa40b690260 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 14:33:54 2013 +0200 daemon: Add new WarningLevel "Discharging" When UPSes are discharging, we should have a warning already, as it means that mains power has been lost to the UPS (though not to the computer). commit 77c3278ff525edf30e2e7adb417a8944b59ccefa Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 14:27:48 2013 +0200 daemon: Move all computations of warning level to daemon There's no reason why the state check should be done in the UpDevice implementation, and the state will be needed to add a new warning level for UPSes. commit ac1708e86e0f87c25e5cf7e11a82324c5d002fba Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 09:16:06 2013 +0200 daemon: Require newer GLib And remove ifdef's. commit d2484d4ec143348628f7129f21ad1fce23050b22 Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 13 15:21:25 2013 +0200 lib: Add support for the IconName property commit c9aeb660e11f60f260dfbacfe7857e5e7d01d3cf Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 13 15:11:48 2013 +0200 daemon: Add IconName property Sends out icon names as defined by the Icon Naming specification. Will save quite a bit of client side code. commit 68b9975ad98b94a28ce2e2ca21316e603d464f1a Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 13 02:46:32 2013 +0200 daemon: Add CriticalPowerAction Paraphrasing from the configuration option: The action to take when "TimeAction" or "PercentageAction" above has been reached for the batteries (UPS or laptop batteries) supplying the computer. This is done 20 seconds after the warning-level variable got set to UP_DEVICE_LEVEL_ACTION has been set, to give the opportunity to front-ends to display a (short) warning. This is only implemented for the Linux backend, using logind. commit 28438a7672eec8277341d14121bf267f8e0542b3 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 21:49:21 2013 +0200 lib: Emit notify:: signals In the UpClient object. https://bugs.freedesktop.org/show_bug.cgi?id=43001 commit 7531dbdac05f1698d565f564f2280aafbeb1ba57 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 21:41:33 2013 +0200 daemon: Emit the PropertiesChanged signal Use raw D-Bus. https://bugs.freedesktop.org/show_bug.cgi?id=43001 commit 3d16414652198f96ff60d6fabe5b4959643f9f18 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 19:42:06 2013 +0200 daemon: Emit the "Changed" signal without going through notify There's no need to use the "notify" signal to capture when the properties are changed, we're the ones sending the notify signals in the first place. commit e0fb5078bd1320e3e31ec029708251cda436bfa4 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:32:34 2013 +0200 lib: up_device_to_text() won't work for fake devices For now, up_device_to_text() won't work for devices that aren't backed by a UPower device. commit 010ab14505999638103e759cb822041e167ed212 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:06:09 2013 +0200 daemon: Device* signals send out object paths Not strings, so correct the signal definitions to match the XML service definition. commit 869050d699d34657ae81c7873fa6dd4285640cb7 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:03:31 2013 +0200 lib: Make it possible to create local UpDevices gnome-settings-daemon creates a composite UpDevice that's not backed by any real D-Bus object in UPower, so we shouldn't try and poke the inexistant proxy in this case. We'll cache the properties that the caller sets in this case, but will not support sending back default/unset values. commit 87709f709a724e139afad182b6bcbccc82ab66f4 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 16:05:16 2013 +0200 daemon: Add small hack for keyboards and mice Imported from gnome-settings-daemon, itself from gnome-power-manager. commit 0da46209f39a6d14fc4a3f9e9be9d652c2b84d1b Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 15:42:36 2013 +0200 tools: Update for API changes commit 858ab85f9531a0d8de1449528d83223bb45990d3 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 15:23:49 2013 +0200 lib: Update for property removal and additions Remove on-low-battery and add warning-level daemon properties. commit bd3a57fe0471ddeb8f0a168f10629e8f5d7b7b6c Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 15:23:25 2013 +0200 daemon: Replace "on-low-battery" property With "warning-level" property. commit 9c27c42a9977afe6e82622bda947b831c3be7197 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 14:32:28 2013 +0200 lib: Fix alignment of "online" in device dump commit 493c2192a26b092fe36441e197fec6f2060ba531 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 14:29:28 2013 +0200 lib: Add warning-level device property commit de749a332b8b659ca9ec33103110cf64e43b5109 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 14:29:04 2013 +0200 daemon: Add WarningLevel device property commit 68aca3a7e7dbbbeab9d6728b1c3d42fa2fdb1538 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:57:24 2013 +0200 daemon: Load level policy configuration commit 3bf0b7adafa71ef44085189132c209848f21da81 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:57:07 2013 +0200 daemon: Add helper to get uint from config commit ccda7a4a17b529b078086f28c37f6bc9b53457eb Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:27:04 2013 +0200 daemon: Remove unused config file loading We already have UpConfig to handle that. commit 5423adab8902eb22ebebcb60c8b4223ef5d7f3eb Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:20:37 2013 +0200 lib: Add UpDeviceLevel enum commit 4a5d12a9093044b348f76b63c78b531d4fdf9d2b Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:20:12 2013 +0200 etc: Add configuration for battery levels commit 91df125e39c5200b87938ad51d28c1174b17bd1d Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 09:31:57 2013 +0200 daemon: Remove unneeded reset of priv struct members It's already done by GObject. commit 8c83871f10b363c7080afbc4dca8fb7841edf42a Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 19:21:55 2013 +0200 lib: Remove dbus-glib from the dependencies libupower-glib now uses GDBus. commit 5adf4c1e20c51bf465fe818ec85d572c000a20f1 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 19:19:44 2013 +0200 lib: Port UpWakeUps to GDBus Using the new proxy. commit b989cad776c5d621761e3c093bcc3cb46ada00a3 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 17:10:26 2013 +0200 lib: Port UpDevice to GDBus Using the new proxy. commit c590354d0ace5610fbdaef918870f8d3c2e5adc6 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:56:49 2013 +0200 lib: No need to set private members to NULL GObject already makes sure of that for us. commit 65c84120f903b50a2894b3b823932aba8dae8444 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:49:18 2013 +0200 lib: Port UpClient to GDBus Using the new proxy. commit 760d294a34d8b231b103ad658cbe9a959f9f3f59 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:48:52 2013 +0200 lib: Build the new D-Bus glue commit a3627b8227a406fc1cda99ddbd8d0ebf0d20470d Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:23:53 2013 +0200 lib: Add autogenerated glue to the daemon commit d10cc97cbb826099530180450052f90b86cdcac8 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:20:18 2013 +0200 Remove QoS interface It was added for some workloads, but ill-suited and never really got traction. Using cgroups to manage the resources of particular services (using systemd), or something separate like rtkit is a better bet. delete mode 100644 libupower-glib/up-qos-item.c delete mode 100644 libupower-glib/up-qos-item.h delete mode 100644 policy/Makefile.am delete mode 100644 policy/org.freedesktop.upower.qos.policy.in delete mode 100644 src/org.freedesktop.UPower.QoS.xml delete mode 100644 src/up-qos.c delete mode 100644 src/up-qos.h commit c842f1a53ec5f1903bd911e0eee2383b0fc5503a Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 12:16:31 2013 +0200 Remove obsolete battery recall properties The recalls for that broken batch of Sony batteries dates back from 2006. All the batteries that could have been recalled have now been recalled, and somebody particularly interested in supporting them can match the batteries using the old rules file, in a user session or a separate daemon. delete mode 100644 rules/95-upower-battery-recall-dell.rules delete mode 100644 rules/95-upower-battery-recall-fujitsu.rules delete mode 100644 rules/95-upower-battery-recall-gateway.rules delete mode 100644 rules/95-upower-battery-recall-ibm.rules delete mode 100644 rules/95-upower-battery-recall-lenovo.rules delete mode 100644 rules/95-upower-battery-recall-toshiba.rules commit 3ed22cd32b5b98b032dd6d9489acd13c65ede0f1 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 12:10:24 2013 +0200 doc: Remove mention of suspend in example commit bd7af247f042c41ea8e664e71084fac562045267 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 12:10:09 2013 +0200 tools: Remove use of deprecated features commit ababfa2aafd939f3cc478738844530b7343706c3 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 12:09:35 2013 +0200 policy: Remove policy for removed features delete mode 100644 policy/org.freedesktop.upower.policy.in commit e981026d9914859c8b6e9eed952f7646988c7a0c Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 11:55:24 2013 +0200 etc: Remove now unused configuration options commit 1ee642e705a63f5ad56a6b55e4bf5c4a64c959b8 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 11:55:03 2013 +0200 daemon: Remove obsolete features delete mode 100755 src/notify-upower.sh commit 030e2c9d3633e35e8beeecc1f41f6e0ff77b57dc Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 11:17:45 2013 +0200 lib: Remove deprecated features All this is now handled by logind. commit 911727fbaa34a13897a87d71311f74646cd4a5ee Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 15:43:24 2013 +0200 build: Add missing dbus-glib-1 to private requires commit ad7e809d4d811bead43de58e5041f8d136c88df6 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 16:02:05 2013 +0200 lib: Simplify _new() functions No need to use a temporary variable. commit 5f26bc5caa1b1d3ed352702be1fec5d5625ff1d1 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 09:31:25 2013 +0200 daemon: Simplify _new() functions commit 7007fea309d211603f4815d45f950becf1a7dec6 Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 09:32:30 2013 +0200 freebsd: Remove useless finalize It was just chaining up. commit f926ee488fd3ec49c61525b86978fba136759baf Author: Bastien Nocera <hadess@hadess.net> Date: Fri Oct 11 11:14:02 2013 +0200 lib: Simplify _to_string() calls commit cb759a05c85a0a81b6813ed53278b4cfc43ce778 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:28:13 2013 +0200 linux: Don't print a warning if the status sysfs attr is missing This is the case for some devices like the Wacom wireless (Bluetooth) tablets, and shouldn't produce a warning. commit e385c570d4084db12005f092b91fd44eebb11874 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 19:35:58 2013 +0200 daemon: Remove unused _set_property commit 1f991aa6e0d90f3006b0d6cc5f04af4193e01d79 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 09:30:26 2013 +0200 daemon: Avoid trying to close fd that wasn't opened If we fail to open the fd for the sysfs keyboard backlight control file, don't try to close it. commit fed403c167706febbb261f994a3c0aea39c166ca Author: Bastien Nocera <hadess@hadess.net> Date: Mon Oct 14 09:26:41 2013 +0200 daemon: Fix options parsing If an unknown option was passed to the daemon, it might fail to parse some of the passed options, and not take them into account. For example: "upower -d --timed-exit" would fail to exit Error out when an unknown option is passed. commit 6abd4123ef2808d1ff35fe7656922f314e68c9a8 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 14:55:30 2013 +0200 linux: Opt-out of checking Watts Up devices earlier Don't wait for tty events from udev if we're not going to use the Watts Up device anyway. Cuts down on the possible wakeups. commit d6bfaaf0aac5cac01d3abf9059703252286f4566 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 14:46:39 2013 +0200 etc: Disable Watts-Up devices by default They are few are far between, and users of the device can spare the time to enable this by default. https://bugs.freedesktop.org/show_bug.cgi?id=33846 commit b622008af38d229965cfc3dccf1649c63790b794 Author: Landry Breuil <landry@rhaalovely.net> Date: Thu Oct 3 13:58:00 2013 +0200 daemon: Include config.h in up-backend.h To reach ENABLE_DEPRECATED #define https://bugs.freedesktop.org/show_bug.cgi?id=70071 commit a1b772af162ca0de4513fe9ed645d4fe0ce27b4f Author: Landry Breuil <landry@rhaalovely.net> Date: Thu Oct 3 13:58:00 2013 +0200 openbsd: Use g_thread_try_new() Instead of deprecated g_thread_create() https://bugs.freedesktop.org/show_bug.cgi?id=70071 commit 3a9bd434507fe056ae57ee104a8a915fa4925f76 Author: Jasper Lievisse Adriaanse <jasper@humppa.nl> Date: Thu Oct 3 12:59:37 2013 +0200 openbsd: recognize when battery is absent or fully charged https://bugs.freedesktop.org/show_bug.cgi?id=70064 commit b61f8a72e5c8c7ed570d7a08555142e877ea8374 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:43:30 2013 +0200 website: Link to bugzilla https://bugs.freedesktop.org/show_bug.cgi?id=66687 commit f3898db4d3a340e5a4245bb86c3291d109ae0349 Author: Bastien Nocera <hadess@hadess.net> Date: Sat Oct 12 15:29:18 2013 +0200 linux: Don't guess discharging state for devices If the device state is unknown, don't guess based on the laptop's power supplies (battery/power line) as it might not be charging from there. https://bugs.freedesktop.org/show_bug.cgi?id=70321#c1 commit 66da41ceacbeb1ecea05ed6c8df112faee9aeeb0 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 22:28:26 2013 +0200 lib: Add missing "element-type" introspection metadata https://bugs.freedesktop.org/show_bug.cgi?id=55419 commit fc5793e742d769febd3239bab8e88750457423ab Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 13 00:49:24 2013 +0200 lib: Fix crasher calling _about_to_sleep_sync() https://bugs.freedesktop.org/show_bug.cgi?id=54976 commit a10a61e181bdb7ed5ca1f838c824e73d4a40152d Author: Bastien Nocera <hadess@hadess.net> Date: Sun Oct 13 00:35:59 2013 +0200 rules: Update and correct Toshiba recall list The list wrongly contained PA3465U, had all the batteries in duplicate, and didn't contain a number of affected batteries. https://bugs.freedesktop.org/show_bug.cgi?id=44370 commit d43ab28a29420a61d031908abbf1d13b2cb35796 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 18:59:08 2013 +0200 lib: Fix a small memory leak The bus was never unreferenced in the UpWakeups object. commit e4858d94343bba2afbebcd1a4925c981a38a9579 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Oct 10 18:32:41 2013 +0200 up-client: Really don't overwrite retval with prop values db89e5a32bf2c16c0d3d00f6c8f0ef7e5e7efa8f was incomplete and "ret" was being used instead of prop_val to set some of those properties. It's likely your laptop would have been seen as docked for example. commit ee93745870948c9365450c9672263edbf0153484 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 17:40:18 2013 +0200 trivial: post release version bump commit e54cc7e9f9cf54a65b28d8a462f34f463b08329e Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 17:35:34 2013 +0200 Released UPower 0.9.22 commit 99755262654921c95c7d9cf4c06f3ef93b0705da Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 17:19:27 2013 +0200 Linux integration tests: Fix PEP8 errors commit 2aa24aeed27a2965304b434323f06211697c9b30 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 17:13:06 2013 +0200 Linux integration tests: Fix pyflakes errors Drop a lot of unused variables commit e89d04768019a3154e731067f2e88ed0b37742e1 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 16:38:57 2013 +0200 Linux integration tests: First test case for library Start testing the client-side library through gobject-introspection. This covers https://bugs.freedesktop.org/show_bug.cgi?id=70283 commit 03c4abbfb525528a6b2335363dea9929d8516f90 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Oct 8 17:01:39 2013 +0200 libupower-glib: Fix error handling In up_client_get_properties_sync(), don't set the passed GError** to NULL, instead set the actual pointed-to GError* to NULL by default. Fixes proper error reporting back to the client if something does fail. commit ecc4e379ccc2f1e3b9c8ce2853657c5726513c5e Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 8 16:09:04 2013 +0200 up-client: Don't error out gathering deprecated properties We would error out when trying to get properties that are disabled by default (deprecated). Ignore those properties when building without the deprecations. This is still broken if the library is built with the deprecations enabled, but not the daemon isn't, but that's an edge case. https://bugs.freedesktop.org/show_bug.cgi?id=70283 Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit db89e5a32bf2c16c0d3d00f6c8f0ef7e5e7efa8f Author: Bastien Nocera <hadess@hadess.net> Date: Tue Oct 8 16:07:15 2013 +0200 up-client: Don't overwrite retval with property values If one of the properties is FALSE, we'll end up return FALSE without setting an error (and making the caller crash if they expect an error being filled in). https://bugs.freedesktop.org/show_bug.cgi?id=70283 Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 5c132c683d0ddfc78a58bb4de6582c6a292a067f Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Sep 27 08:26:58 2013 +0200 linux: Track power_supply devices by name only instead of full sysfs path The full native sysfs path of wireless HID battery devices contains a lot of jitter like USB tree layout or sequence numbers which change after every resume from auto-suspend. Plus, there are kernel bugs which don't give proper remove events for those: http://bugzilla.kernel.org/show_bug.cgi?id=62041 As device names within the same subsystem must be unique anyway, and we only use the device name for constructing the D-BUS object path, only consider the device name for the device list native → upower object lookup table, i. e. in up_native_get_native_path(). This fixes the "A handler is already registered for <battery>" assertion crash if a bluetooth device comes back from auto-suspend. This fixes the test_bluetooth_mouse_reconnect() test case, drop the expected failure. https://launchpad.net/bugs/1112907 commit 6f9ccd35b3c1d154735e69064fda3ebee63cb2e0 Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Sep 20 11:36:26 2013 -0500 Linux integration tests: Test reconnect of bluetooth mouse When these power down, we don't get remove uevents for the original power_supply devices from the kernel, but instead we get new devices with a different sequence number, but the same name: UDEV [6408.025124] add /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:12/0005:0D62:0558.0001/power_supply/hid-00:0f:f6:6d:8e:c0-battery (power_supply) UDEV [23785.90673] add /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:12/0005:0D62:0558.0002/power_supply/hid-00:0f:f6:6d:8e:c0-battery (power_supply) This circumvents the existing "treating add as change" check (as the native path is different) but breaks later on when building and registering the (supposedly) new object: ERROR **: Failed to register GObject with DBusConnection: org.freedesktop.DBus.Error.ObjectPathInUse A handler is already registered for /org/freedesktop/UPower/devices/mouse_hid_000ff66d8ec0_battery This reproduces https://launchpad.net/bugs/1112907 commit 960d4413f93c1974166b55b15e8489f61e4485b6 Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Sep 20 11:57:01 2013 -0500 Linux integration tests: Run tests under umockdev-wrapper Don't just cover the test upowerd by umockdev-wrapper, but the test suite itself as well, so that we can send uevents. Do this by re-execing the test suite under umockdev-wrapper if it's not already running under it. commit ee0a71dd7ded70af8e243e9853db0b4ba7c9508a Author: Richard Hughes <richard@hughsie.com> Date: Wed Sep 18 08:42:40 2013 +0100 openbsd: Do not call g_thread_init() commit 5c0a57cfa01e00c8418419b4086b1369b1bd74aa Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Date: Fri Sep 6 14:26:24 2013 +0200 linux: Detect the battery of bluetooth input devices Check the input subdevices of the bluetooth parent device of a battery, if present. If there is mouse* input child device, is a mouse battery; otherwise, it is a keyboard battery. This also fixes the PowerSupply attribute for these to be false, as the batteries of wireless input devices don't power the system. https://launchpad.net/bugs/1153488 Signed-Off-By: Martin Pitt <martin.pitt@ubuntu.com> commit 09d41eb759f980736bcf51c1fb709dbfb44177c1 Author: Martin Pitt <martinpitt@gnome.org> Date: Wed Sep 4 15:14:20 2013 +0200 Linux integration tests: Add bluetooth mouse and keyboard These should be detected with their proper type (5/6, not 2) and not count as powering the system, i. e. their PowerSupply property should be False. This reproduces https://launchpad.net/bugs/1153488 commit fdc62ad245eb76c337cea2abbbeaca7ddf7c60eb Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Date: Tue Sep 3 21:16:59 2013 +0800 Set locale in daemon and tool This is necessary to properly show non-UTF8 strings in debug mode (for the daemon) and upower --dump etc. (for the tool). commit 347b8b0b93b1e96bfc8a2d54df3d2864ba1d861f Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Sep 3 23:24:21 2013 +0200 hidpp: try harder not to report 0% battery (1) If the K800 keyboard is charging via the USB cable, it will report itself as Charging, but with a discharge level of 0 (which means "unknown". In this case, the previous known value (before connecting the cable) is always a better approximation than using zero. (2) When the K800 has fully charged (but with the cable still plugged in), it will still report 0 as discharge level. "Full" is 100% by definition, so let's fallback to that value. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 5867d5432bebbb4f1aeaa11bcbd100b94bb74791 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Sep 3 10:17:20 2013 +0200 Linux integration tests: Verify device types Check "Type" property for AC (1), battery (2), and UPS (3). commit 440ee20f01ef4781d424a88ff06ba1f2a4015c79 Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Sep 3 09:35:04 2013 +0200 Linux integration tests: Verify that UPSes and batteries are power supplies So far we only have done that for ACs. commit ba363c8bbe73778d396141fe4a976c8c71b34cf5 Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Date: Tue Sep 3 14:43:04 2013 +0800 linux: Allow valid UTF-8 encoded string Signed-Off-By: Martin Pitt <martin.pitt@ubuntu.com> commit d070b4b83bd2efb47ce778bd54ff5d44be61cd8f Author: Martin Pitt <martinpitt@gnome.org> Date: Tue Sep 3 09:21:12 2013 +0200 Linux integration tests: add test for vendor/product/serial strings This exercises the non-ASCII character filtering and the three cases "valid ASCII", "valid UTF-8", and "invalid/unprintable ASCII". commit 578ad1e09b28a7bcbb51034f1f117ac16c792c96 Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Sep 2 11:08:33 2013 +0200 hidpp: simplify setting model and serial I previously followed the model example for copying part of the string, but there is a much simpler way to build the name string using g_strdup_printf. Note that a simple strdup() is not sufficient for model since it does not have to be NUL terminated. Reported-by: Martin Pitt <martin.pitt@ubuntu.com> Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 8113cab7ffe185f9efd841c8f8749b2f05df50e3 Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Sep 2 10:57:03 2013 +0200 hidpp: drop read_msg, print correct buffer Since "hidpp: split request read/write functions", the request buffer is not used anymore while reading the response. Therefore the additional buffer read_msg that was used for preserving the request buffer can be discarded. This patch also fixes printing the wrong response buffer (response would always yield zeroes until the functions exits). Reported-by: Martin Pitt <martin.pitt@ubuntu.com> Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 16544c135590d8c653cb83eec3f8e4395687a4d8 Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Sep 2 10:47:03 2013 +0200 hidpp: ignore remaining garbage for debug print HidppMessage is currently of size 20 ("long message"). Since short messages are always of size 7, do not bother printing the remaining 13 bytes. This code path is currently only used by hidpp-test (not installed). Reported-by: Martin Pitt <martin.pitt@ubuntu.com> Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit a7766cfde93974e05ae3fa87a41191a5542cf7bc Author: Peter Wu <lekensteyn@gmail.com> Date: Wed Aug 28 19:12:12 2013 +0200 hidpp: fix K750 battery and luminosity properties Since commit b1f12feb1fd4535255f04c91bef90ae11ce57311 ("Factor out the Logitech Unifying support to support other devices"), the battery status would always be reported as 1% for the K750 keyboard. Besides that, the luminosity level was removed. This patch fixes the battery level and re-adds the luminosity level. To avoid negativity issues when reading light level into a double type, make the HidppMessage params unsigned. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 789dbb037cc8ee8764ba852c9fdfdd1a2dc574a9 Author: Peter Wu <lekensteyn@gmail.com> Date: Wed Aug 28 18:21:45 2013 +0200 hidpp: move timeout checking before reading When no report matches the report type or device, the previous code did not terminate the loop early enough because the check was missed. Now the timeout is always checked before attempting to poll. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 5058ede399074688958784f0265d0682e418864a Author: Peter Wu <lekensteyn@gmail.com> Date: Wed Aug 28 18:19:50 2013 +0200 hidpp: split request read/write functions In preparation for reading notifications; the device index is now also validated before using a message, this avoid matching the wrong report. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit e1ed283930afe4cfcbea39cc8e1938f5bf5c32c7 Author: Peter Wu <lekensteyn@gmail.com> Date: Thu Aug 22 23:19:34 2013 +0200 hidpp: retry when read or g_poll is interrupted Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 84a9b525be9d9f3ccda2638d70b1d6ba0313eb85 Author: Peter Wu <lekensteyn@gmail.com> Date: Thu Aug 22 23:19:27 2013 +0200 hidpp: more useful error messages If read, wait or g_poll failed, it would return -1. This information is not really useful, so print the error string instead where applicable. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit cdeaf166297ac313e42594b4350a00638ff9ef58 Author: Peter Wu <lekensteyn@gmail.com> Date: Thu Aug 22 17:37:31 2013 +0200 hidpp: fix memleak while coldplugging The device returned by g_udev_device_get_parent must be freed by the caller. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit dda9bc21e51d0b379eb800f911856683816166eb Author: Peter Wu <lekensteyn@gmail.com> Date: Thu Aug 22 12:34:52 2013 +0200 hidpp: fix fd leak Upon unplugging the USB receiver, the file descriptor of /dev/hidrawX is not closed. With commit "HID: hidraw: correctly deallocate memory on device disconnect"[1] (queued for 3.12), this missing close() causes a /dev/hidrawX devuce to persist until UPower is restarted. On earlier kernels, never remove your USB receiver or you will experience random errors resulting from data structures corruption[2] (which occurs because UPower tries to poll() or read() an hidraw device while the kernel has already released the memory for it). Not UPowers fault, but UPower makes this bug more likely since it runs as daemon. [1]: http://lkml.org/lkml/2013/7/22/248 [2]: http://lkml.org/lkml/2013/8/6/457 Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 984d88f9437c1e1a3e5397829051eedb6564270e Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Aug 19 12:46:48 2013 +0200 hidpp: retrieve serial number for devices (v2) Before this, history files were saved as history-rate-M525.dat. Since multiple devices of the same model might be connected, this name is not unique enough. The serial number gives a more reliable path for the history files and allows clients to distinguish their devices (an object path like /org/freedesktop/UPower/devices/mouse_0003o046DoC52Bx0018 does not stay the same). Note: if a serial number cannot be read, instead of reverting this patch, consider splitting the serial refresh from the version, kind and model refresh. - v2: Fix invalid return value when an invalid parameter is passed to hidpp_device_get_serial. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 81ea62d8e1b4fba22f1c8cb921320a83d96a50c7 Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Aug 19 00:52:23 2013 +0200 hidpp: remove unnecessary HID++ 2.0 code The device name and type can be queried from the receiver which does not mind if a paired device is using HID++ 2.0 or 1.0. Therefore remove the hidpp20-specific code which also removes indirection of an uninitialised "map" variable. The following code was buggy: msg.feature_idx = map->idx; ... map = ...; if (map != NULL) { ... } ... priv->model = ...; It should have become: map = ...; if (map != NULL) { ... priv->model = ...; } ... but since the HID++ 2.0 code is not necessary, just remove it. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit a8028628213cca67adf556f1fedf86233b4111ad Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Aug 19 11:35:33 2013 +0200 hidpp: fix properties for unreachable devices (v2) This includes "is-present" and "state" (which will be marked "unknown"). "percentage" is not touched since it is still an indication of the battery level, changing it to zero is not helpful. Previously, properties were never updated because the refresh would fail when the battery refresh request failed. - v2: fix invalid return value when an invalid parameter is passed to hidpp_device_is_reachable. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 88398cf75b0f98427aa35cca4c6e0aa43e3e7e1a Author: Peter Wu <lekensteyn@gmail.com> Date: Mon Aug 19 11:22:00 2013 +0200 hidpp: improve HID++ version detection, fix uninit var Do not assume HID++ 1.0 when device is unreachable. This allows up_device_unifying_refresh() to be optimized to stop sending a ping message at every refresh for HID++ 1.0 devices. priv->version will now always contain 0 when the real HID++ version of a device is not (yet) known, comments are updated to reflect this. Also fix an uninitialised msg variable that might confuse the error handler in hidpp_device_refresh. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit d4d66c205f2291288f8f7539bc5c4da45ea0c4cf Author: Peter Wu <lekensteyn@gmail.com> Date: Wed Aug 7 23:22:17 2013 +0200 hidpp: pick up devices that just got paired When sending a ping request right after a device got paired, the ping message gets lost (there is no response). Work around that by delaying the initial packet exchange. 10 milliseconds seems to work, but let's choose 30 ms to be fully safe. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 1745b8e760ad7e23ed737dd06ff1a3ec76b2d269 Author: Peter Wu <lekensteyn@gmail.com> Date: Wed Aug 7 22:32:41 2013 +0200 hidpp: assume HID++ 1.0 for unreachable devices When the USB receiver is just plugged in, devices may not be active ("unreachable") and therefore return RESOURCE_ERROR on requests. This causes upower to fail on picking up new devices. As a workaround, assume that all discovered devices will eventually become reachable (even if they don't, for example if the device was paired to another computer while the computer carrying the receiver was powered off). Actual removal of unpaired devices is done by the Logitech HID driver, that should remove sysfs entries which can be detected by upower. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit fd6e214bb730b515f4f6a61216e080ad64c75ee0 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 22:45:30 2013 +0200 hidpp: test only once for d7 register The d7 battery register does not magically re-appear, therefore skip this register once it is detected that the register is unusable. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit d58a79cceb17f7a65854990db2e2017bacc276d9 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 22:34:27 2013 +0200 hidpp: support battery register 0x07 The HID++ 1.0 Illuminated Keyboard K800 does not support the d7 register, instead is uses 07. Its observed behaviour is documented in the ltunify repository[1]. [1]: https://git.lekensteyn.nl/ltunify/tree/registers.txt Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 9fefbcb087c16743c452ae9d44f9109923cd0385 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 22:12:22 2013 +0200 hidpp: do not print warnings if device is offline This reduces spam in stderr (which is logged to the systemd journal). Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit dd71ca04b8dd6a782d96eaf886c9b84c7c53efa8 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 22:10:11 2013 +0200 hidpp: recognise HID++ 1.0 ping response again Removed while refactoring hidpp_device_cmd, now that the message validation is in place, introduce the 1.0 check again. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 132f9373a5df313103a059b254906ef90cc8e8e1 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 19:57:09 2013 +0200 hidpp: clear message queue before initiating new requests (v2) This prevents the use of responses from other HID++ applications (such as Solaar and ltunify). - v2: do not hang in a loop when read() fails, e.g. when it returns EIO because the device was unplugged. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 4a211e07c37b731b7e1a72454cf4955226ef8fe2 Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 19:38:38 2013 +0200 hidpp: validate messages, retry if invalid This prevents matching the wrong response packet, for example when a mouse is moved while a packet is read. As a result, the reads are more reliable and log spam is reduced. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit c830102ca7ab1c5b59810eb1f2a17ab919ad366a Author: Peter Wu <lekensteyn@gmail.com> Date: Tue Aug 6 19:14:13 2013 +0200 hidpp: refactor to introduce structure in protocol Before this patch, there was no structure at all in the messages that were passed around. Some issues: - (debug) Every message of length 7 was considered a request (and length 20 were seen as responses). This is not the case for HID++ 1.0. - The length of the message payload (ignoring the header) is fixed to 7 or 20, this was not considered in the previous code. - The hidpp_device_cmd function contained special-case code for a HID++ 1.0 response on a HID++ 2.0 ping request. After this patch, the protocol message structure should be more explicit. To be done: - Test for HID++ 1.0 ping response (removed/broken by this patch). - Validate responses, retry read if needed. Signed-off-by: Peter Wu <lekensteyn@gmail.com> commit 12f6f4014502d41d343dcfaf39a65a3ae504ce04 Author: Timothée Ravier <siosm99@gmail.com> Date: Mon Sep 2 05:46:08 2013 +0200 linux: Only one warning if no valid voltage found Avoid filling the logs with repeated warning saying that no correct voltage value was found for a power device. Improves the situation with bugs https://bugzilla.redhat.com/show_bug.cgi?id=847874 and https://bugzilla.redhat.com/show_bug.cgi?id=863524 Signed-off-by: Timothée Ravier <tim@siosm.fr> Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 7933b0e55234fca86809dad1dee53f0d8e2b96ec Author: Martin Pitt <martinpitt@gnome.org> Date: Thu Aug 29 11:10:15 2013 +0200 trivial: Stop calling deprecated g_type_init() When building with a recent enough glib (>= 2.36), don't call g_type_init() any more. This is deprecated and causes ugly compile warnings. commit 2b10e202626332713583122010160b709b77acbc Author: Martin Pitt <martinpitt@gnome.org> Date: Wed Aug 21 18:11:52 2013 +0200 Make GetHistory() array order consistent When requesting fewer history elements than we actually have, fix the interpolation loop to not reverse the returned elements; this already does not happen if we request more elements than available, which led to the returned list order depending on the history size. Now the first array element is always the most recent one. Update documentation accordingly. Add test case to reproduce the problem. We now add three sample points to be able to request a subset and still assert its correct order, and make the charge values be further apart to ensure correct interpolation. https://bugs.freedesktop.org/show_bug.cgi?id=68384 commit 470bc1150b67d1b6052dd00bebd4ae6a8a3f12c5 Author: Timothée Ravier <siosm99@gmail.com> Date: Sun Aug 25 00:41:42 2013 +0200 Linux: More explicit warning when no voltage found Add device full path in warning if retrieving design voltage fails in up_device_supply_get_design_voltage(). Also helps diagnose bugs https://bugzilla.redhat.com/show_bug.cgi?id=847874 and https://bugzilla.redhat.com/show_bug.cgi?id=863524 Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 6d3a68d7d4a737b2d79fb93547707b7c715aae2d Author: Timothée Ravier <siosm99@gmail.com> Date: Sun Aug 25 00:41:41 2013 +0200 Linux: Fix warning in up_device_supply_get_design_voltage This avoids filling the logs with the unnecessary warning line: GLib-CRITICAL **: g_ascii_strcasecmp: assertion `s1 != NULL' failed as seen in https://bugzilla.redhat.com/show_bug.cgi?id=847874 and https://bugzilla.redhat.com/show_bug.cgi?id=863524 Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 9b142071d33831721da9553c9a230b126aeb2a1d Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Aug 23 08:52:45 2013 +0200 Linux integration tests: add test for temperature Add test case for exporting the temperature, as added in commit 03f67aa. https://bugs.freedesktop.org/show_bug.cgi?id=68338 commit eaf86482a925e69e6e32973184164c6b8e5391d0 Author: Seth Forshee <seth.forshee@canonical.com> Date: Tue Aug 13 10:51:48 2013 -0500 Add temperature property for batteries Linux's power_supply class supports a temperature attribute, which is supported by many battery drivers. Add a new property to export this information and support this property in Linux. https://bugs.freedesktop.org/show_bug.cgi?id=68338 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Martin Pitt <martinpitt@gnome.org> commit 03f67aabfe2a01ebfbcb424fa193c02be8f0906e Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Aug 23 08:45:14 2013 +0200 trivial: In test case of previous commit, check OnLowBattery property commit 07b95b8e27e7c488828c46a28df96f1c83b185c8 Author: Martin Pitt <martinpitt@gnome.org> Date: Fri Aug 23 08:31:20 2013 +0200 linux: Fix batteries which report capacity, but not energy/charge Many Android devices only export charge_full and capacity, but not charge_now or energy_now. In that case, directly read the percentage (from the capacity attribute) and calculate current energy from that. Thanks to Seth Forshee for the original patch! https://bugs.freedesktop.org/show_bug.cgi?id=68337 commit aa1656f6edf52ff678ecdfc42de4a67e1d036b03 Author: Richard Hughes <richard@hughsie.com> Date: Fri Jul 26 15:53:41 2013 +0100 trivial: post release version bump commit 1bcacb296d17d2c475ce8a9142f20771f18b0cc3 Author: Richard Hughes <richard@hughsie.com> Date: Fri Jul 26 15:52:42 2013 +0100 Released UPower 0.9.21 commit 04faa0e1438f3bfbc0644c9adf9e6e17e06da389 Author: Tom Gundersen <teg@jklm.no> Date: Wed Mar 20 17:31:21 2013 +0100 build: detect udev rules dir Udev rules may live in either /lib/udev/rules.d or /usr/lib/udev/rules.d depending on the distro. Remove the heuristic for deciding the dir, use pkgconfig to detect the location and allow it to be set manually. v2: fix specifying --with-udevrulesdir Signed-off-by: Richard Hughes <richard@hughsie.com> commit 5b02923e012589930a78053fb0cbc9caa1675206 Author: Richard Hughes <richard@hughsie.com> Date: Tue May 7 14:13:08 2013 +0100 trivial: Fix the gitignore files commit efa97d515fdef37e7c20b13e1e49f82080b11625 Author: Richard Hughes <richard@hughsie.com> Date: Tue May 7 14:07:31 2013 +0100 Use PIE to better secure installed tools and also use full RELRO in the daemon create mode 100644 m4/ax_check_compile_flag.m4 create mode 100644 m4/ax_check_link_flag.m4 commit 61d49c3120fb5d2ce82b9871e9ce5946be0eee48 Author: Richard Hughes <richard@hughsie.com> Date: Tue May 7 14:01:28 2013 +0100 Update the upower man page with all the current options commit 181e7fa573bf6ba442ffd29d845c8fd10b62b3fe Author: Richard Hughes <richard@hughsie.com> Date: Wed Apr 24 08:04:31 2013 +0100 Allow clients to call org.freedesktop.DBus.Peer This fixes Ping() and GetMachineId() which is needed by systemd. commit 09fa9d5463f4c64f6d24448545948761b258d226 Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Thu Mar 28 09:59:55 2013 +0100 Locate non-unifying receiver by looking for hidraw with hiddev exposed. For non unifying receiver we were trying to locate receiver hiddraw device by looking into INTERFACES property. This doesn't work well for non-unifying devices from keyboard+mouse sets (which use single dongle for 2 devices but are still non-unifying). The only thing that's different between hiddraw receiver and other devices (mouse, keyboard etc) is that receiver also exposes hiddev interface. Use that fact to reliably locate receiver. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit d4bec29c8296edffad717c579528234b52cca89c Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Tue Mar 26 18:48:51 2013 +0100 hid++v1 detection for unreachable devices and features upgrade We are back to using HIDPP_FEATURE_ROOT_FN_PING for detecting protocol since it's the official way described in [1]. Unfortunately unreachable devices ("disconnected" in logitech terminology) don't respond to this v1 ping query as described in docs. Seems that docs cover only reachable state reply for version checking. Thus we have to consider HIDPP_ERROR_CODE_UNSUPPORTED to also be v1 (since we actually got some v1 valid answer - error reply). Introduce HIDPP_REFRESH_FLAGS_FEATURES for checking features provided by v2 device. This recheck is triggered when we upgrade from any protocol to v2 in HIDPP_REFRESH_FLAGS_VERSION. This allows us to properly upgrade from v0/v1 to v2 and also we don't send v2 queries when we know that the device is v1. [1] logitech_hidpp10_specification_for_Unifying_Receivers.doc Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit fadca8ad7706c15b5fabee2f7be599961fe33240 Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Fri Mar 22 19:46:47 2013 +0100 Better method of figuring out v1 vs v2 protocol version. Protocol version detection isn't very reliable (especially for hid++ v1). Version 1 checking was potentially happening in every hidpp_device_cmd() call and not only when requested. Improve that to do version checking and priv->version manipulation only when requested by using HIDPP_REFRESH_FLAGS_VERSION. When doing version checking first try v2 protocol command and if it succeeds assume version 2 device. Otherwise try v1 protocol query and if that successds assume version 1 device. v2 devices in unreachable/sleep mode seem to do not respond to v2 queries but they respond to v1 queries! Still we want best protocol possible. To do that we are rechecking version when current protocol version is below 2 and we are doing up_device_unifying_refresh() and if recheck succeeds we upgrade protocol to v2. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit 32daed2dfa22196bd4c51fdabad3d333d4839903 Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Fri Mar 22 15:28:11 2013 +0100 Add support for Logitech Wireless (NonUnifying) devices There are Logitech Wireless devices similar to Unifying ones with the difference that device is paired with single dongle and dongle doesn't support pairing multiple devices. Add support for these. Tested with Wireless Mouse M187 and M185/M225. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit fd0286e871bcf67d29aa622b66ecf362fe2d6ec0 Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Thu Mar 21 20:40:26 2013 +0100 Repair vendor handling for Logitech Unifying devices Set proper vendor via udev rules for unifying devices and handle that in code. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit e571f840e9fd945c94bc1c5fa494fde9d23fa2ad Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Thu Mar 21 19:57:26 2013 +0100 Add support for HIDPP_REFRESH_FLAGS_MODEL in hid++ v1 Add support for checking device model name for hid++ v1 protocol version. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit af24f55c7925c8ea990cb36078b63c17cd671a95 Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Wed Mar 20 22:35:59 2013 +0100 Invalid request/response for HIDPP_REFRESH_FLAGS_BATTERY in hid++1 Version 1 hid++ HIDPP_REFRESH_FLAGS_BATTERY packets were incorrect. Response packets were incorrectly thrown away as invalid. These packets have HIDPP_HEADER_REQUEST (and not HIDPP_HEADER_RESPONSE as code expexted). Fix that by allowing both types. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> commit 972acff14532aa1a495b2ee20f24505cb581291a Author: Arkadiusz Miśkiewicz <arekm@maven.pl> Date: Wed Mar 20 22:28:11 2013 +0100 Buffer for HIDPP_REFRESH_FLAGS_KIND not big enough HIDPP_REFRESH_FLAGS_KIND action puts result into 7 bytes buffer and later tries to access 8th element (with index 7). Make buffer bigger, so 8th element will fit. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl> Signed-off-by: Richard Hughes <richard@hughsie.com> co ... |