* Fix WIRELESS_DEVICE_STATUS reconfiguration: push settings and ack with proper cookie When a device sends WIRELESS_DEVICE_STATUS with config_needed=1, the host should re-push settings and acknowledge via ConfigChange SetComplete. The existing code relied on the push flag in changed(), but operator precedence caused push=True to be ignored for devices that have the WIRELESS_DEVICE_STATUS feature — the exact devices that send this notification. Handle the reconfiguration entirely in the notification handler: explicitly push settings and ack, rather than trying to overload the changed() condition. Also replace hardcoded cookie 0x11 with proper GetCookie/SetComplete protocol: read the device's current configuration cookie and echo it back, per the ConfigChange (0x0020) specification. * WIRELESS_DEVICE_STATUS reconfig: gate apply on ConfigChange cookie Add a cookie-comparison gate so devices that emit multiple reconfig notifications (PRO X 2 sends two on power-on) don't get their settings re-applied for every one. The gate also benefits any path that calls apply_settings_if_needed — devices that retain config through power-save now skip the redundant apply. New flow: - Device.apply_settings_if_needed() reads ConfigChange (0x0020) cookie via GetCookie. If the live value matches the cookie we stored after the last successful sync (persister key `_config_cookie`), the device hasn't drifted and we skip apply_all_settings entirely. On a real apply, SetComplete echoes the cookie back and we persist it. Devices without CONFIG_CHANGE bypass the gate (always apply). - device.changed(active=True) calls apply_settings_if_needed in place of the old apply_all_settings + signal_configuration_complete pair. - WIRELESS_DEVICE_STATUS reconfig handler drops the redundant explicit apply + ack (changed() already handles it on transition to active) and instead calls apply_settings_if_needed to cover the case of follow-up reconfig notifications on an already-active device — the cookie gate makes the second/third call essentially free. Protocol cleanup: - set_configuration_complete no longer auto-increments the cookie before echoing. The device owns the cookie and bumps it when its config drifts; the host's job is to confirm which value it synced with, not to advance the value. Host-side increment introduced a needless race with device-side bumps. - signal_configuration_complete gains an optional cookie= arg so the caller can pass a value it already read (saves a redundant GetCookie round-trip from inside the gated apply path). Tests: - get_configuration_cookie returns the two-byte cookie from fn 0. - set_configuration_complete echoes a provided cookie unchanged. - set_configuration_complete with cookie=None reads the live cookie and echoes it (no increment). |
||
|---|---|---|
| .github | ||
| bin | ||
| docs | ||
| lib | ||
| po | ||
| rules.d | ||
| rules.d-uinput | ||
| share | ||
| tests | ||
| tools | ||
| .coveragerc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| CHANGELOG.md | ||
| COPYRIGHT | ||
| LICENSE.txt | ||
| MANIFEST.in | ||
| Makefile | ||
| README.md | ||
| RELEASE.md | ||
| RHEL.md | ||
| Release_Notes.md | ||
| mkdocs.yml | ||
| pyproject.toml | ||
| release.sh | ||
| setup.py | ||
README.md
Solaar
Solaar is a Linux manager for many Logitech keyboards, mice, and other devices that connect wirelessly to a Unifying, Bolt, Lightspeed or Nano receiver as well as many Logitech devices that connect via a USB cable or Bluetooth. Solaar is not a device driver and responds only to special messages from devices that are otherwise ignored by the Linux input system.
More Information - Usage - Capabilities - Rules - Manual Installation - Known Issues
Solaar supports:
- pairing/unpairing of devices with receivers
- configuring device settings
- custom button configuration
- running rules in response to special messages from devices
For more information see the main Solaar documentation page. -
Installation Packages
Up-to-date prebuilt packages are available for some Linux distros (e.g., Fedora) in their standard repositories. If a recent version of Solaar is not available from the standard repositories for your distribution, you can try one of these packages:
- Arch solaar package in the extra repository
- Ubuntu/Kubuntu package in Solaar stable ppa
- NixOS Flake package in Svenum/Solaar-Flake
Solaar is available from some other repositories but may be several versions behind the current version:
- a Debian package, courtesy of Stephen Kitt
- a Ubuntu package is available from universe repository
- a Gentoo package, courtesy of Carlos Silva and Tim Harder
- a Mageia package, courtesy of David Geiger