power indicator shows Logitech wireless keyboard and mouse batteries with 0%

Bug #1103064 reported by Pete Graner
124
This bug affects 26 people
Affects Status Importance Assigned to Milestone
Upower
Fix Released
Medium
indicator-power
Invalid
Low
Unassigned
indicator-power (Ubuntu)
Invalid
Low
Unassigned
Raring
Invalid
Low
Unassigned
upower (Ubuntu)
Fix Released
Low
Martin Pitt
Raring
Won't Fix
Low
Unassigned

Bug Description

I updated by raring installation and found that the power indicator now shows my wireless keyboard and mouse as (missing) and with extremely low power. Both the keyboard and mouse work (I'm using them to type this bug) and the low battery light on the respective devices do not show low power. Even switching to brand new batteries don't make the indicator change state.

I've attached a screenshot of the indicator and a screen shot of the power setting dialog which seems to be in conflict with the indicator.

I've reproduced this behavior with the 3.8.0-0-generic & vmlinuz-3.8.0-1-generic kernels.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: indicator-power 12.10.6daily13.01.18-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-0.4-generic 3.8.0-rc3
Uname: Linux 3.8.0-0-generic x86_64
ApportVersion: 2.8-0ubuntu2
Architecture: amd64
Date: Tue Jan 22 11:39:23 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-05-08 (259 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: indicator-power
UpgradeStatus: Upgraded to raring on 2013-01-18 (3 days ago)
---
ApportVersion: 2.8-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 13.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-05-08 (259 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
Package: upower 0.9.19-1
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.8.0-1.5-generic 3.8.0-rc4
Tags: raring running-unity
Uname: Linux 3.8.0-1-generic x86_64
UpgradeStatus: Upgraded to raring on 2013-01-18 (4 days ago)
UserGroups: adm cdrom dip libvirtd lpadmin plugdev sambashare sudo

Revision history for this message
Pete Graner (pgraner) wrote :
Revision history for this message
Pete Graner (pgraner) wrote :
Revision history for this message
Pete Graner (pgraner) wrote :

Also this is on a Lenovo X220 in a docking station with a Logitech K520 Keyboard & Mouse (they use a shared USB dongle).

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems like an upower issue, Martin do you know if anything changed in that stack recently?

the log has for example

" keyboard
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 0%"

the indicator is only reflecting that

Changed in upower (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Changed in indicator-power:
status: New → Invalid
Changed in indicator-power (Ubuntu):
status: New → Invalid
importance: Undecided → Low
Changed in indicator-power:
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote :

upower didn't change recently, but the Linux kernel did. Can you please copy&paste the output of "upower --dump" from a Terminal window? Any chance you could also do this with a previous Ubuntu version or just a previous kernel when this was still working correctly, so that we can compare the outputs?

From you saying "I updated my raring installation" it sounds like it might still have worked with 3.7; if you still have that installed, you can pick that from grub, boot with that, and get the upower dump? Thanks!

Changed in upower (Ubuntu):
status: New → Incomplete
Revision history for this message
Pete Graner (pgraner) wrote :

Running of:

upower --dump > $(uname -r).dump

Revision history for this message
Pete Graner (pgraner) wrote :

Running of:

upower --dump > $(uname -r).dump

Revision history for this message
Pete Graner (pgraner) wrote :

Running of:

upower --dump > $(uname -r).dump

Revision history for this message
Pete Graner (pgraner) wrote :

Martin,

The machine was running 12.10 until 18 Feb when I ran a do-release-upgrade -d to bring it up to raring. From that point there were no updates until yesterday 21 Feb. I upgraded while traveling and upon returning home I docked the machine and did not get the keyboard & mouse in the power meter. I then upgraded using apt-get dist-upgrade. I then rebooted and saw the screenshots that are attached.

In running the upower --dump you requested, the 3.5 kernel exhibited the problem. I'm not sure if its the kernel or not given it happening with that old of a kernel with the new userspace.

Revision history for this message
Pete Graner (pgraner) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Re: power indicator shows that keyboard & mouse are missing when they are not

Indeed, if it was working under 12.10 but not under raring with the 12.10 kernel, then it's most likely not a kernel change but instead an upower regression. To confirm this, can you please install the older upower for your architecture:

  https://launchpad.net/ubuntu/+source/upower/0.9.17-1build1/+build/3706299/+files/upower_0.9.17-1build1_i386.deb
  https://launchpad.net/ubuntu/+source/upower/0.9.17-1build1/+build/3706296/+files/upower_0.9.17-1build1_amd64.deb

It's fine to leave the other binary packages (libupower etc.) at the raring version. It should work immediately without restarting the session. Can you please attach an "upower --dump" with that, so that we can see if that fixes the kbd/mouse power levels?

Revision history for this message
Martin Pitt (pitti) wrote :

Actually, let's try it the modern way: Can you please do

  wget -O/tmp/umockdump https://raw.github.com/martinpitt/umockdev/master/src/umockdump

and run

  python3 /tmp/umockdump > /tmp/dump

? This will do a complete sysfs dump (without private bits like serial IDs) into /tmp/dump, which I can then use to build a sandbox with your devices. This will allow me to run upowerd in that sandbox to reproduce the bug, write a test case, and fix it.

Thanks!

Revision history for this message
Dylan McCall (dylanmccall) wrote :

I think we're probably aware of this, but just to be clear there _has_ been a significant change in upower to this end: version 0.9.19 added support for Logitech Unifying devices. I tested this with a Logitech Performance Mouse MX and noticed the same thing as the reporter: upower detects the mouse, but always says that it has 0% power. I haven't had the opportunity to confirm that in other distros, yet.

Revision history for this message
Pete Graner (pgraner) wrote :

I had to run:

python3 /tmp/umockdump --all > /tmp/dump

and the output is attached.

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed, http://cgit.freedesktop.org/upower/commit/?id=95184593504bca5240ecd296db98954decd2c5a5 covers exactly the device which Pete is reporting. Unfortunately the sysfs dump isn't enough to reproduce the error as these devices do not report their charge level through sysfs.

I assumed that earlier upower versions reported the correct charge levels, but now I realize that the description did not actually say this. So did that actually work before? if so, that would seem a bit magic to me as I can't see any code in upower which does that in a way other than looking in sysfs.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@pitti: from the IRC problem description my understanding was that in quantal those devices were not listed at all.
@pete: is that correct?

Revision history for this message
Pete Graner (pgraner) wrote :

@seb. That is correct they did not exist in quantal, only in raring.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for confirming. There is some existing code now which is supposed to read the battery status from the device, but it's receiving "0%" all the time for you. So I'll look at what the indicator is expecting, and we'll drop the property if it's 0%, and/or fix the indicator to get along with that.

Changed in upower (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Pete Graner (pgraner) wrote :

I installed upower_0.9.17-1build1_amd64.deb per @pitti's instruction and run sudo upower --dump and attached the output. There was no visible change in the icon, still showed a "not present" in () on the indicator drop down along with a red empty mouse icon and red empty battery icon for the keyboard. I even logged out and back into a new session and still see the same behavior.

Changed in upower (Ubuntu Raring):
importance: Undecided → Low
Revision history for this message
In , Martin Pitt (pitti) wrote :

http://cgit.freedesktop.org/upower/commit/?id=95184593504bca5240ecd29 introduced support for Logitech unifying devices. However, with 0.9.19 their charge is shown as 0%:

Device: /org/freedesktop/UPower/devices/mouse_input5
  native-path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input5
  vendor: Logitech
  power supply: no
  updated: Thu Feb 14 03:54:12 2013 (34 seconds ago)
  has history: yes
  has statistics: no
  mouse
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 0%

Device: /org/freedesktop/UPower/devices/keyboard_input6
  native-path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input6
  vendor: Logitech
  power supply: no
  updated: Thu Feb 14 03:54:12 2013 (34 seconds ago)
  has history: yes
  has statistics: no
  keyboard
    present: no
    rechargeable: yes
    state: unknown
    percentage: 0%

This leads to confusing output in both gnome-power-statistics (https://launchpadlibrarian.net/129122895/power-settings-window.png) as well as indicators (https://launchpadlibrarian.net/129122931/indicators.png).

I think as a defensive action we should not add a "percentage" property if we are unable to read the actual charge, i. e. if it is 0.

Ideally we'd fix reading the charge, of course.

summary: - power indicator shows that keyboard & mouse are missing when they are
- not
+ power indicator keyboard & mouse batteries with 0%
summary: - power indicator keyboard & mouse batteries with 0%
+ power indicator shows Logitech wireless keyboard and mouse batteries
+ with 0%
Revision history for this message
In , Julien Danjou (jdanjou) wrote :

That doesn't sound complicated to fix, though I'm not sure what's the best strategy in term of UPower handling of that case. Richard, do you have any hint, or you're comfortable enough to fix it?
I can test a patch if you don't have the hardware.

Revision history for this message
In , Martin Pitt (pitti) wrote :
Download full text (3.4 KiB)

I'm now at a machine which has these devices attached. I can reproduce the bug with 0.9.19, but interestingly with git head I don't see the devices at all any more. There might be some regression in http://cgit.freedesktop.org/upower/commit/?id=b1f12feb1fd45, did you or Julien happen to try current master with such a device?

The udev rule seems to work somewhat; it attaches the property to the USB HID device (not the input device); I assume that's intended?

P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/0003:046D:C52B.0005
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/0003:046D:C5
2B.0005
E: DRIVER=logitech-djdevice
E: HID_ID=0003:0000046D:0000C52B
E: HID_NAME=Logitech Unifying Device. Wireless PID:1024
E: HID_PHYS=usb-0000:00:1a.0-1.5.1:1
E: MODALIAS=hid:b0003g0000v0000046Dp0000C52B
E: SUBSYSTEM=hid
E: UDEV_LOG=3
E: UPOWER_BATTERY_TYPE=unifying
E: USEC_INITIALIZED=47249781752

P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/0003:046D:C52B.0006
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/0003:046D:C5
2B.0006
E: DRIVER=logitech-djdevice
E: HID_ID=0003:0000046D:0000C52B
E: HID_NAME=Logitech Unifying Device. Wireless PID:2011
E: HID_PHYS=usb-0000:00:1a.0-1.5.1:2
E: MODALIAS=hid:b0003g0000v0000046Dp0000C52B
E: SUBSYSTEM=hid
E: UDEV_LOG=3
E: UPOWER_BATTERY_TYPE=unifying
E: USEC_INITIALIZED=47249782421

With that, the debugging output is

TI:04:15:59 registering subsystem : hid
TI:04:15:59 failed to coldplug /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.3/0003:046D:0A29.0001
TI:04:15:59 failed to coldplug /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:046D:C52B.0002
TI:04:15:59 failed to coldplug /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.1/0003:046D:C52B.0003
TI:04:15:59 failed to coldplug /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004
TI:04:15:59 Using Unifying receiver hidraw device file: /dev/hidraw1
TI:04:15:59 Getting idx for feature GetDeviceNameType [05]
TI:04:15:59 Failed to get feature idx: invalid response from device: 7
TI:04:15:59 Getting idx for feature BatteryLevelStatus [1000]
TI:04:15:59 Failed to get feature idx: invalid response from device: 7
TI:04:15:59 Getting idx for feature SolarDashboard [4301]
TI:04:15:59 Failed to get feature idx: invalid response from device: 7
TI:04:15:59 failed to coldplug unifying device: device is unreachable
TI:04:15:59 failed to coldplug /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/0003:046D:C52B.0005
TI:04:15:59 Using Unifying receiver hidraw device file: /dev/hidraw1
TI:04:15:59 Getting idx for feature GetDeviceNameType [05]
TI:04:15:59 Failed to get feature idx: invalid response from device: 7
TI:04:15:59 Getting idx for feature BatteryLevelStatus [1000]
TI:04:15:59 Failed to get feature idx: invalid response from device: 7
TI:04:15:59 Getting idx for feature Sol...

Read more...

Revision history for this message
In , Martin Pitt (pitti) wrote :

Julien, FTR, I'm "pitti" on Freenode (hanging out in e. g. #udev) if you want to discuss/debug on IRC.

Revision history for this message
In , Martin Pitt (pitti) wrote :

On 0.9.19, the debug output is

TI:04:19:37 invalid bitmask entry for /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/
1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input5
TI:04:19:37 Using Unifying receiver hidraw device file: /dev/hidraw1
TI:04:19:37 object path = /org/freedesktop/UPower/devices/mouse_input5
TI:04:19:37 Unifying device 1 is offline
TI:04:19:37 added native-path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input5
TI:04:19:37 using id: Logitech
[...]
TI:04:19:37 invalid bitmask entry for /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input6
TI:04:19:37 Using Unifying receiver hidraw device file: /dev/hidraw1
TI:04:19:37 object path = /org/freedesktop/UPower/devices/keyboard_input6
TI:04:19:37 Unifying device 2 is offline
TI:04:19:37 added native-path: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.2/0003:046D:C52B.0004/input/input6

TI:04:19:37 using id: Logitech

The "invalid bitmask" might be related to http://cgit.freedesktop.org/upower/commit/?id=35b0d25 ?

Revision history for this message
In , Martin Pitt (pitti) wrote :

With git reset to commit 35b0d25 I basically get the same output as with 0.9.19, so the "invalid bitmask" still remains with 35b0d25.

Changed in upower:
importance: Unknown → Medium
status: Unknown → Confirmed
Martin Pitt (pitti)
Changed in upower (Ubuntu Raring):
status: Confirmed → In Progress
Revision history for this message
In , Martin Pitt (pitti) wrote :

Julien was talking to me on IRC, and got me some clarifications:

 - The "invalid bit mask" thing is something else, and nothing to worry about.

 - In the original bug report, both devices were "present", whereas in my remote ssh testing they are both "offline". That's because these devices power down after some minutes of inactivity, which is plausible because the person owning this device is asleep right now, and I only have ssh access.

 - You can't read charge levels or much else from powered down devices. However, that's not the bug here as even in the original report, where both devices are online, the percentage is 0%

 - Julien only wrote support for the HID 1.0 protocol, but on that machine they are using HID++ 2.0.

So we are back to the original problem that upower should not claim a 0% percentage if its actually unable to read the percentage.

Also, it seems that the refactoring patch broke these devices entirely, but that might also just be fallout from the powered down devices somehow, and thus I'd rather let Julien test it again on master.

Thanks!

Revision history for this message
Alin Andrei (nilarimogard) wrote :

After a recent update, the mouse no longer shows up in the power indicator / power statistics, but now the mouse stops working every few seconds for a second or so which is very annoying. Anyone else experiencing this issue? I've checked the batteries, etc., that's not it - further more, this doesn't occur when my laptop isn't running on battery.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

I noted that they have roll-out this feature, but my mouse works well anyway...

Martin Pitt (pitti)
Changed in upower (Ubuntu Raring):
status: In Progress → Won't Fix
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
Martin Pitt (pitti) wrote :

upower 0.9.21 just landed in saucy, with a lot of HID device fixes. It's worth trying with that version again.

Changed in upower (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
nloewen (nloewen) wrote :

I'm running saucy and experiencing this bug with my M510 wireless mouse. With all the latest updates, including upower 0.9.21, the battery status for the mouse shows 1%, not the actual battery level.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, so 1% is at least different than 0%, so this could now be a scaling factor. Would you mind doing

   sudo killall upowerd; sudo /usr/lib/upower/upowerd -v 2>&1 | tee /tmp/upowerd.log

then let that sit that there for a while (make sure your M510 is attached). In a second terminal (or tab), run

   upower --dump > /tmp/upower.txt

then press Control-C in the first. Please attach /tmp/upowerd.log and /tmp/upower.txt here.

Thanks!

Changed in upower (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alin Andrei (nilarimogard) wrote :

This bug was fixed for me in Saucy (using a Logitech M525 mouse) after the recent upower update.

Martin Pitt (pitti)
Changed in upower (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Confirmed → Incomplete
Revision history for this message
Damiano Dallatana (damidalla) wrote :

I am using a Logitech K800 wireless keyboard and a M310 wireless mouse, and I found this bug waiting for me after the upgrade to saucy. I did not have any battery indicator from my desktop pc with raring and with precise.
I attach, as pitti asked, my upower.txt ($ upower --dump > /tmp/upower.txt ) and upowerd.log ($ sudo killall upowerd; sudo /usr/lib/upower/upowerd -v 2>&1 | tee /tmp/upowerd.log) created using my saucy x64 system.
I obviously am at your disposal for any other log you'd need :)

Revision history for this message
Damiano Dallatana (damidalla) wrote :
Revision history for this message
Damiano Dallatana (damidalla) wrote :

Sorry for the double posting: tried another
$ upower --dump > /tmp/upower.txt
as the first one did not list any keyboard.
Looks like the other keyboard listed is my old one, K520, turned off and hidden months ago in its box, but still living in the loving memory of its usb receiver :)

Revision history for this message
Damiano Dallatana (damidalla) wrote :

Retried also the
$ sudo killall upowerd; sudo /usr/lib/upower/upowerd -v 2>&1 | tee /tmp/upowerd.log
as it did not list any keyboard.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, setting back to confirmed then. There was recently some discussion/patches floating on the upstream mailing list.

Changed in upower (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Lionel-g-landwerlin (lionel-g-landwerlin) wrote :

Hi all,

Anyone having a beginning of a fix to test for this bug?
I'm having kind of a similar problem with my wireless logitech mouse.
From time to time upower shows the mouse at 100% and other times at 1%. So I get notification all the time in gnome-shell.
If you have any code path to look at I would be happy to try some things out.

Thanks.

Revision history for this message
In , Peter Wu (lekensteyn) wrote :

Lionel, a mouse you say? I guess that is an issue which occurs when older (non-related!) reports from hidraw are seen as a response to the battery query.

Please try https://git.lekensteyn.nl/upower/log/?h=hidpp-rework, that should resolve your issue. At least get the commits up to https://git.lekensteyn.nl/upower/commit/?h=hidpp-rework&id=a375524c52e75079236127f9a89bd335cd37b3c9

Changed in upower:
status: Confirmed → Incomplete
Revision history for this message
In , Tim Lunn (darkxst) wrote :

I have the same issue as Lionel, with my wireless mouse oscillating between reporting the correct percentage and 1%. I can confirm that the above git branch resolves this issue.

Revision history for this message
In , Martin Pitt (pitti) wrote :

This should be fixed with the set of Peter Wu's "hidpp" rewrite patches which landed in upstream master now.

Revision history for this message
Martin Pitt (pitti) wrote :

I reviewed Peter Wu's branch for this and landed it upstream.

Changed in upower (Ubuntu):
status: Confirmed → Fix Committed
Changed in upower:
status: Incomplete → Fix Released
Revision history for this message
In , Peter Wu (lekensteyn) wrote :

Thanks for merging. Martin, note that the battery percentage may still show as 0% if a device was unavailable when UPower starts, but in that case the state is "unknown". Applications should check the state before using "percentage".

Revision history for this message
In , Peter Wu (lekensteyn) wrote :

Heads-up: I noticed that the K800 reports 0% while charging (0 means "unknown level"). I think this is unfixable in UPower and that applications should not warn when a device is charging and the percentage is 0.

This also messes up history, if you expected a nice history with a climbing percentage, you will be disappointed. I wonder what happens when the battery is fully charged.

Martin Pitt (pitti)
Changed in upower (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
milestone: none → ubuntu-13.09
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upower - 0.9.21-3ubuntu1

---------------
upower (0.9.21-3ubuntu1) saucy; urgency=low

  * Update 00git_updates.patch to today's upstream git:
    - Rework of hidpp detection to determine correct charge values for
      Logitech wireless keyboards/mouse (LP: #1103064)
    - Detect bluetooth mouse/keyboard batteries as such, instead of as system
      batteries. (LP: #115348)
 -- Martin Pitt <email address hidden> Fri, 06 Sep 2013 15:19:05 +0200

Changed in upower (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
In , Saint Germain (saintger) wrote :

Using upower 0.9.23-2 on Debian, I still have this issue:

Device: /org/freedesktop/UPower/devices/mouse_0003o046DoC52Bx0004
  native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004
  vendor: Logitech, Inc.
  model: Performance MX
  serial: CC1238BC
  power supply: no
  updated: lun. 28 oct. 2013 23:24:33 CET (58 seconds ago)
  has history: yes
  has statistics: no
  mouse
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 20%

The battery level is wrong and sometimes fluctuate (between 1%; 20% and 55%).
Currently the battery is almost full (thanks to the LEDs on the mouse) and the battery level only indicates 20%.

Revision history for this message
In , Peter Wu (lekensteyn) wrote :

(In reply to comment #12)
> Using upower 0.9.23-2 on Debian, I still have this issue:
> [..]
> The battery level is wrong and sometimes fluctuate (between 1%; 20% and 55%).
> Currently the battery is almost full (thanks to the LEDs on the mouse) and
> the battery level only indicates 20%.

The Performance MX uses the HID++ 1.0 protocol for reading the battery level from a register. Is the displayed battery percentage always from a fixed set of numbers? Does the number jump upwards and downwards all the time, or is it decreasing over time?

Can you verify the battery level with Solaar?

Revision history for this message
Andrea (andrea-canonica) wrote :

Hi all, I have the same problem with ubuntu 14.04 but I am not an IT professional... can you please help me with simple words?

Revision history for this message
SxMaN (darek86) wrote :

Hello, I have this problem with hp 4000b mouse. Indicator always shows 0% and mouse is disconnecting when i don't use mouse for a couple of minutes.
Ubuntu 14.04.

Revision history for this message
Hanmac (hanmac) wrote :

still have the same problem with logitech mouse:
UPower client version 0.9.23

upower --dump
Device: /org/freedesktop/UPower/devices/mouse_0003o046DoC52Fx0007
  native-path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.3/3-3.3:1.1/0003:046D:C52F.0007
  vendor: Logitech, Inc.
  model: M280/320/275
  serial: 0C080947
  power supply: no
  updated: Di 21 Okt 2014 13:43:27 CEST (52 seconds ago)
  has history: yes
  has statistics: no
  mouse
    present: yes
    rechargeable: yes
    state: unknown
    percentage: 0%

 uname -r
3.13.0-38-generic

Revision history for this message
atimonin (atimonin) wrote :
Download full text (3.8 KiB)

I have a similar problem:
1. before recent update mouse power indicator always show a low power (red), but mouse works
2. after a recent update mouse power indicator looks OK, but mouse move is not working.

# upower --dump
[some text skipped]
Device: /org/freedesktop/UPower/devices/mouse_hid_00o60od1o02o31o61_battery
  native-path: hid-00:60:d1:02:31:61-battery
  model: Bluetooth Mouse
  power supply: no
  updated: Пн. 15 дек. 2014 12:31:35 (0 seconds ago)
  has history: yes
  has statistics: yes
  mouse
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 100%

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes
  is-docked: yes

uname -a
 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

Sometimes after mouse switching off and on it is working for a couple of seconds and then stops

#grep -r . /sys/class/power_supply/*hid*
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/type:Battery
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/control:auto
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/async:disabled
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_abort_count:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_active:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_total_time_ms:35
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_active_count:1
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_enabled:disabled
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_active_kids:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_active_time:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_max_time_ms:35
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_count:1
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_last_time_ms:11561014
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup:enabled
grep: /sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/autosuspend_delay_ms: Input/output error
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_status:unsupported
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_usage:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/wakeup_expire_count:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/power/runtime_suspended_time:0
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/scope:Device
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/capacity:97
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/online:1
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/status:Discharging
/sys/class/power_supply/hid-00:60:d1:02:31:61-battery/uevent:POWER_SUPPLY_NAME=hid-00:60:d1:02:31:61-battery
/sys/class/...

Read more...

Revision history for this message
krasnal (krasnal) wrote :

It would be nice if power indicator was not showing mouses that are not present and stopped notifying about their power being 0%.
I've got Logitech M325 wireless mouse (unifying interface) and whenever I plug it in I get warning about mouse power being 0% but when I take a look at power statistics (the same information as from upower) then it lists two mouses one having some meaningful battery level and the other with 0% but also with indication "present: no".

This is a minor annoyance and should be very easy to fix (I'm using updated 14.04)

Best regards

Revision history for this message
Arndt (fizzgig) wrote :

Same here on Linux Mint 17.1 Cinnamon x64 with an Rapoo 6610 Bluetooth Mouse.

Here is what upower -d had to say:

Device: /org/freedesktop/UPower/devices/line_power_ACAD
  native-path: ACAD
  power supply: yes
  updated: Fr 20 Mär 2015 15:48:35 CET (2684 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: yes

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: BAT1
  vendor: UNKNOWN
  model: AP12A3i
  serial: 12985
  power supply: yes
  updated: Fr 20 Mär 2015 15:48:40 CET (2679 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: fully-charged
    energy: 51,4485 Wh
    energy-empty: 0 Wh
    energy-full: 51,4485 Wh
    energy-full-design: 55,5 Wh
    energy-rate: 0 W
    voltage: 12,444 V
    percentage: 100%
    capacity: 92,7%
    technology: lithium-ion

Device: /org/freedesktop/UPower/devices/mouse_hid_6co5do63o00o21o74_battery
  native-path: hid-6c:5d:63:00:21:74-battery
  model: Rapoo 6610
  power supply: no
  updated: Fr 20 Mär 2015 16:33:18 CET (1 seconds ago)
  has history: yes
  has statistics: yes
  mouse
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 0%

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes
  is-docked: no

The indicator is always at 0% and not changing.

Best regards and keep up the good work!

Revision history for this message
redman (patrick-libert) wrote :

Same problem here,

Linux Mint cinnamon 17.1

Battery shows always 0%

Device: /org/freedesktop/UPower/devices/keyboard_hid_00o1fo20o91of1o76_battery
  native-path: hid-00:1f:20:91:f1:76-battery
  model: Logitech K810
  power supply: no
  updated: Sat 28 Mar 2015 12:29:14 PM CET (9 seconds ago)
  has history: yes
  has statistics: yes
  keyboard
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 0%

Device: /org/freedesktop/UPower/devices/mouse_hid_00o1fo20oe8o86o37_battery
  native-path: hid-00:1f:20:e8:86:37-battery
  model: Ultrathin Touch Mouse
  power supply: no
  updated: Sat 28 Mar 2015 12:29:17 PM CET (6 seconds ago)
  has history: yes
  has statistics: yes
  mouse
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 0%

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: no
  is-docked: no

Revision history for this message
MasterCATZ (mastercatz) wrote :

it seems it looses connection somehow when the message pops up the keyboard is listed as unknown if i turn keyboard / off / on again it works , but these messages still pop up if the keyboard is even switched OFF

Done when error is up

 upower -d
Device: /org/freedesktop/UPower/devices/keyboard_0003o046DoC52Bx14F8
  native-path: /sys/devices/pci0000:00/0000:00:12.0/usb9/9-1/9-1:1.2/0003:046D:C52B.14F7/0003:046D:C52B.14F8
  vendor: Logitech, Inc.
  model: K400
  serial: 9E5B1F54
  power supply: no
  updated: Fri 15 May 2015 06:56:54 AEST (60 seconds ago)
  has history: yes
  has statistics: no
  keyboard
    present: no
    rechargeable: yes
    state: unknown
    percentage: 0%
  History (charge):
    1431637014 0.000 unknown
  History (rate):
    1431637014 0.000 unknown

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: no
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: no
  is-docked: yes

Done after keyboard Switched off and back on as you can see 70% power still

 upower -d
Device: /org/freedesktop/UPower/devices/keyboard_0003o046DoC52Bx1500
  native-path: /sys/devices/pci0000:00/0000:00:12.0/usb9/9-1/9-1:1.2/0003:046D:C52B.14FF/0003:046D:C52B.1500
  vendor: Logitech, Inc.
  model: K400
  serial: 9E5B1F54
  power supply: no
  updated: Fri 15 May 2015 07:00:33 AEST (7 seconds ago)
  has history: yes
  has statistics: no
  keyboard
    present: yes
    rechargeable: yes
    state: discharging
    percentage: 70%
  History (charge):
    1431637233 70.000 discharging
    1431637171 0.000 unknown
    1431637166 0.000 unknown
  History (rate):
    1431637171 0.000 unknown
    1431637166 0.000 unknown

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: no
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: no
  is-docked: yes

Revision history for this message
Ed (galatrona) wrote :

Just adding additional information to the thread...

Completely repeatable on my system:
Linux canis 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

upowerd finds USB-connected UPS, but not Logitech Unifying Receiver (M510 mouse); lsusb reports both:

$ upower -d
Device: /org/freedesktop/UPower/devices/ups_hiddev1
  native-path: /sys/devices/pci0000:00/0000:00:1c.4/0000:05:00.0/usb3/3-1/3-1:1.0/usbmisc/hiddev1
  power supply: yes
  updated: Wed 03 Feb 2016 09:10:36 AM EST (15 seconds ago)
  has history: yes
  has statistics: yes
  ups
    present: yes
    state: fully-charged
    time to empty: 21.7 minutes
    percentage: 100%

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: no
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: no
  is-docked: no

$ lsusb
Bus 006 Device 002: ID 8087:8001 Intel Corp.
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 04a9:190a Canon, Inc. CanoScan LiDE 210
Bus 003 Device 003: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 003 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 8087:8009 Intel Corp.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Revision history for this message
eyrieowl (eyrieowl) wrote :

Just to add to it, seeing this as well, Logitech M510 mouse. Mouse functions, but, the popup that mouse battery is at 0% is a bit annoying. UPS reports fine.

upower --dump
Device: /org/freedesktop/UPower/devices/ups_hiddev1
  native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.3/2-1.4.3:1.0/usbmisc/hiddev1
  power supply: yes
  updated: Wed 17 Feb 2016 08:21:04 AM CST (24 seconds ago)
  has history: yes
  has statistics: yes
  ups
    present: yes
    state: fully-charged
    time to empty: 5.8 minutes
    percentage: 100%

Device: /org/freedesktop/UPower/devices/mouse_0003o046DoC52Bx0008
  native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.4/2-1.5.4.2/2-1.5.4.2:1.2/0003:046D:C52B.0007/0003:046D:C52B.0008
  vendor: Logitech, Inc.
  model: M510
  serial: 97048D58
  power supply: no
  updated: Wed 17 Feb 2016 08:21:04 AM CST (24 seconds ago)
  has history: yes
  has statistics: no
  mouse
    present: yes
    rechargeable: yes
    state: unknown
    percentage: 0%

Daemon:
  daemon-version: 0.9.23
  can-suspend: yes
  can-hibernate: yes
  on-battery: no
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: no
  is-docked: no
ub:~> uname -a
Linux ub 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.