FS#47492 - [upower] logitech mouse state unknwon

Attached to Project: Arch Linux
Opened by sven (commonuser) - Tuesday, 22 December 2015, 17:12 GMT
Last edited by Antonio Rojas (arojas) - Friday, 02 August 2019, 20:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
upower fails to determine the battery conditions of a Logitech M510.

upower -d:
> [...]
> vendor: Logitech, Inc.
> model: M510
> [...]
> power supply: no
> updated: Tue 22 Dec 2015 17:56:23 CET (76 seconds ago)
> has history: yes
> has statistics: no
> mouse
> present: yes
> rechargeable: yes
> state: unknown
> warning-level: none
> percentage: 0%
> icon-name: 'battery-missing-symbolic'


Additional info:
* linux 4.2.5-1
* upower 0.99.3

How to debug this? I'm pretty sure, this has worked before.
This task depends upon

Closed by  Antonio Rojas (arojas)
Friday, 02 August 2019, 20:51 GMT
Reason for closing:  Fixed
Comment by Jan Alexander Steffens (heftig) - Wednesday, 23 December 2015, 10:50 GMT
See if you can find the device in /sys and if it has readable battery state there.
Comment by sven (commonuser) - Friday, 25 December 2015, 15:58 GMT
Not really. There are files like “runtime_enabled” and “runtime_status”, but they
just say disabled and unsupported.

Does upower reads the power state from the kernel, or is it talking to the device?
I just took a quick look at upower and there seems to be explicit handling for
Logitech (hidpp) devices.
Comment by hamelg (hamelg) - Thursday, 27 April 2017, 16:58 GMT
I encounter the same issue with my Logitech mouse.

$ upower -i /org/freedesktop/UPower/devices/mouse_0003o046DoC52Fx0002
native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.1/0003:046D:C52F.0002
vendor: Logitech, Inc.
model: B330/M330/M331
serial: 44FBE3B5
power supply: no
updated: Thu 27 Apr 2017 06:38:40 PM CEST (67 seconds ago)
has history: yes
has statistics: no
mouse
present: yes
rechargeable: yes
state: unknown
warning-level: none
percentage: 0%
icon-name: 'battery-missing-symbolic'

Additional info:
* linux 4.10.11-1
* upower 0.99.4+12+g402640b-1
Comment by Jan de Groot (JGC) - Friday, 28 April 2017, 09:19 GMT
Please try changing:

ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", ENV{UPOWER_BATTERY_TYPE}="lg-wireless"
to:
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", ENV{UPOWER_BATTERY_TYPE}="unifying"

in /usr/lib/udev/rules.d/95-upower-csr.rules

046d:c52f is a nano receiver. Though it isn't technically a unifying device, it should support reading battery through the unifying protocol.
Comment by hamelg (hamelg) - Friday, 28 April 2017, 19:09 GMT
It doesn't work.
When specifying "unifying", the device is no more seen by upower.

$ upower -d
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: no
updated: Fri 28 Apr 2017 07:58:04 AM CEST (46788 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
icon-name: ''

Daemon:
daemon-version: 0.99.5
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: HybridSleep

According to the spec found on the logitech site, My mouse M330 has no "unifying feature".
Comment by Jan de Groot (JGC) - Wednesday, 13 September 2017, 21:06 GMT
Please test 0.99.6-1 in testing
Comment by hamelg (hamelg) - Thursday, 14 September 2017, 16:34 GMT
unfortunately, the issue is still present :(

$ upower -d
Device: /org/freedesktop/UPower/devices/mouse_0003o046DoC52Fx0002
native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.1/0003:046D:C52F.0002
vendor: Logitech, Inc.
model: B330/M330/M331
serial: 44FBE3B5
power supply: no
updated: Thu 14 Sep 2017 06:32:25 PM CEST (23 seconds ago)
has history: yes
has statistics: no
mouse
present: no
rechargeable: yes
state: unknown
warning-level: none
percentage: 0%
icon-name: 'battery-missing-symbolic'
History (charge):
1505406745 0.000 unknown
History (rate):
1505406745 0.000 unknown
Comment by Stefan Schick (pommes_) - Saturday, 27 July 2019, 18:11 GMT
Unfortunately I could only test with a Logitech PerformanceMX, which works fine.
Is this still an issue? Can someone with a Logitech M330/M510 mouse confirm?
Comment by sven (commonuser) - Sunday, 28 July 2019, 11:05 GMT
M510 seems to also work now. I guess there were also some kernel driver changes involved.

Device: /org/freedesktop/UPower/devices/mouse_hidpp_battery_0
native-path: hidpp_battery_0
model: Wireless Mouse M510
serial: […]
power supply: no
updated: Sun 28 Jul 2019 12:59:47 CEST (85 seconds ago)
has history: yes
has statistics: yes
mouse
present: yes
rechargeable: yes
state: discharging
warning-level: none
battery-level: normal
percentage: 55% (should be ignored)
icon-name: 'battery-low-symbolic'

Loading...