Bug 1205916

Summary: upower doesn't display the battery for Logitech mouse
Product: [Fedora] Fedora Reporter: George Nikandrov <gnikandrov+fedora>
Component: upowerAssignee: Richard Hughes <rhughes>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: matt, rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 13:12:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description George Nikandrov 2015-03-25 22:39:05 UTC
Description of problem:
Since Fedora 22 release, the upower daemon stopped reporting mouse battery information.

Version-Release number of selected component (if applicable):
upower-0.99.2-4.fc22.x86_64
kernel-4.0.0-0.rc4.git0.1.fc22.x86_64
Basic X window system (no GNOME).

Steps to Reproduce:
upower -d lacks information about mouse when Logitech Unifying Receiver is plugged in.

Additional info:

/usr/lib/udev/rules.d/95-upower-csr.rules has the rules for Logitech Unifying Receiver device:
--
> ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", DRIVER=="logitech-djdevice", ENV{UPOWER_BATTERY_TYPE}="unifying"
> ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c532", DRIVER=="logitech-djdevice", ENV{UPOWER_BATTERY_TYPE}="unifying"
--

Seems that DRIVER name in udev has changed (4.0 kernel?), so that it has no logitech-djdevice:
--
# for f in /sys/bus/hid/devices/*; do udevadm info $f | grep DRIVER=logitech ; done
E: DRIVER=logitech-hidpp-device
E: DRIVER=logitech-djreceiver
--

By changing DRIVER to logitech-hidpp-device (or copying it to /etc/udev/rules.d and changing there) I was able to match my receiver:
--
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", DRIVER=="logitech-hidpp-device", ENV{UPOWER_BATTERY_TYPE}="unifying"
--

So it started to work successfully:
--
% env LC_ALL=C upower -i /org/freedesktop/UPower/devices/mouse_0003o046Do101Ax000A
  native-path:          /sys/devices/pci0000:00/0000:00:1c.6/0000:0e:00.0/usb1/1-2/1-2.3/1-2.3.2/1-2.3.2:1.2/0003:046D:C52B.0009/0003:046D:101A.000A
  vendor:               Logitech, Inc.
  model:                Performance MX
  serial:               04208641
  power supply:         no
  updated:              Thu Mar 26 01:37:15 2015 (10 seconds ago)
  has history:          yes
  has statistics:       no
  mouse
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    percentage:          90%
    icon-name:          'battery-full-symbolic'

Comment 1 Fedora End Of Life 2016-07-19 13:12:28 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.