[[email protected]] Peripheral misclassification and device alias swapping on Logitech Unifying receivers

オープン
#14,113 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, linux, python
領域
backend, desktop

調査の方向性

Start with applets/[email protected]/applet.js and cinnamon-settings/modules/cs_power.py, especially _devicesChanged(), DeviceItem alias resolution, build_battery_page(), and create_battery_row(). Check how device model, device_kind, and device_id are used for labels and aliases; the report includes a GetDevices example showing both peripherals classified as keyboards. Done when the mouse is identified correctly and aliases stay attached to the right peripherals after device enumeration changes.

索引モデルが issue の本文から書いたものです。

説明

BUG
Distribution

Arch Linux (Linux kernel 7.2, Wayland session: cinnamon-wayland)

Package version

cinnamon 6.8.0-2

Graphics hardware in use

Intel Corporation IvyBridge GT2 [HD Graphics 4000] (i915 driver)

Frequency

Always

Bug description

When multiple wireless peripherals (a mouse and a keyboard) are paired to a single composite USB receiver (such as a Logitech Unifying or Bolt receiver), two related issues affect the Cinnamon Power applet ([email protected]) and Power Settings (cs_power.py):

1. Misclassification in panel tooltip and icons:
The panel tooltip displays "Keyboard (100%), Keyboard (5%)" because UPower defaults the mouse battery type to UPDeviceKind.KEYBOARD (6) due to the shared USB receiver. However, UPower's Model string correctly reports "Logitech Wireless Mouse". The Cinnamon applet relies strictly on device_kind and ignores the known model name, showing duplicate keyboard icons and tooltips.

2. Random device alias swap / inversion:
When custom device nicknames (aliases) are set in Cinnamon Power Settings, Cinnamon binds them to transient D-Bus object paths (e.g. `/org/freedesktop/UPower/devices/keyboard_hidpp_battery_0`). Because device enumeration order is dynamic (it depends on whether the mouse or keyboard transmits first after boot or wakeup), these numbers swap. This causes the keyboard alias to be applied to the mouse, actively inverting the peripherals in the menu.
Steps to reproduce
1. Pair both a Logitech wireless mouse and a wireless keyboard to a single Logitech Unifying USB receiver.
2. Observe the Cinnamon Power applet tooltip: it displays "Keyboard (XX%), Keyboard (YY%)".
3. Open Cinnamon Settings -> Power and set friendly nicknames (aliases) for the mouse and keyboard.
4. Reboot the computer or wake it up from sleep, moving the mouse first to wake it before typing on the
keyboard.
5. The device numbers assigned by the kernel/UPower invert (_0 becomes _1), causing Cinnamon to assign        the keyboard alias to the mouse and vice-versa.
Expected behavior
1. `[email protected]` should inspect the `model` property (e.g. check if model contains "mouse" or
"keyboard") as an override or fallback to determine the appropriate icon and tooltip string, rather than
relying exclusively on UPower's raw `device_kind`.
2. Device aliases in Cinnamon should be keyed or matched by hardware model / serial number rather than
transient D-Bus object paths (`battery_hidpp_battery_X`) that change order between boots.
Additional information
Output of `busctl --user call org.cinnamon.SettingsDaemon.Power /org/cinnamon/SettingsDaemon/Power
org.cinnamon.SettingsDaemon.Power GetDevices`:

a(sssusduut) 2
  "/org/freedesktop/UPower/devices/keyboard_hidpp_battery_3" "" "Logitech K540/K545" 6 ... 100 ...
  "/org/freedesktop/UPower/devices/keyboard_hidpp_battery_2" "" "Logitech Wireless Mouse" 6 ... 5 ...

Notice both devices have device_kind = 6 (keyboard) from UPower, but model unambiguously identifies "Logitech  Wireless Mouse".

Relevant code locations:
- applets/[email protected]/applet.js:
  - stats generation in _devicesChanged(): PowerUtils.deviceKindToString(device_kind)
  - DeviceItem alias resolution: if (parts[0] == device_id) (matching only volatile D-Bus paths)
- cinnamon-settings/modules/cs_power.py:
  - build_battery_page() and create_battery_row() mapping aliases strictly by device_id.
主要言語
JavaScript
スター
5.7k
フォーク
941
平均マージ
7日 9時間
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon のほかの issue

linuxmint/cinnamon の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。