Bug 90222 - Upower no longer handles bluetooth mice properly
Summary: Upower no longer handles bluetooth mice properly
Status: RESOLVED FIXED
Alias: None
Product: upower
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
: 86510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-29 01:18 UTC by Marc Deslauriers
Modified: 2015-05-29 08:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch (5.28 KB, patch)
2015-05-04 23:34 UTC, Marc Deslauriers
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Deslauriers 2015-04-29 01:18:24 UTC
I have a bluetooth Logitech M557, and it is being mis-detected by Upower as a battery instead of a mouse:

Device: /org/freedesktop/UPower/devices/battery_hid_00o1fo20of5oabob5_battery
  native-path: hid-00:1f:20:f5:ab:b5-battery
  model: Bluetooth Mouse M557
  power supply: no
  updated: Mon 27 Apr 2015 10:05:22 AM EDT (13 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    warning-level: none
    energy: 0 Wh
    energy-empty: 0 Wh
    energy-full: 0 Wh
    energy-full-design: 0 Wh
    energy-rate: 0 W
    percentage: 100%
    capacity: 100%
    icon-name: 'battery-full-symbolic'
  History (charge):
    1430143522 100.000 discharging

Something changed between kernels 3.13 and 3.16 that changed the layout in /sys/class/bluetooth.

See downstream bug report for some info dumps:
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1449051
Comment 1 Marc Deslauriers 2015-05-04 23:34:15 UTC
Created attachment 115537 [details] [review]
Proposed patch
Comment 2 Martin Pitt 2015-05-20 12:57:32 UTC
Thank you! Pushed with trivial fix for this warning:

up-device-supply.c: In function 'up_device_supply_coldplug':
up-device-supply.c:989:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      if (dir = g_dir_open (subdir, 0, &error)) {
      ^
Comment 3 Martin Pitt 2015-05-29 08:10:30 UTC
*** Bug 86510 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.