https://bugs.kde.org/show_bug.cgi?id=525859
Bug ID: 525859
Summary: Logitech M705 triggers low-battery warning when HID++
reports CAPACITY_LEVEL=Full but no numeric CAPACITY
Classification: I don't know
Product: kde
Version First unspecified
Reported In:
Platform: CachyOS
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
I am receiving low-battery warnings in KDE Plasma for a Logitech Marathon
Mouse/Performance Plus M705, even immediately after replacing the battery.
As a temporary workaround, I set:
Power Management → Low level for peripheral devices: 0%
This suppresses the warning.
I investigated the battery information being provided by the mouse. The
Logitech HID++ kernel support appears to be present and working:
```
$ lsmod | grep -E 'hid_logitech|hidpp'
hid_logitech_hidpp 77824 0
hid_logitech_dj 45056 0
```
The mouse is detected as a power-supply device:
```
/sys/class/power_supply/hidpp_battery_0/
```
It is correctly identified as:
```
model_name: Marathon Mouse/Performance Plus M705
status: Discharging
```
The important detail is that this device does not expose a numeric `capacity`
attribute. Instead, it exposes `capacity_level`.
The complete uevent data currently reported by the kernel is:
```
DEVTYPE=power_supply
POWER_SUPPLY_NAME=hidpp_battery_0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY_LEVEL=Full
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_SCOPE=Device
POWER_SUPPLY_MODEL_NAME=Marathon Mouse/Performance Plus M705
POWER_SUPPLY_MANUFACTURER=Logitech
POWER_SUPPLY_SERIAL_NUMBER=22-d8-8f-71
```
In particular:
```
POWER_SUPPLY_CAPACITY_LEVEL=Full
```
There is no corresponding:
```
POWER_SUPPLY_CAPACITY=<percentage>
```
Therefore, the kernel/Logitech HID++ driver currently considers the mouse
battery `Full`, but provides the battery state as a discrete capacity level
rather than a numeric percentage.
This appears to be the relevant condition:
1. Logitech M705 is detected correctly by `hid_logitech_hidpp`.
2. The kernel exposes the mouse through `/sys/class/power_supply/`.
3. The mouse provides `POWER_SUPPLY_CAPACITY_LEVEL=Full`.
4. The mouse does not provide a numeric `POWER_SUPPLY_CAPACITY`.
5. KDE Plasma nevertheless produces a low-peripheral-battery warning.
6. Setting Plasma's "Low level for peripheral devices" threshold to 0% prevents
the warning.
It appears possible that the KDE power-management/notification path expects a
numeric capacity value and does not correctly handle peripherals which provide
only `POWER_SUPPLY_CAPACITY_LEVEL`.
STEPS TO REPRODUCE
1. Connect a Logitech Marathon Mouse/Performance Plus M705 that reports battery
state through the hid_logitech_hidpp driver.
2. Use the mouse normally in KDE Plasma with the Power Management setting "Low
level for peripheral devices" set above 0%.
3. Observe that Plasma produces a low-battery warning even though
/sys/class/power_supply/hidpp_battery_0/uevent reports
POWER_SUPPLY_CAPACITY_LEVEL=Full and provides no numeric POWER_SUPPLY_CAPACITY
value.
EXPECTED BEHAVIOUR
When a peripheral does not provide a numeric battery capacity but does provide
`POWER_SUPPLY_CAPACITY_LEVEL`, KDE should use the available discrete state
(`Full`, `Normal`, `Low`, `Critical`, etc.) appropriately and should not issue
a low-battery warning while the kernel reports `Full`.
SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window):
Operating System: CachyOS Linux
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
Kernel Version: 7.2.6-1-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
Memory: 64 GB of RAM (46.8 GB usable)
Graphics Processor: AMD Radeon 780M Graphics
ADDITIONAL INFORMATION
None at this time.
--
You are receiving this mail because:
You are watching all bug changes.