27

Is there a way to monitor the mouse's battery status in Kubuntu? I have a Logitech Wireless Mouse M510 and in Windows I can use the default software (from official site) to monitor battery status and do other things like editing some mouse buttons etc.

Is there any software to do same thing or just monitoring battery status (applets, widgets, software etc.)?

Lekensteyn
  • 178,446
Frank
  • 1,583

5 Answers5

42

From the CLI, UPower can do this:

$ upower --dump
Device: /org/freedesktop/UPower/devices/mouse_0000o0000o0000x0000
  native-path:          /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.4/3-9.4:1.2/0000:0000:0000.0000/0000:0000:0000.0000
  vendor:               Logitech, Inc.
  model:                Anywhere MX
  serial:               00000000
  power supply:         no
  updated:              Sun 10 Jul 2016 04:47:36 AM EDT (84 seconds ago)
  has history:          yes
  has statistics:       no
  mouse
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    percentage:          95%
    icon-name:          'battery-full-symbolic'
[...]

From the GUI, mate-power-statistics (from the MATE Power Manager project) or gnome-power-statistics (from the GNOME Power Manager project) can do this.

gnome power statistics

Snowball
  • 771
  • 6
  • 5
14

Using the Solaar program as described in this answer, you can obtain the battery status.

Screenshot of Solaar


warning: technical gibberish below, feel free to skip if you are not interested in hacking this mouse

The M510 is a HID++ 1.0 device judging from the register dump at the Solaar repository. The HID++ 2.0 document that include Battery Unified Level Status as linked by gertvdijk are irrelevant here.

As noted on https://git.lekensteyn.nl/ltunify/tree/registers.txt, the "07" register shows the battery status. If you want to learn more about the technical side, you can read my article about reverse engineering the protocol.

Lekensteyn
  • 178,446
8

You can go to your power settings. There you will hopefully have the battery left of any device that runs on batteries.

In my distro (Mint) I can see the battery remaining of my laptop and my mouse by clicking in the power icon at the status bar (bottom-right).

I can also go to power management, and there is a "Batteries" tab, and there it is too.

I don't know if this is available in all distros, but it is so easy to check that there's no harm in giving it a try.

2

Search "power" in the GUI and pull up power statistics. Click mouse on the left, the default will be the laptop battery. Note this will not work if the battery is already dead (as I just learned).

ReggieBee
  • 21
  • 1
0

As snowball pointed out, there is upower --dump, which works great for my MX Ergo (is shows 100% (should be ignored), which is a bit confusing, but it just came from the charger).

On Xubuntu/xfce, there is also the graphical tool xfce4-power-manager-settings with the devices tab. although, it doesn't have statistics, like the gnome or mate tool:

Power Manager, Devices tab

Daniel Alder
  • 2,612