From 5f6def437e71f6e8735fd68087cec5eec1a1468d Mon Sep 17 00:00:00 2001 From: Ken Sanislo Date: Mon, 18 May 2026 13:18:16 -0700 Subject: [PATCH] =?UTF-8?q?headset=20RGB:=20fix=20G522=20allowlist=20key?= =?UTF-8?q?=20=E2=80=94=20model=20byte=20is=200x32,=20not=200x33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The HEADSET_SIGNATURE_EFFECTS_ALLOWED allowlist was keyed on "33", a model byte no real G522 reports. DeviceInfo (0x0100) func 0 returns 0x32 for the G522 (0x44 for the G325) — confirmed against every saved diagnostic log, including our own development unit. The 0x33/0x45 values came from the protocol doc, which had both transcribed off-by-one (a shifted read of a G HUB USB capture). Effect: the SOLAAR_EXPERIMENTAL masking suppressed the headset signature-effect settings on every G522, not just unvalidated models. Re-key to "32" and correct the modelId comments. --- lib/logitech_receiver/device.py | 4 ++-- lib/logitech_receiver/device_quirks.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/logitech_receiver/device.py b/lib/logitech_receiver/device.py index e400c17e..8c0fdde8 100644 --- a/lib/logitech_receiver/device.py +++ b/lib/logitech_receiver/device.py @@ -315,8 +315,8 @@ class Device: hw_info = _hidpp20.get_hardware_info_centurion(self) if hw_info: model_id, hw_revision, product_id = hw_info - # modelId is the stable per-model disambiguator (G522 0x33, G325 - # 0x45). productId is shared across the headset family and varies + # modelId is the stable per-model disambiguator (G522 0x32, G325 + # 0x44). productId is shared across the headset family and varies # by firmware (G522 0x0508 -> 0x0509), so it must NOT key modelId. self._modelId = f"{model_id:02X}" self._tid_map = {"usbid": f"{product_id:04X}"} diff --git a/lib/logitech_receiver/device_quirks.py b/lib/logitech_receiver/device_quirks.py index 30cb2018..e2c09009 100644 --- a/lib/logitech_receiver/device_quirks.py +++ b/lib/logitech_receiver/device_quirks.py @@ -3,7 +3,7 @@ Keyed by ``device.modelId``. For normal HID++ devices that is the string Logitech composes by concatenating every transport PID (btid + btleid + wpid + usbid) — one entry covers the model on any transport. For Centurion -headsets it is the firmware-stable model byte (G522 ``"33"``, G325 ``"45"``); +headsets it is the firmware-stable model byte (G522 ``"32"``, G325 ``"44"``); see ``device._get_ids_centurion``. Two postures, by feature class: @@ -56,12 +56,13 @@ RGB_EFFECTS_NVCONFIG_ALLOWED: dict[str, dict[int, set[str]]] = { # fields the firmware is KNOWN to honor. An unlisted effect_id or model # suppresses that signature-effect setting entirely. HEADSET_SIGNATURE_EFFECTS_ALLOWED: dict[str, dict[int, set[str]]] = { - # G522 LIGHTSPEED (Centurion model byte 0x33). Verified against user + # G522 LIGHTSPEED (Centurion model byte 0x32, from DeviceInfo func 0; + # confirmed against multiple diagnostic logs). Verified against user # reports: startup honors only the primary color (secondary unused, speed # has no effect); shutdown honors both colors (speed has no effect). The # passive slot (effect_id 2) is omitted — its behavior is not understood, # so the whole passive setting is suppressed. - "33": { + "32": { 0: {"color1"}, 1: {"color1", "color2"}, },