Flashing LEDs (~2min interval) on Logitech Performance MX (USB Wireless) Mouse

Bug #1704998 reported by rando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upower (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi,

Since my upgrade from Ubuntu 14.04 to 16.04.2 LTS the battery indicator LEDs on my Logitech Performance MX Mouse light up about every 120 seconds when the mouse is inactive (no movement). Depending on the charging level 1, 2 or 3 LEDs light up green. When I boot into recovery mode or disable upower after a normal boot this behaviour doesn't occur. The expected behaviour is that the LEDs do not light up every 2 minutes but instead only when the charging levels drop from "3 to 2 LEDs" and "2 to 1 LEDs" - that's how it works with Ubuntu 14.04 (and Windows 10).

Using the usbmon module I captured the usb traffic and when the LEDs light up the following is logged by "cat /sys/kernel/debug/usb/usbmon/2u":

    ffff8807a16ddd80 290929349 S Co:2:009:0 s 21 09 0210 0002 0007 7 = 10018107 000000
    ffff8807a16ddd80 290929492 C Co:2:009:0 0 7 >
    ffff88074c55b180 290932022 C Ii:2:009:3 0:2 7 = 10018f81 070900
    ffff88074c55b180 290932033 S Ii:2:009:3 -115:2 32 <
    ffff8807f4332540 296834836 S Co:2:009:0 s 21 09 0210 0002 0007 7 = 10028107 000000
    ffff8807f4332540 296835012 C Co:2:009:0 0 7 >
    ffff88074c55b180 298689874 C Ii:2:009:3 0:2 7 = 10028107 050000
    ffff88074c55b180 298689892 S Ii:2:009:3 -115:2 32 <

"upower --monitor-detail" shows the following when the LEDs light up:

  [10:22:41.041] device changed: /org/freedesktop/UPower/devices/mouse_0003o046Do101Ax0006
    native-path: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8/2-1.8.4/2-1.8.4:1.2/0003:046D:C52B.0004/0003:046D:101A.0006
    vendor: Logitech, Inc.
    model: Performance MX
    serial: F8A45D1F
    power supply: no
    updated: Tue 18 Jul 2017 10:22:40 AM UTC (1 seconds ago)
    has history: yes
    has statistics: no
    mouse
      present: yes
      rechargeable: yes
      state: discharging
      warning-level: none
      percentage: 55%
      icon-name: 'battery-good-symbolic'

Information from solaar:

  Index : 2
  Wireless PID : 101A
  Protocol : HID++ 1.0
  Polling rate : 8 ms (125Hz)
  Serial : F8A45D1F
    Firmware : 15.01.B0062
    Bootloader : 02.11
    Other : 00.09
  Notifications: battery status

Here is the output from "lsusb -v" for the Logitech Unifying Receiver in use:

    Bus 002 Device 009: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Device Descriptor:
      bLength 18
      bDescriptorType 1
      bcdUSB 2.00
      bDeviceClass 0 (Defined at Interface level)
      bDeviceSubClass 0
      bDeviceProtocol 0
      bMaxPacketSize0 8
      idVendor 0x046d Logitech, Inc.
      idProduct 0xc52b Unifying Receiver
      bcdDevice 12.01
      iManufacturer 1 Logitech
      iProduct 2 USB Receiver
      iSerial 0
      bNumConfigurations 1
      Configuration Descriptor:
        bLength 9
        bDescriptorType 2
        wTotalLength 84
        bNumInterfaces 3
        bConfigurationValue 1
        iConfiguration 4 RQR12.01_B0019
        bmAttributes 0xa0
          (Bus Powered)
          Remote Wakeup
        MaxPower 98mA
        Interface Descriptor:
          bLength 9
          bDescriptorType 4
          bInterfaceNumber 0
          bAlternateSetting 0
          bNumEndpoints 1
          bInterfaceClass 3 Human Interface Device
          bInterfaceSubClass 1 Boot Interface Subclass
          bInterfaceProtocol 1 Keyboard
          iInterface 0
            HID Device Descriptor:
              bLength 9
              bDescriptorType 33
              bcdHID 1.11
              bCountryCode 0 Not supported
              bNumDescriptors 1
              bDescriptorType 34 Report
              wDescriptorLength 59
             Report Descriptors:
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength 7
            bDescriptorType 5
            bEndpointAddress 0x81 EP 1 IN
            bmAttributes 3
              Transfer Type Interrupt
              Synch Type None
              Usage Type Data
            wMaxPacketSize 0x0008 1x 8 bytes
            bInterval 8
        Interface Descriptor:
          bLength 9
          bDescriptorType 4
          bInterfaceNumber 1
          bAlternateSetting 0
          bNumEndpoints 1
          bInterfaceClass 3 Human Interface Device
          bInterfaceSubClass 1 Boot Interface Subclass
          bInterfaceProtocol 2 Mouse
          iInterface 0
            HID Device Descriptor:
              bLength 9
              bDescriptorType 33
              bcdHID 1.11
              bCountryCode 0 Not supported
              bNumDescriptors 1
              bDescriptorType 34 Report
              wDescriptorLength 148
             Report Descriptors:
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength 7
            bDescriptorType 5
            bEndpointAddress 0x82 EP 2 IN
            bmAttributes 3
              Transfer Type Interrupt
              Synch Type None
              Usage Type Data
            wMaxPacketSize 0x0008 1x 8 bytes
            bInterval 2
        Interface Descriptor:
          bLength 9
          bDescriptorType 4
          bInterfaceNumber 2
          bAlternateSetting 0
          bNumEndpoints 1
          bInterfaceClass 3 Human Interface Device
          bInterfaceSubClass 0 No Subclass
          bInterfaceProtocol 0 None
          iInterface 0
            HID Device Descriptor:
              bLength 9
              bDescriptorType 33
              bcdHID 1.11
              bCountryCode 0 Not supported
              bNumDescriptors 1
              bDescriptorType 34 Report
              wDescriptorLength 98
             Report Descriptors:
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength 7
            bDescriptorType 5
            bEndpointAddress 0x83 EP 3 IN
            bmAttributes 3
              Transfer Type Interrupt
              Synch Type None
              Usage Type Data
            wMaxPacketSize 0x0020 1x 32 bytes
            bInterval 2
    Device Status: 0x0000
      (Bus Powered)

If you have any idea how to disable or fix that behaviour please let me know.
If any informations are missing please let me know.

Thanks for your efforts!

Best regards

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: upower 0.99.4-2ubuntu0.3
ProcVersionSignature: Ubuntu 4.8.0-36.36~16.04.1-generic 4.8.11
Uname: Linux 4.8.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CasperVersion: 1.376.2
CurrentDesktop: Unity
Date: Tue Jul 18 10:08:50 2017
LiveMediaBuild: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: upower
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
rando (stoically) wrote :
description: updated
Revision history for this message
rando (stoically) wrote :

One thing I noticed is that if the mouse battery level is low enough (I guess it's 5% or lower) the "upower -d" details show "warning-level: low" and the LEDs wont light up anymore all 2 minutes (until the battery is so low that the LEDs light up and pulse red, but that's wanted behavior). In the "warning-level: low" state the "Device changed" updates from "upower --monitor-detail" increase to every ~30seconds.

Also I tried with a 17.04 LiveBuild and it shows the same behavior.

On the Ubuntu Forums (https://ubuntuforums.org/showthread.php?t=2365880) someone mentioned that the Logitech MX Master (which also has 3 LEDs) doesn't show this behavior at all.

Revision history for this message
Olivier Gay (ouah) wrote :

Hi,

I checked the MX Performance with Ubuntu 16.04.2 LTS. I don't see the issue on my system.

I can see the "device changed" from upower every 2 min or so, the battery percentage is correctly reported
and the LED are not light up. I checked at 20% percentage battery level and at 90% both when mouse is discharging.

For information, Linux 4.8.0-58-generic #63~16.04.1-Ubuntu SMP, upower 0.99.4-2ubuntu0.3, amd64. (All Ubuntu packages were upgraded to their latest version). MX Performance firmware build is 60.

Note that Ubuntu was installed directly and all packages are up to date. Do you have any suspend settings that could temporarily put the USB receiver into sleep?

rando (stoically)
description: updated
Revision history for this message
rando (stoically) wrote :

Thanks for your reply and testing with your setup!

I checked for suspend settings for USB devices and found that it's possible to change the value in the "/sys/bus/usb/devices/<your device id>/power/autosuspend" file to "0". Unfortunately this didn't fix the problem. I'm not aware of any other power management settings that might cause this behavior. Since I tried with a 16.04 and 17.04 "LiveBuild" the LEDs also light up with default power management settings. If you have any idea which setting to check I would be happy to test it. To make sure it's not the USB Hub I connected the Unifying Receiver to another USB Port directly on the PC but that didn't help either.

The kernel version (and with that the HID driver) don't seem to cause the behavior since it happens with 3.13.0, 4.4.0 and 4.10 - and it doesn't happen in recovery mode / with upower disabled.

How did you check the firmware build? The only information related to firmware I was able to find where provided from solaar:

  Index : 2
  Wireless PID : 101A
  Protocol : HID++ 1.0
  Polling rate : 8 ms (125Hz)
  Serial : F8A45D1F
    Firmware : 15.01.B0062
    Bootloader : 02.11
    Other : 00.09
  Notifications: battery status

Could you also provide the version ("iConfiguration" in "lsusb -v") of your Unifying Receiver? Thanks!

For now I use a workaround that's not the best, but it does the job. Using package pinning I downgraded upower and gnome-power-manager to the Ubuntu 14.02 versions.

# copy /etc/apt/sources.list to /etc/apt/sources.list.d/trusty and replace all occurrences of "xenial" with "trusty"

# add /etc/apt/preferences.d/performancemx file with content:

Package: upower
Pin: release n=trusty
Pin-Priority: 990

Package: gnome-power-manager
Pin: release n=trusty
Pin-Priority: 990

Package: *
Pin: release n=xenial
Pin-Priority: 900

Package: *
Pin: release o=Ubuntu
Pin-Priority: -10

# update and downgrade the packages

apt update
apt install upower=0.9.23-2ubuntu1 gnome-power-manager=3.8.2-1ubuntu2

(based on https://askubuntu.com/a/103338/711321)

Revision history for this message
rando (stoically) wrote :

Whoops. First line of the workaround is wrong, it should be:

# copy /etc/apt/sources.list to /etc/apt/sources.list.d/trusty.list

description: updated
Revision history for this message
rando (stoically) wrote :

And sorry for the spam but I just wanted to clarify that the LEDs only light up every 2 minutes if the mouse is inactive (not moved). It can therefore take up to 4 minutes before the LEDs light up the first time. I updated the initial description accordingly.

Revision history for this message
Olivier Gay (ouah) wrote :

> How did you check the firmware build? The only information related to firmware I was able to find where provided from solaar

solaar is a good way to get the device build number.

> Could you also provide the version ("iConfiguration" in "lsusb -v") of your Unifying Receiver?

It seems my mouse is a slightly older version. You have build 62 for the mouse and build 19 for the receiver. My mouse has build 60 for the mouse and build 17 for the receiver.

Did you check if there is any interesting kernel messages (/var/log/kern.log) when upower issues the "device changed" message every 120 s? By any chance did you try it on another computer?

Revision history for this message
rando (stoically) wrote :

Thanks for the information.

I've checked the kern.log and other logs in /var/log but nothing relevant showed up (to be exact no log-entries at all when the LEDs light up).

Like you suggested I've also tested it with my notebook and it shows the same behavior with a fully upgraded Ubuntu 16.04.2 LTS.

Revision history for this message
rando (stoically) wrote :

This issue no longer persists with the latest upower version 0.99.7 (Ubuntu 18.04 LTS).

Changed in upower (Ubuntu):
status: New → Fix Released
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.